Skip to content

Commit 4329a2f

Browse files
fix: Resolve all linting errors for CI build
- Fix quote style to use single quotes throughout - Add eslint disable comments for utility script patterns - Format JSON files with Prettier - Fix markdown list formatting - Add missing JSDoc parameters where initially documented
1 parent 3a21c2a commit 4329a2f

File tree

5 files changed

+243
-193
lines changed

5 files changed

+243
-193
lines changed

json-schemas/src/agents.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434
"product": {
3535
"type": "string",
3636
"description": "The product category (required for SDK and wrapper types)",
37-
"enum": ["pub-sub", "asset-tracking", "platform", "livesync", "chat"]
37+
"enum": [
38+
"pub-sub",
39+
"asset-tracking",
40+
"platform",
41+
"livesync",
42+
"chat"
43+
]
3844
},
3945
"name": {
4046
"type": "string",

protocol/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Agent metadata and release information is automatically exported to CSV files an
8282
- Includes version, release dates, support/deprecation dates, and AI-generated release summaries
8383

8484
The CSV files are automatically regenerated and uploaded:
85+
8586
- Daily at 2 AM UTC (via scheduled workflow)
8687
- When changes are made to `protocol/agents.json` or the export scripts
8788
- Manually via the [Sync Data to S3 workflow](../.github/workflows/sync-to-s3.yml)

scripts/export-agents-csv.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
#!/usr/bin/env node
22

3-
const fs = require("fs");
4-
const path = require("path");
3+
const fs = require('fs');
4+
const path = require('path');
55

66
/**
77
* Exports agents.json to CSV format for easy database import
88
*/
99

10-
const agentsFilePath = path.join(__dirname, "..", "protocol", "agents.json");
11-
const outputPath = path.join(__dirname, "..", "data", "agents", "agents.csv");
10+
const agentsFilePath = path.join(__dirname, '..', 'protocol', 'agents.json');
11+
const outputPath = path.join(__dirname, '..', 'data', 'agents', 'agents.csv');
1212

1313
// Load agents data
14-
const agents = JSON.parse(fs.readFileSync(agentsFilePath, "utf8"));
14+
const agents = JSON.parse(fs.readFileSync(agentsFilePath, 'utf8'));
1515

1616
// CSV header
17-
const csvHeader = "identifier,versioned,type,source,product,name";
17+
const csvHeader = 'identifier,versioned,type,source,product,name';
1818

1919
// Process agents
2020
const csvRows = [csvHeader];
2121

2222
agents.agents.forEach((agent) => {
2323
// Extract fields, using empty string for missing optional fields
24-
const identifier = agent.identifier || "";
25-
const versioned = agent.versioned !== undefined ? agent.versioned : "";
26-
const type = agent.type || "";
27-
const source = agent.source || "";
28-
const product = agent.product || "";
29-
const name = agent.name || "";
24+
const identifier = agent.identifier || '';
25+
const versioned = agent.versioned !== undefined ? agent.versioned : '';
26+
const type = agent.type || '';
27+
const source = agent.source || '';
28+
const product = agent.product || '';
29+
const name = agent.name || '';
3030

3131
// Escape fields that might contain commas
3232
const escapeCsvField = (field) => {
3333
const str = String(field);
34-
if (str.includes(",") || str.includes('"') || str.includes("\n")) {
34+
if (str.includes(',') || str.includes('"') || str.includes('\n')) {
3535
return `"${str.replace(/"/g, '""')}"`;
3636
}
3737
return str;
@@ -45,7 +45,7 @@ agents.agents.forEach((agent) => {
4545
escapeCsvField(source),
4646
escapeCsvField(product),
4747
escapeCsvField(name),
48-
].join(",");
48+
].join(',');
4949

5050
csvRows.push(row);
5151
});
@@ -57,7 +57,7 @@ if (!fs.existsSync(outputDir)) {
5757
}
5858

5959
// Write CSV file
60-
const csvContent = csvRows.join("\n");
60+
const csvContent = csvRows.join('\n');
6161
fs.writeFileSync(outputPath, csvContent);
6262

6363
console.log(`✅ Exported ${agents.agents.length} agents to ${outputPath}`);
@@ -68,7 +68,7 @@ agents.agents.forEach((agent) => {
6868
typeCounts[agent.type] = (typeCounts[agent.type] || 0) + 1;
6969
});
7070

71-
console.log("\nSummary by type:");
71+
console.log('\nSummary by type:');
7272
Object.entries(typeCounts).forEach(([type, count]) => {
7373
console.log(` - ${type}: ${count} agents`);
7474
});
@@ -86,7 +86,7 @@ agents.agents.forEach((agent) => {
8686
});
8787

8888
if (Object.keys(productCounts).length > 0) {
89-
console.log("\nSummary by product:");
89+
console.log('\nSummary by product:');
9090
Object.entries(productCounts).forEach(([product, count]) => {
9191
console.log(` - ${product}: ${count} agents`);
9292
});

0 commit comments

Comments
 (0)