@open-agent-toolkit/cli 0.2.62 → 0.2.63
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/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/config-and-local-state.md +1 -0
- package/assets/docs/cli-utilities/configuration.md +10 -8
- package/assets/docs/cli-utilities/project-log.md +16 -0
- package/assets/docs/cli-utilities/workflow-gates.md +124 -16
- package/assets/docs/provider-sync/commands.md +3 -0
- package/assets/docs/provider-sync/instruction-sync.md +107 -0
- package/assets/docs/reference/cli-reference.md +16 -6
- package/assets/docs/reference/oat-directory-structure.md +32 -31
- package/assets/docs/workflows/projects/lifecycle.md +45 -0
- package/assets/docs/workflows/projects/picking-up-projects.md +14 -0
- package/assets/docs/workflows/skills/explainer-kit.md +10 -4
- package/assets/docs/workflows/skills/repo-improve.md +15 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-explainer-kit/SKILL.md +14 -1
- package/assets/skills/oat-explainer-kit/references/config-contract.md +12 -0
- package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +57 -10
- package/assets/skills/oat-explainer-kit/scripts/check-terminal-outcome.mjs +28 -5
- package/assets/skills/oat-explainer-kit/scripts/probe-recap-seams.mjs +371 -0
- package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +123 -1
- package/assets/skills/oat-project-autonomous/SKILL.md +10 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +121 -121
- package/assets/skills/oat-project-complete/SKILL.md +134 -4
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +121 -121
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +38 -6
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +121 -121
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +121 -121
- package/assets/skills/oat-project-next/SKILL.md +62 -19
- package/assets/skills/oat-project-plan/SKILL.md +31 -5
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +121 -121
- package/assets/skills/oat-project-progress/SKILL.md +12 -3
- package/assets/skills/oat-project-quick-start/SKILL.md +264 -4
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +121 -121
- package/assets/skills/oat-project-summary/SKILL.md +34 -23
- package/assets/skills/oat-repo-improve/SKILL.md +40 -5
- package/assets/skills/oat-repo-improve/references/plan-template.md +84 -7
- package/dist/commands/config/index.d.ts +1 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +401 -18
- package/dist/commands/gate/index.d.ts +3 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +699 -211
- package/dist/commands/init/tools/shared/skill-script-references.d.ts +126 -0
- package/dist/commands/init/tools/shared/skill-script-references.d.ts.map +1 -0
- package/dist/commands/init/tools/shared/skill-script-references.js +311 -0
- package/dist/commands/instructions/instructions.types.d.ts +63 -0
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.d.ts +51 -2
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.js +201 -4
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
- package/dist/commands/instructions/sync/sync.js +12 -1
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
- package/dist/commands/instructions/validate/validate.js +12 -1
- package/dist/commands/project/log/append.d.ts +195 -0
- package/dist/commands/project/log/append.d.ts.map +1 -1
- package/dist/commands/project/log/append.js +1034 -11
- package/dist/config/oat-config.d.ts +41 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +111 -0
- package/package.json +2 -2
|
@@ -12,6 +12,13 @@ export interface OatDocumentationConfig {
|
|
|
12
12
|
* and order-preserving.
|
|
13
13
|
*/
|
|
14
14
|
excludes?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Repo-relative directories `oat instructions sync` and
|
|
17
|
+
* `oat instructions validate` must not treat as pointer sites, additive to
|
|
18
|
+
* the derived documentation content root they skip by default. Trimmed,
|
|
19
|
+
* de-duplicated, and order-preserving.
|
|
20
|
+
*/
|
|
21
|
+
instructionPointerExcludes?: string[];
|
|
15
22
|
}
|
|
16
23
|
export interface OatGitConfig {
|
|
17
24
|
defaultBranch?: string;
|
|
@@ -209,6 +216,30 @@ export declare function normalizeProjectPath(repoRoot: string, pathValue: string
|
|
|
209
216
|
export declare function resolveLocalPaths(config: OatConfig): string[];
|
|
210
217
|
export declare function readOatConfig(repoRoot: string): Promise<OatConfig>;
|
|
211
218
|
export declare function readOatConfigForDefaultScopeRepair(repoRoot: string): Promise<OatConfig>;
|
|
219
|
+
/**
|
|
220
|
+
* The documentation *content* root: `<documentation.root>/docs` when that path
|
|
221
|
+
* is a directory, otherwise `documentation.root` itself.
|
|
222
|
+
*
|
|
223
|
+
* `documentation.root` canonically names the docs **app root** written by
|
|
224
|
+
* `oat docs init`; the `<root>/docs` preference is compatibility behavior for
|
|
225
|
+
* legacy configs whose `root` names a docs source directory. This is the same
|
|
226
|
+
* rule `oat docs generate-index` applies when `--docs-dir` is omitted
|
|
227
|
+
* (`resolveIndexGeneratePaths` in `commands/docs/index-generate/index.ts`),
|
|
228
|
+
* stated here so the index generator, `oat instructions sync`, and
|
|
229
|
+
* `oat instructions validate` cannot drift into two different meanings of
|
|
230
|
+
* "the docs tree"; `oat-config.test.ts` asserts the two agree on shared
|
|
231
|
+
* fixtures.
|
|
232
|
+
*
|
|
233
|
+
* The app root is deliberately not the answer when a `docs` child exists:
|
|
234
|
+
* `apps/oat-docs/AGENTS.md` is an instruction file, not a documentation page,
|
|
235
|
+
* and must keep receiving pointers.
|
|
236
|
+
*
|
|
237
|
+
* Returns a repo-relative POSIX path, or null when `documentation.root` is
|
|
238
|
+
* unset, empty, resolves to the repository root, or escapes the repository.
|
|
239
|
+
*/
|
|
240
|
+
export declare function resolveDocumentationContentRoot(repoRoot: string, config: OatConfig, dependencies?: {
|
|
241
|
+
dirExists?: (path: string) => Promise<boolean>;
|
|
242
|
+
}): Promise<string | null>;
|
|
212
243
|
/**
|
|
213
244
|
* Read shared config with an unusable `documentation.excludes` dropped, so
|
|
214
245
|
* `oat config set documentation.excludes ...` can perform the repair its own
|
|
@@ -217,6 +248,16 @@ export declare function readOatConfigForDefaultScopeRepair(repoRoot: string): Pr
|
|
|
217
248
|
* itself blocked by the invalid value.
|
|
218
249
|
*/
|
|
219
250
|
export declare function readOatConfigForDocumentationExcludesRepair(repoRoot: string): Promise<OatConfig>;
|
|
251
|
+
/**
|
|
252
|
+
* Read the shared config with a malformed
|
|
253
|
+
* `documentation.instructionPointerExcludes` dropped.
|
|
254
|
+
*
|
|
255
|
+
* The sibling of `readOatConfigForDocumentationExcludesRepair`, and it exists
|
|
256
|
+
* for the same reason: this key's own validation error now names
|
|
257
|
+
* `oat config set` as the repair, and a strict read would refuse to load the
|
|
258
|
+
* very value the operator is trying to replace or remove.
|
|
259
|
+
*/
|
|
260
|
+
export declare function readOatConfigForInstructionPointerExcludesRepair(repoRoot: string): Promise<OatConfig>;
|
|
220
261
|
export declare function readOatLocalConfig(repoRoot: string): Promise<OatLocalConfig>;
|
|
221
262
|
export declare function writeOatConfig(repoRoot: string, config: OatConfig): Promise<void>;
|
|
222
263
|
export declare function writeOatLocalConfig(repoRoot: string, config: OatLocalConfig): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,iCAAiC,EACjC,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,gCA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,EAAE,MAAM,EAChB,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,OAAO,CAAC,IAAI,CAAC,CAYf;AA4ED,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,UAAU,CAAC,CAarB;AAED,wBAAsB,eAAe,CACnC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA6B5D"}
|
|
@@ -658,6 +658,44 @@ function normalizeDocumentationExcludes(value, configPath) {
|
|
|
658
658
|
}
|
|
659
659
|
return normalized;
|
|
660
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* Parse `documentation.instructionPointerExcludes` into a trimmed,
|
|
663
|
+
* de-duplicated, order-preserving list.
|
|
664
|
+
*
|
|
665
|
+
* Fails closed, exactly like its `documentation.excludes` sibling above and for
|
|
666
|
+
* the same reason: a key whose whole job is to keep files out of a tree must
|
|
667
|
+
* never silently protect less than the operator asked for. An absent key and an
|
|
668
|
+
* empty array are both "no extra exclusions"; a present-but-malformed value is
|
|
669
|
+
* an error.
|
|
670
|
+
*
|
|
671
|
+
* The repair instruction names `oat config set` first and the file second: the
|
|
672
|
+
* command is catalogued (`oat config set documentation.instructionPointerExcludes`),
|
|
673
|
+
* and an operator repairing a malformed value should reach for the validated
|
|
674
|
+
* write path before hand-editing JSON.
|
|
675
|
+
*/
|
|
676
|
+
function normalizeInstructionPointerExcludes(value, configPath) {
|
|
677
|
+
if (value === undefined) {
|
|
678
|
+
return [];
|
|
679
|
+
}
|
|
680
|
+
const invalid = () => {
|
|
681
|
+
throw new CliError(`Invalid documentation.instructionPointerExcludes in ${configPath}: expected an array of non-empty strings. ` +
|
|
682
|
+
'Repair it with `oat config set documentation.instructionPointerExcludes <path[,path...]>` (an empty value clears the key), or by editing that file.', 2);
|
|
683
|
+
};
|
|
684
|
+
if (!Array.isArray(value)) {
|
|
685
|
+
invalid();
|
|
686
|
+
}
|
|
687
|
+
const normalized = [];
|
|
688
|
+
for (const entry of value) {
|
|
689
|
+
if (typeof entry !== 'string' || !entry.trim()) {
|
|
690
|
+
invalid();
|
|
691
|
+
}
|
|
692
|
+
const trimmedEntry = entry.trim();
|
|
693
|
+
if (!normalized.includes(trimmedEntry)) {
|
|
694
|
+
normalized.push(trimmedEntry);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return normalized;
|
|
698
|
+
}
|
|
661
699
|
function normalizeOatConfig(parsed, configPath = '.oat/config.json') {
|
|
662
700
|
const next = { ...DEFAULT_OAT_CONFIG };
|
|
663
701
|
if (!isRecord(parsed)) {
|
|
@@ -777,6 +815,10 @@ function normalizeOatConfig(parsed, configPath = '.oat/config.json') {
|
|
|
777
815
|
if (excludes.length > 0) {
|
|
778
816
|
doc.excludes = excludes;
|
|
779
817
|
}
|
|
818
|
+
const instructionPointerExcludes = normalizeInstructionPointerExcludes(parsed.documentation.instructionPointerExcludes, configPath);
|
|
819
|
+
if (instructionPointerExcludes.length > 0) {
|
|
820
|
+
doc.instructionPointerExcludes = instructionPointerExcludes;
|
|
821
|
+
}
|
|
780
822
|
if (Object.keys(doc).length > 0) {
|
|
781
823
|
next.documentation = doc;
|
|
782
824
|
}
|
|
@@ -864,6 +906,48 @@ export async function readOatConfigForDefaultScopeRepair(repoRoot) {
|
|
|
864
906
|
throw error;
|
|
865
907
|
}
|
|
866
908
|
}
|
|
909
|
+
/**
|
|
910
|
+
* The documentation *content* root: `<documentation.root>/docs` when that path
|
|
911
|
+
* is a directory, otherwise `documentation.root` itself.
|
|
912
|
+
*
|
|
913
|
+
* `documentation.root` canonically names the docs **app root** written by
|
|
914
|
+
* `oat docs init`; the `<root>/docs` preference is compatibility behavior for
|
|
915
|
+
* legacy configs whose `root` names a docs source directory. This is the same
|
|
916
|
+
* rule `oat docs generate-index` applies when `--docs-dir` is omitted
|
|
917
|
+
* (`resolveIndexGeneratePaths` in `commands/docs/index-generate/index.ts`),
|
|
918
|
+
* stated here so the index generator, `oat instructions sync`, and
|
|
919
|
+
* `oat instructions validate` cannot drift into two different meanings of
|
|
920
|
+
* "the docs tree"; `oat-config.test.ts` asserts the two agree on shared
|
|
921
|
+
* fixtures.
|
|
922
|
+
*
|
|
923
|
+
* The app root is deliberately not the answer when a `docs` child exists:
|
|
924
|
+
* `apps/oat-docs/AGENTS.md` is an instruction file, not a documentation page,
|
|
925
|
+
* and must keep receiving pointers.
|
|
926
|
+
*
|
|
927
|
+
* Returns a repo-relative POSIX path, or null when `documentation.root` is
|
|
928
|
+
* unset, empty, resolves to the repository root, or escapes the repository.
|
|
929
|
+
*/
|
|
930
|
+
export async function resolveDocumentationContentRoot(repoRoot, config, dependencies = {}) {
|
|
931
|
+
const configuredRoot = config.documentation?.root?.trim();
|
|
932
|
+
if (!configuredRoot) {
|
|
933
|
+
return null;
|
|
934
|
+
}
|
|
935
|
+
const absoluteRoot = resolve(repoRoot, configuredRoot);
|
|
936
|
+
const docsChild = join(absoluteRoot, 'docs');
|
|
937
|
+
// Callers that simulate a filesystem (the instruction-sync tests inject
|
|
938
|
+
// `stat`) pass their own directory probe so the `<root>/docs` rule sees the
|
|
939
|
+
// same filesystem the rest of the scan does; the default is the real one.
|
|
940
|
+
const probe = dependencies.dirExists ?? dirExists;
|
|
941
|
+
const contentRoot = (await probe(docsChild)) ? docsChild : absoluteRoot;
|
|
942
|
+
const relativeContentRoot = normalizeToPosixPath(relative(repoRoot, contentRoot));
|
|
943
|
+
if (!relativeContentRoot ||
|
|
944
|
+
relativeContentRoot === '.' ||
|
|
945
|
+
relativeContentRoot === '..' ||
|
|
946
|
+
relativeContentRoot.startsWith('../')) {
|
|
947
|
+
return null;
|
|
948
|
+
}
|
|
949
|
+
return relativeContentRoot;
|
|
950
|
+
}
|
|
867
951
|
/**
|
|
868
952
|
* Read shared config with an unusable `documentation.excludes` dropped, so
|
|
869
953
|
* `oat config set documentation.excludes ...` can perform the repair its own
|
|
@@ -889,6 +973,33 @@ export async function readOatConfigForDocumentationExcludesRepair(repoRoot) {
|
|
|
889
973
|
throw error;
|
|
890
974
|
}
|
|
891
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* Read the shared config with a malformed
|
|
978
|
+
* `documentation.instructionPointerExcludes` dropped.
|
|
979
|
+
*
|
|
980
|
+
* The sibling of `readOatConfigForDocumentationExcludesRepair`, and it exists
|
|
981
|
+
* for the same reason: this key's own validation error now names
|
|
982
|
+
* `oat config set` as the repair, and a strict read would refuse to load the
|
|
983
|
+
* very value the operator is trying to replace or remove.
|
|
984
|
+
*/
|
|
985
|
+
export async function readOatConfigForInstructionPointerExcludesRepair(repoRoot) {
|
|
986
|
+
const configPath = getConfigPath(repoRoot);
|
|
987
|
+
try {
|
|
988
|
+
const raw = await readFile(configPath, 'utf8');
|
|
989
|
+
const parsed = parseJsonConfig(raw, configPath);
|
|
990
|
+
if (isRecord(parsed) && isRecord(parsed.documentation)) {
|
|
991
|
+
const { instructionPointerExcludes: _invalidInstructionPointerExcludes, ...documentation } = parsed.documentation;
|
|
992
|
+
return normalizeOatConfig({ ...parsed, documentation }, configPath);
|
|
993
|
+
}
|
|
994
|
+
return normalizeOatConfig(parsed, configPath);
|
|
995
|
+
}
|
|
996
|
+
catch (error) {
|
|
997
|
+
if (isMissingFileError(error)) {
|
|
998
|
+
return { ...DEFAULT_OAT_CONFIG };
|
|
999
|
+
}
|
|
1000
|
+
throw error;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
892
1003
|
export async function readOatLocalConfig(repoRoot) {
|
|
893
1004
|
const configPath = getLocalConfigPath(repoRoot);
|
|
894
1005
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.63",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.2.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.2.63"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|