agconf 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ nav_order: 8
|
|
|
6
6
|
|
|
7
7
|
# agent-conf
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/agconf)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
|
|
12
12
|
CLI to sync AI agent configurations across repositories.
|
package/dist/index.js
CHANGED
|
@@ -375,7 +375,7 @@ jobs:
|
|
|
375
375
|
node-version: '20'
|
|
376
376
|
|
|
377
377
|
- name: Install agent-conf CLI
|
|
378
|
-
run: npm install -g
|
|
378
|
+
run: npm install -g agconf
|
|
379
379
|
|
|
380
380
|
- name: Run sync
|
|
381
381
|
run: agent-conf sync --yes --summary-file /tmp/sync-summary.md --expand-changes
|
|
@@ -534,7 +534,7 @@ jobs:
|
|
|
534
534
|
node-version: '20'
|
|
535
535
|
|
|
536
536
|
- name: Install agent-conf CLI
|
|
537
|
-
run: npm install -g
|
|
537
|
+
run: npm install -g agconf
|
|
538
538
|
|
|
539
539
|
- name: Check file integrity
|
|
540
540
|
run: agent-conf check
|
|
@@ -836,7 +836,7 @@ function checkSchemaCompatibility(contentVersion) {
|
|
|
836
836
|
if (contentMajor > supportedMajor) {
|
|
837
837
|
return {
|
|
838
838
|
compatible: false,
|
|
839
|
-
error: `Schema version ${contentVersion} requires a newer CLI. Run: npm install -g
|
|
839
|
+
error: `Schema version ${contentVersion} requires a newer CLI. Run: npm install -g agconf@latest`
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
842
|
if (contentMajor < supportedMajor) {
|
|
@@ -848,7 +848,7 @@ function checkSchemaCompatibility(contentVersion) {
|
|
|
848
848
|
if (contentMinor > supportedMinor) {
|
|
849
849
|
return {
|
|
850
850
|
compatible: true,
|
|
851
|
-
warning: `Content uses schema ${contentVersion}, CLI supports ${SUPPORTED_SCHEMA_VERSION}. Some features may not work. Consider upgrading: npm install -g
|
|
851
|
+
warning: `Content uses schema ${contentVersion}, CLI supports ${SUPPORTED_SCHEMA_VERSION}. Some features may not work. Consider upgrading: npm install -g agconf@latest`
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
854
|
return { compatible: true };
|
|
@@ -904,7 +904,7 @@ function hashContent(content) {
|
|
|
904
904
|
return `sha256:${hash.slice(0, 12)}`;
|
|
905
905
|
}
|
|
906
906
|
function getCliVersion() {
|
|
907
|
-
return true ? "0.
|
|
907
|
+
return true ? "0.3.1" : "0.0.0";
|
|
908
908
|
}
|
|
909
909
|
async function checkCliVersionMismatch(targetDir) {
|
|
910
910
|
const result = await readLockfile(targetDir);
|
|
@@ -3054,9 +3054,11 @@ async function performSync(options) {
|
|
|
3054
3054
|
if (result.rules?.codexUpdated && targetResult.target === "codex") {
|
|
3055
3055
|
const rulesCount = result.rules.synced.length;
|
|
3056
3056
|
console.log(
|
|
3057
|
-
` ${pc6.green("+")} ${pc6.dim("AGENTS.md rules section")} ${pc6.dim(`(${rulesCount} rules concatenated)`)}`
|
|
3057
|
+
` ${pc6.green("+")} ${pc6.dim("AGENTS.md rules section")} ${pc6.dim(`(total: ${rulesCount} rules concatenated) (updated)`)}`
|
|
3058
|
+
);
|
|
3059
|
+
summaryLines.push(
|
|
3060
|
+
`- AGENTS.md rules section (total: ${rulesCount} rules concatenated) (updated)`
|
|
3058
3061
|
);
|
|
3059
|
-
summaryLines.push(`- AGENTS.md rules section (${rulesCount} rules concatenated)`);
|
|
3060
3062
|
const newRules = result.rules.synced.filter((r) => !previousRules.includes(r)).sort();
|
|
3061
3063
|
const updatedRules = result.rules.modified.filter((r) => previousRules.includes(r)).sort();
|
|
3062
3064
|
const formatCodexRuleList = (rules, icon, colorFn, label, mdLabel) => {
|
|
@@ -3267,8 +3269,10 @@ async function syncCommand(options) {
|
|
|
3267
3269
|
process.exit(1);
|
|
3268
3270
|
}
|
|
3269
3271
|
const targetDir = await resolveTargetDirectory();
|
|
3270
|
-
const targets = await parseAndValidateTargets(options.target);
|
|
3271
3272
|
const status = await getSyncStatus(targetDir);
|
|
3273
|
+
const targetsFromLockfile = status.lockfile?.content.targets;
|
|
3274
|
+
const effectiveTargetOption = options.target ?? (targetsFromLockfile?.length ? targetsFromLockfile : void 0);
|
|
3275
|
+
const targets = await parseAndValidateTargets(effectiveTargetOption);
|
|
3272
3276
|
if (status.schemaError) {
|
|
3273
3277
|
logger.error(status.schemaError);
|
|
3274
3278
|
process.exit(1);
|
|
@@ -3351,7 +3355,7 @@ async function syncCommand(options) {
|
|
|
3351
3355
|
import { execSync as execSync2 } from "child_process";
|
|
3352
3356
|
import * as prompts7 from "@clack/prompts";
|
|
3353
3357
|
import pc10 from "picocolors";
|
|
3354
|
-
var NPM_PACKAGE_NAME = "
|
|
3358
|
+
var NPM_PACKAGE_NAME = "agconf";
|
|
3355
3359
|
async function getLatestNpmVersion() {
|
|
3356
3360
|
const response = await fetch(`https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`);
|
|
3357
3361
|
if (!response.ok) {
|
|
@@ -3455,7 +3459,7 @@ function createCli() {
|
|
|
3455
3459
|
program.command("sync").description("Sync content from canonical repository (fetches latest by default)").option(
|
|
3456
3460
|
"-s, --source <repo>",
|
|
3457
3461
|
"Canonical repository in owner/repo format (e.g., acme/standards)"
|
|
3458
|
-
).option("--local [path]", "Use local canonical repository (auto-discover or specify path)").option("-y, --yes", "Non-interactive mode (merge by default)").option("--override", "Override existing AGENTS.md instead of merging").option("--ref <ref>", "GitHub ref/version to sync from").option("--pinned", "Use lockfile version without fetching latest").option("-t, --target <targets...>", "Target platforms (claude, codex)"
|
|
3462
|
+
).option("--local [path]", "Use local canonical repository (auto-discover or specify path)").option("-y, --yes", "Non-interactive mode (merge by default)").option("--override", "Override existing AGENTS.md instead of merging").option("--ref <ref>", "GitHub ref/version to sync from").option("--pinned", "Use lockfile version without fetching latest").option("-t, --target <targets...>", "Target platforms (claude, codex)").option("--summary-file <path>", "Write sync summary to file (markdown, for CI)").option("--expand-changes", "Show all items in output (default: first 5)").action(
|
|
3459
3463
|
async (options) => {
|
|
3460
3464
|
await syncCommand(options);
|
|
3461
3465
|
}
|