@open-agent-toolkit/cli 0.2.25 → 0.2.27
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/NOTICES.md +156 -0
- package/assets/docs/cli-utilities/configuration.md +42 -11
- package/assets/docs/contributing/explainer-kit-verification.md +125 -0
- package/assets/docs/contributing/index.md +1 -0
- package/assets/docs/reference/troubleshooting.md +47 -0
- package/assets/docs/workflows/projects/artifacts.md +24 -6
- package/assets/docs/workflows/projects/dispatch-ceiling.md +67 -16
- package/assets/docs/workflows/skills/explainer-kit-providers.md +144 -0
- package/assets/docs/workflows/skills/explainer-kit.md +121 -69
- package/assets/docs/workflows/skills/index.md +1 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/explainer-kit/SKILL.md +18 -3
- package/assets/skills/explainer-kit/recipes/project-recap.json +43 -16
- package/assets/skills/explainer-kit/references/contracts.md +167 -20
- package/assets/skills/explainer-kit/references/golden-conformance.md +80 -0
- package/assets/skills/explainer-kit/references/visual-authoring.md +92 -0
- package/assets/skills/explainer-kit/references/visual-review.md +57 -0
- package/assets/skills/explainer-kit/schemas/author-request.v2.schema.json +172 -1
- package/assets/skills/explainer-kit/schemas/build-record.schema.json +7 -1
- package/assets/skills/explainer-kit/schemas/fact-base.schema.json +38 -2
- package/assets/skills/explainer-kit/schemas/manifest.schema.json +25 -1
- package/assets/skills/explainer-kit/schemas/run-request.schema.json +4 -0
- package/assets/skills/explainer-kit/schemas/set-plan.v1.schema.json +149 -0
- package/assets/skills/explainer-kit/schemas/visual-review-request.v1.schema.json +117 -0
- package/assets/skills/explainer-kit/schemas/visual-review-result.v1.schema.json +80 -0
- package/assets/skills/explainer-kit/scripts/lib/browser-runtime.mjs +148 -4
- package/assets/skills/explainer-kit/scripts/lib/catalog.mjs +243 -0
- package/assets/skills/explainer-kit/scripts/lib/contracts.mjs +586 -8
- package/assets/skills/explainer-kit/scripts/lib/diagram.mjs +285 -8
- package/assets/skills/explainer-kit/scripts/lib/durability.mjs +35 -0
- package/assets/skills/explainer-kit/scripts/lib/fact-base.mjs +144 -8
- package/assets/skills/explainer-kit/scripts/lib/package-coverage.mjs +379 -0
- package/assets/skills/explainer-kit/scripts/lib/png.mjs +287 -0
- package/assets/skills/explainer-kit/scripts/lib/qa.mjs +280 -8
- package/assets/skills/explainer-kit/scripts/lib/recipes.mjs +132 -3
- package/assets/skills/explainer-kit/scripts/lib/records.mjs +513 -21
- package/assets/skills/explainer-kit/scripts/lib/render.mjs +67 -3
- package/assets/skills/explainer-kit/scripts/lib/s3-static.mjs +43 -1
- package/assets/skills/explainer-kit/scripts/lib/set-plan.mjs +208 -0
- package/assets/skills/explainer-kit/scripts/lib/source-backlinks.mjs +218 -0
- package/assets/skills/explainer-kit/scripts/lib/visual-review.mjs +380 -0
- package/assets/skills/explainer-kit/scripts/render-qa.mjs +48 -10
- package/assets/skills/explainer-kit/scripts/run.mjs +859 -134
- package/assets/skills/oat-explainer-kit/SKILL.md +40 -12
- package/assets/skills/oat-explainer-kit/references/author-callback.md +12 -10
- package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +40 -2
- package/assets/skills/oat-explainer-kit/references/visual-review-callback.md +72 -0
- package/assets/skills/oat-explainer-kit/scripts/bind-project-sources.mjs +167 -5
- package/assets/skills/oat-explainer-kit/scripts/finalize-tracked-run.mjs +92 -5
- package/assets/skills/oat-explainer-kit/scripts/run.mjs +324 -2
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/SKILL.md +9 -11
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +18 -9
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/references/phase-execution.md +13 -4
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +27 -3
- package/dist/commands/project/archive/archive-utils.d.ts +1 -0
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
- package/dist/commands/project/archive/archive-utils.js +109 -42
- package/dist/commands/project/archive/explainer-package-coverage.d.ts +14 -0
- package/dist/commands/project/archive/explainer-package-coverage.d.ts.map +1 -0
- package/dist/commands/project/archive/explainer-package-coverage.js +27 -0
- package/dist/commands/project/archive/explainer-source-backlinks.d.ts +18 -0
- package/dist/commands/project/archive/explainer-source-backlinks.d.ts.map +1 -0
- package/dist/commands/project/archive/explainer-source-backlinks.js +27 -0
- package/dist/commands/project/archive/push-runner.d.ts +2 -1
- package/dist/commands/project/archive/push-runner.d.ts.map +1 -1
- package/dist/commands/project/archive/push-runner.js +5 -1
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +90 -0
- package/dist/config/dispatch-notices.d.ts +8 -0
- package/dist/config/dispatch-notices.d.ts.map +1 -0
- package/dist/config/dispatch-notices.js +79 -0
- package/dist/config/dispatch-policy-options.d.ts +2 -0
- package/dist/config/dispatch-policy-options.d.ts.map +1 -1
- package/dist/config/dispatch-policy-options.js +14 -2
- package/dist/providers/identity/dispatch-report.d.ts +17 -0
- package/dist/providers/identity/dispatch-report.d.ts.map +1 -1
- package/dist/providers/identity/dispatch-report.js +30 -0
- package/dist/release/public-package-contract.d.ts +6 -0
- package/dist/release/public-package-contract.d.ts.map +1 -1
- package/dist/release/public-package-contract.js +75 -0
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const SOURCE_BACKLINK_CONTRACT_VERSION = "explainer-kit.source-backlinks/v1";
|
|
2
|
+
export interface CanonicalSourceBacklink {
|
|
3
|
+
repository: string;
|
|
4
|
+
revision: string;
|
|
5
|
+
path: string;
|
|
6
|
+
lineRange: {
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
};
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ExplainerSourceBacklinks {
|
|
13
|
+
SOURCE_BACKLINK_CONTRACT_VERSION: typeof SOURCE_BACKLINK_CONTRACT_VERSION;
|
|
14
|
+
parseCanonicalGithubBlobUrl: (value: string) => CanonicalSourceBacklink;
|
|
15
|
+
}
|
|
16
|
+
export declare function loadExplainerSourceBacklinks(): Promise<ExplainerSourceBacklinks>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=explainer-source-backlinks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explainer-source-backlinks.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/explainer-source-backlinks.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,gCAAgC,sCAAsC,CAAC;AAE7E,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC,gCAAgC,EAAE,OAAO,gCAAgC,CAAC;IAC1E,2BAA2B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,uBAAuB,CAAC;CACzE;AAID,wBAAgB,4BAA4B,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAGhF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
import { CliError } from '../../../errors/cli-error.js';
|
|
4
|
+
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
5
|
+
const SOURCE_BACKLINK_CONTRACT_VERSION = 'explainer-kit.source-backlinks/v1';
|
|
6
|
+
let cachedBacklinks;
|
|
7
|
+
export function loadExplainerSourceBacklinks() {
|
|
8
|
+
cachedBacklinks ??= loadGeneratedBacklinks();
|
|
9
|
+
return cachedBacklinks;
|
|
10
|
+
}
|
|
11
|
+
async function loadGeneratedBacklinks() {
|
|
12
|
+
const assetsRoot = await resolveAssetsRoot();
|
|
13
|
+
const modulePath = join(assetsRoot, 'skills', 'explainer-kit', 'scripts', 'lib', 'source-backlinks.mjs');
|
|
14
|
+
let loaded;
|
|
15
|
+
try {
|
|
16
|
+
loaded = (await import(pathToFileURL(modulePath).href));
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
throw new CliError(`Bundled explainer source backlink contract could not be loaded: ${error instanceof Error ? error.message : String(error)}`, 2);
|
|
20
|
+
}
|
|
21
|
+
if (loaded.SOURCE_BACKLINK_CONTRACT_VERSION !==
|
|
22
|
+
SOURCE_BACKLINK_CONTRACT_VERSION ||
|
|
23
|
+
typeof loaded.parseCanonicalGithubBlobUrl !== 'function') {
|
|
24
|
+
throw new CliError(`Bundled assets must provide ${SOURCE_BACKLINK_CONTRACT_VERSION}.`, 2);
|
|
25
|
+
}
|
|
26
|
+
return loaded;
|
|
27
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildCommandContext, type CommandContext } from '../../../app/command-context.js';
|
|
2
2
|
import { type OatConfig, type OatLocalConfig } from '../../../config/oat-config.js';
|
|
3
|
-
import { resolveArchiveProjectTarget, resolvePrimaryRepoRoot, type ArchiveProjectOnCompletionOptions, type ArchiveProjectOnCompletionResult } from './archive-utils.js';
|
|
3
|
+
import { resolveArchiveProjectTarget, resolvePrimaryRepoRoot, verifySelectedProjectRecapForArchive, type ArchiveProjectOnCompletionOptions, type ArchiveProjectOnCompletionResult } from './archive-utils.js';
|
|
4
4
|
export interface ArchivePushOptions {
|
|
5
5
|
dryRun?: boolean;
|
|
6
6
|
projectRecapRun?: string;
|
|
@@ -13,6 +13,7 @@ export interface ProjectArchivePushCommandDependencies {
|
|
|
13
13
|
resolveProjectsRoot: (repoRoot: string, env: NodeJS.ProcessEnv) => Promise<string>;
|
|
14
14
|
resolvePrimaryRepoRoot: typeof resolvePrimaryRepoRoot;
|
|
15
15
|
resolveArchiveProjectTarget: typeof resolveArchiveProjectTarget;
|
|
16
|
+
verifySelectedProjectRecapForArchive: typeof verifySelectedProjectRecapForArchive;
|
|
16
17
|
archiveProjectOnCompletion: (options: ArchiveProjectOnCompletionOptions) => Promise<ArchiveProjectOnCompletionResult>;
|
|
17
18
|
processEnv: NodeJS.ProcessEnv;
|
|
18
19
|
timestamp: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-runner.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/push-runner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAKL,2BAA2B,EAC3B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"push-runner.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/push-runner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAKL,2BAA2B,EAC3B,sBAAsB,EACtB,oCAAoC,EAEpC,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EAEtC,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qCAAqC;IACpD,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,2BAA2B,EAAE,OAAO,2BAA2B,CAAC;IAChE,oCAAoC,EAAE,OAAO,oCAAoC,CAAC;IAClF,0BAA0B,EAAE,CAC1B,OAAO,EAAE,iCAAiC,KACvC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;IAC9B,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB;AAmBD,wBAAgB,4CAA4C,IAAI,qCAAqC,CAcpG;AAkJD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,qCAAqC,EACnD,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CA0Ef"}
|
|
@@ -4,7 +4,7 @@ import { resolveProjectsRoot } from '../../shared/oat-paths.js';
|
|
|
4
4
|
import { readOatConfig, readOatLocalConfig, } from '../../../config/oat-config.js';
|
|
5
5
|
import { CliError } from '../../../errors/cli-error.js';
|
|
6
6
|
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
7
|
-
import { archiveProjectOnCompletion, assertDurableArchiveProjectTarget, buildArchiveSnapshotName, buildProjectArchiveS3Uri, resolveArchiveProjectTarget, resolvePrimaryRepoRoot, } from './archive-utils.js';
|
|
7
|
+
import { archiveProjectOnCompletion, assertDurableArchiveProjectTarget, buildArchiveSnapshotName, buildProjectArchiveS3Uri, resolveArchiveProjectTarget, resolvePrimaryRepoRoot, verifySelectedProjectRecapForArchive, } from './archive-utils.js';
|
|
8
8
|
export function defaultProjectArchivePushCommandDependencies() {
|
|
9
9
|
return {
|
|
10
10
|
buildCommandContext,
|
|
@@ -14,6 +14,7 @@ export function defaultProjectArchivePushCommandDependencies() {
|
|
|
14
14
|
resolveProjectsRoot,
|
|
15
15
|
resolvePrimaryRepoRoot,
|
|
16
16
|
resolveArchiveProjectTarget,
|
|
17
|
+
verifySelectedProjectRecapForArchive,
|
|
17
18
|
archiveProjectOnCompletion,
|
|
18
19
|
processEnv: process.env,
|
|
19
20
|
timestamp: () => new Date().toISOString(),
|
|
@@ -121,6 +122,9 @@ export async function runArchivePushCommand(dependencies, projectPathArg, option
|
|
|
121
122
|
timestamp: dependencies.timestamp,
|
|
122
123
|
});
|
|
123
124
|
assertDurableArchiveProjectTarget(archiveTarget);
|
|
125
|
+
if (options.projectRecapRun?.trim()) {
|
|
126
|
+
await dependencies.verifySelectedProjectRecapForArchive(target.projectPath, options.projectRecapRun.trim());
|
|
127
|
+
}
|
|
124
128
|
const dryRun = options.dryRun === true || context.dryRun;
|
|
125
129
|
if (dryRun) {
|
|
126
130
|
const report = await buildDryRunReport(dependencies, repoRoot, config, target, archiveTarget);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAkB9B,OAAO,EAUL,KAAK,uBAAuB,EAY7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAyBzB,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAiC5C,UAAU,2BAA2B;IACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAkwFD,wBAAgB,mCAAmC,CACjD,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CA0GT"}
|
|
@@ -5,6 +5,7 @@ import { getFrontmatterBlock } from '../../shared/frontmatter.js';
|
|
|
5
5
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
6
6
|
import { compileDispatchPolicyPreset, } from '../../../config/dispatch-ceiling-preset.js';
|
|
7
7
|
import { normalizeDispatchMatrix } from '../../../config/dispatch-matrix.js';
|
|
8
|
+
import { effectiveTerminalReviewerTarget, formatDispatchNotices, terminalReviewerNoticeForTarget, } from '../../../config/dispatch-notices.js';
|
|
8
9
|
import { getDispatchPolicyChoices, managedDispatchPolicyValueList, renderDispatchPolicyChoicesMarkdown, } from '../../../config/dispatch-policy-options.js';
|
|
9
10
|
import { resolveActiveProject, VALID_CLAUDE_DISPATCH_CEILINGS, VALID_CODEX_DISPATCH_CEILINGS, VALID_DISPATCH_MATRIX_TIERS, VALID_MANAGED_DISPATCH_POLICIES, isWorkflowDispatchCandidateLadder, isWorkflowDispatchFallbackRoute, toWorkflowDispatchCandidateLadder, validateDispatchRouteTarget, } from '../../../config/oat-config.js';
|
|
10
11
|
import { resolveEffectiveConfig, } from '../../../config/resolve.js';
|
|
@@ -21,6 +22,13 @@ const CODEX_VALUES = [
|
|
|
21
22
|
const CLAUDE_VALUES = [
|
|
22
23
|
...VALID_CLAUDE_DISPATCH_CEILINGS,
|
|
23
24
|
];
|
|
25
|
+
const TASK_CLASSES = [
|
|
26
|
+
'mechanical-recon',
|
|
27
|
+
'intelligent-recon',
|
|
28
|
+
'default-implementation',
|
|
29
|
+
'hard-reasoning',
|
|
30
|
+
'consequential',
|
|
31
|
+
];
|
|
24
32
|
const DEFAULT_DEPENDENCIES = {
|
|
25
33
|
buildCommandContext,
|
|
26
34
|
resolveProjectRoot,
|
|
@@ -925,6 +933,43 @@ function normalizeRequestedCandidate(provider, role, options) {
|
|
|
925
933
|
}
|
|
926
934
|
return { model };
|
|
927
935
|
}
|
|
936
|
+
function normalizeClassification(provider, role, options) {
|
|
937
|
+
const hasTaskClass = options.taskClass !== undefined;
|
|
938
|
+
const hasTaskEffort = options.taskEffort !== undefined;
|
|
939
|
+
if (!hasTaskClass && !hasTaskEffort) {
|
|
940
|
+
return {
|
|
941
|
+
taskClass: null,
|
|
942
|
+
preferredEffort: null,
|
|
943
|
+
source: 'not-reported',
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
if (role === 'reviewer') {
|
|
947
|
+
throw new Error('Classification flags are not supported for reviewer routes.');
|
|
948
|
+
}
|
|
949
|
+
if (options.reportScope === undefined ||
|
|
950
|
+
(options.reportAction !== 'implementation' &&
|
|
951
|
+
options.reportAction !== 'fix')) {
|
|
952
|
+
throw new Error('Classification flags require --report-scope and an implementation or fix --report-action.');
|
|
953
|
+
}
|
|
954
|
+
const taskClassValue = options.taskClass?.trim() ?? '';
|
|
955
|
+
if (hasTaskClass &&
|
|
956
|
+
!TASK_CLASSES.includes(taskClassValue)) {
|
|
957
|
+
throw new Error(`Invalid task class "${taskClassValue}". Valid values: ${TASK_CLASSES.join(', ')}.`);
|
|
958
|
+
}
|
|
959
|
+
const taskEffort = options.taskEffort?.trim() ?? '';
|
|
960
|
+
if (hasTaskEffort && provider !== 'codex') {
|
|
961
|
+
throw new Error(`--task-effort is only valid for Codex; received ${provider}.`);
|
|
962
|
+
}
|
|
963
|
+
if (hasTaskEffort &&
|
|
964
|
+
!CODEX_VALUES.includes(taskEffort)) {
|
|
965
|
+
throw new Error(`Invalid Codex task effort "${taskEffort}". Valid values: ${CODEX_VALUES.join(', ')}.`);
|
|
966
|
+
}
|
|
967
|
+
return {
|
|
968
|
+
taskClass: hasTaskClass ? taskClassValue : null,
|
|
969
|
+
preferredEffort: hasTaskEffort ? taskEffort : null,
|
|
970
|
+
source: 'caller',
|
|
971
|
+
};
|
|
972
|
+
}
|
|
928
973
|
function normalizeEscalationLevel(value) {
|
|
929
974
|
if (value === undefined) {
|
|
930
975
|
return 0;
|
|
@@ -1337,6 +1382,10 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1337
1382
|
const providers = {
|
|
1338
1383
|
[provider]: providerResolution,
|
|
1339
1384
|
};
|
|
1385
|
+
const terminalReviewerNotice = role === 'reviewer' || options.preflight === true
|
|
1386
|
+
? terminalReviewerNoticeForTarget(effectiveTerminalReviewerTarget(provider, providerResolution.target, providerResolution.selection.selectedValue))
|
|
1387
|
+
: null;
|
|
1388
|
+
const notices = terminalReviewerNotice ? [terminalReviewerNotice] : [];
|
|
1340
1389
|
if (resolvedValue) {
|
|
1341
1390
|
const requiresManagedCodexDepth = options.preflight === true &&
|
|
1342
1391
|
provider === 'codex' &&
|
|
@@ -1358,6 +1407,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1358
1407
|
source: resolvedValue.source,
|
|
1359
1408
|
preset: resolvedValue.preset,
|
|
1360
1409
|
unresolved: true,
|
|
1410
|
+
...(notices.length > 0 ? { notices } : {}),
|
|
1361
1411
|
projectPath,
|
|
1362
1412
|
providerDefaultEffort,
|
|
1363
1413
|
matrix: resolvedValue.matrix,
|
|
@@ -1399,6 +1449,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1399
1449
|
source: resolvedValue.source,
|
|
1400
1450
|
preset: resolvedValue.preset,
|
|
1401
1451
|
unresolved: true,
|
|
1452
|
+
...(notices.length > 0 ? { notices } : {}),
|
|
1402
1453
|
projectPath,
|
|
1403
1454
|
providerDefaultEffort,
|
|
1404
1455
|
matrix: resolvedValue.matrixCompatibility ??
|
|
@@ -1419,6 +1470,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1419
1470
|
source: resolvedValue.source,
|
|
1420
1471
|
preset: resolvedValue.preset,
|
|
1421
1472
|
unresolved: false,
|
|
1473
|
+
...(notices.length > 0 ? { notices } : {}),
|
|
1422
1474
|
projectPath,
|
|
1423
1475
|
providerDefaultEffort,
|
|
1424
1476
|
matrix: resolvedValue.matrixCompatibility ??
|
|
@@ -1448,6 +1500,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1448
1500
|
source: policyResolution?.source ?? null,
|
|
1449
1501
|
preset: policyResolution?.preset ?? null,
|
|
1450
1502
|
unresolved: true,
|
|
1503
|
+
...(notices.length > 0 ? { notices } : {}),
|
|
1451
1504
|
projectPath,
|
|
1452
1505
|
providerDefaultEffort,
|
|
1453
1506
|
matrix: reportedMatrix,
|
|
@@ -1657,6 +1710,9 @@ function writeHumanResolution(context, resolution) {
|
|
|
1657
1710
|
context.logger.info(`Selected dispatch value: ${providerResolution.selection.selectedValue}`);
|
|
1658
1711
|
}
|
|
1659
1712
|
}
|
|
1713
|
+
if (resolution.notices && resolution.notices.length > 0) {
|
|
1714
|
+
context.logger.info(formatDispatchNotices(resolution.notices));
|
|
1715
|
+
}
|
|
1660
1716
|
}
|
|
1661
1717
|
function reportRole(action) {
|
|
1662
1718
|
if (action === 'review') {
|
|
@@ -1686,6 +1742,9 @@ function reportControl(axis, dispatchArgs, reason) {
|
|
|
1686
1742
|
return { value: null, mechanism: 'base-role', reason };
|
|
1687
1743
|
}
|
|
1688
1744
|
function buildResolutionReport(resolution, options) {
|
|
1745
|
+
const requestedClassification = options.taskClass !== undefined || options.taskEffort !== undefined
|
|
1746
|
+
? normalizeClassification(resolution.provider, normalizeRole(options.role), options)
|
|
1747
|
+
: null;
|
|
1689
1748
|
const hasScope = options.reportScope !== undefined;
|
|
1690
1749
|
const hasAction = options.reportAction !== undefined;
|
|
1691
1750
|
if (!hasScope && !hasAction) {
|
|
@@ -1708,11 +1767,40 @@ function buildResolutionReport(resolution, options) {
|
|
|
1708
1767
|
if (providerResolution.selection.role !== expectedResolverRole) {
|
|
1709
1768
|
throw new Error(`Invalid dispatch report action/role context: ${action}/${role} requires resolver role ${expectedResolverRole}, received ${providerResolution.selection.role}.`);
|
|
1710
1769
|
}
|
|
1770
|
+
const classification = requestedClassification ??
|
|
1771
|
+
normalizeClassification(resolution.provider, providerResolution.selection.role, options);
|
|
1772
|
+
const namedManagedImplementation = resolution.status === 'resolved' &&
|
|
1773
|
+
resolution.policyMode === 'managed' &&
|
|
1774
|
+
VALID_DISPATCH_MATRIX_TIERS.includes(resolution.policy ?? '') &&
|
|
1775
|
+
action !== 'review' &&
|
|
1776
|
+
options.preflight !== true;
|
|
1777
|
+
const notices = [...(resolution.notices ?? [])];
|
|
1778
|
+
if (namedManagedImplementation &&
|
|
1779
|
+
providerResolution.selection.requestedCandidate === null &&
|
|
1780
|
+
providerResolution.selection.preferredValue === null &&
|
|
1781
|
+
providerResolution.selection.selectedValue !== null) {
|
|
1782
|
+
notices.push({
|
|
1783
|
+
code: 'managed-capped-selection-skipped',
|
|
1784
|
+
level: 'warning',
|
|
1785
|
+
message: 'Managed capped implementation/fix dispatch resolved without an exact candidate; pass the provider candidate flags to preserve explicit selection provenance.',
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
if (namedManagedImplementation &&
|
|
1789
|
+
providerResolution.selection.requestedCandidate !== null &&
|
|
1790
|
+
classification.taskClass === null) {
|
|
1791
|
+
notices.push({
|
|
1792
|
+
code: 'managed-capped-classification-missing',
|
|
1793
|
+
level: 'warning',
|
|
1794
|
+
message: 'Managed capped implementation/fix dispatch selected an exact candidate without a task class; pass --task-class to preserve classification provenance.',
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1711
1797
|
return buildDispatchReport({
|
|
1712
1798
|
scope,
|
|
1713
1799
|
action,
|
|
1714
1800
|
role,
|
|
1715
1801
|
resolution,
|
|
1802
|
+
classification,
|
|
1803
|
+
notices,
|
|
1716
1804
|
requestedControls: {
|
|
1717
1805
|
model: reportControl(providerResolution.modelAxis, providerResolution.dispatchArgs, 'Derived from the completed resolver model-axis result.'),
|
|
1718
1806
|
effort: reportControl(providerResolution.effortAxis, providerResolution.dispatchArgs, 'Derived from the completed resolver effort-axis result.'),
|
|
@@ -1800,6 +1888,8 @@ export function createProjectDispatchCeilingCommand(overrides = {}) {
|
|
|
1800
1888
|
.addOption(new Option('--ceiling-tier <tier>', 'Invocation-only named maximum tier; never persists configuration or project state').choices([...VALID_DISPATCH_MATRIX_TIERS]))
|
|
1801
1889
|
.option('--candidate-model <model>', 'Exact configured implementer candidate model beneath the named ceiling')
|
|
1802
1890
|
.option('--candidate-effort <effort>', 'Exact configured Codex candidate effort paired with --candidate-model')
|
|
1891
|
+
.option('--task-class <class>', `Provider-neutral task classification provenance: ${TASK_CLASSES.join(', ')}`)
|
|
1892
|
+
.option('--task-effort <effort>', 'Codex-only task effort classification provenance; does not select a candidate')
|
|
1803
1893
|
.option('--escalation-level <level>', 'Ordered route entry to select; 0 is the floor and higher values advance through escalation targets')
|
|
1804
1894
|
.option('--project-path <path>', 'Read project-state policy from an explicit project path')
|
|
1805
1895
|
.option('--preflight', 'Treat unresolved non-interactive resolution as an implementation block')
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DispatchNotice } from '../providers/identity/dispatch-report.js';
|
|
2
|
+
type TerminalReviewerNoticeSource = 'bundled-recommendation' | 'effective-configuration' | 'runtime';
|
|
3
|
+
export declare function effectiveTerminalReviewerTarget(provider: string, target: unknown, selectedValue: unknown): string | null;
|
|
4
|
+
export declare function terminalReviewerNoticeForTarget(target: string | null | undefined, source?: TerminalReviewerNoticeSource): DispatchNotice | null;
|
|
5
|
+
export declare function terminalReviewerNoticesForMatrix(providers: Record<string, unknown> | null | undefined, source?: Exclude<TerminalReviewerNoticeSource, 'runtime'>): DispatchNotice[];
|
|
6
|
+
export declare function formatDispatchNotices(notices: DispatchNotice[]): string;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=dispatch-notices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-notices.d.ts","sourceRoot":"","sources":["../../src/config/dispatch-notices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,KAAK,4BAA4B,GAC7B,wBAAwB,GACxB,yBAAyB,GACzB,SAAS,CAAC;AAmDd,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,OAAO,GACrB,MAAM,GAAG,IAAI,CAYf;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,MAAM,GAAE,4BAAwC,GAC/C,cAAc,GAAG,IAAI,CAgBvB;AAED,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EACrD,MAAM,GAAE,OAAO,CACb,4BAA4B,EAC5B,SAAS,CACkB,GAC5B,cAAc,EAAE,CAYlB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAIvE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function isRecord(value) {
|
|
2
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
function candidateTarget(candidate) {
|
|
5
|
+
if (typeof candidate === 'string') {
|
|
6
|
+
return candidate;
|
|
7
|
+
}
|
|
8
|
+
if (!isRecord(candidate)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
if (Array.isArray(candidate.route)) {
|
|
12
|
+
return candidateTarget(candidate.route.at(-1));
|
|
13
|
+
}
|
|
14
|
+
return typeof candidate.model === 'string' ? candidate.model : null;
|
|
15
|
+
}
|
|
16
|
+
function terminalTarget(providerValue) {
|
|
17
|
+
if (typeof providerValue === 'string' || Array.isArray(providerValue)) {
|
|
18
|
+
return candidateTarget(Array.isArray(providerValue) ? providerValue.at(-1) : providerValue);
|
|
19
|
+
}
|
|
20
|
+
if (!isRecord(providerValue)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const frontier = providerValue.frontier;
|
|
24
|
+
if (typeof frontier === 'string' || Array.isArray(frontier)) {
|
|
25
|
+
return candidateTarget(Array.isArray(frontier) ? frontier.at(-1) : frontier);
|
|
26
|
+
}
|
|
27
|
+
if (!isRecord(frontier)) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const candidates = frontier.candidates;
|
|
31
|
+
if (Array.isArray(candidates)) {
|
|
32
|
+
return candidateTarget(candidates.at(-1));
|
|
33
|
+
}
|
|
34
|
+
return candidateTarget(frontier);
|
|
35
|
+
}
|
|
36
|
+
function isFableTarget(target) {
|
|
37
|
+
return /(^|[-_.])fable($|[-_.])/i.test(target);
|
|
38
|
+
}
|
|
39
|
+
export function effectiveTerminalReviewerTarget(provider, target, selectedValue) {
|
|
40
|
+
const routedTarget = candidateTarget(target);
|
|
41
|
+
if (routedTarget) {
|
|
42
|
+
return routedTarget;
|
|
43
|
+
}
|
|
44
|
+
if ((provider === 'claude' || provider === 'cursor') &&
|
|
45
|
+
typeof selectedValue === 'string') {
|
|
46
|
+
return selectedValue;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
export function terminalReviewerNoticeForTarget(target, source = 'runtime') {
|
|
51
|
+
if (!target || !isFableTarget(target)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const context = source === 'bundled-recommendation'
|
|
55
|
+
? 'bundled recommendation'
|
|
56
|
+
: source === 'effective-configuration'
|
|
57
|
+
? 'effective post-adoption configuration'
|
|
58
|
+
: 'effective runtime resolution';
|
|
59
|
+
return {
|
|
60
|
+
code: 'terminal-reviewer-eligibility',
|
|
61
|
+
level: 'advisory',
|
|
62
|
+
message: `Terminal reviewer target ${target} in the ${context} may require model access; the organization is responsible for confirming that its applicable retention policy permits use. OAT does not determine model access or organizational retention eligibility.`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function terminalReviewerNoticesForMatrix(providers, source = 'effective-configuration') {
|
|
66
|
+
const notices = [];
|
|
67
|
+
for (const providerValue of Object.values(providers ?? {})) {
|
|
68
|
+
const notice = terminalReviewerNoticeForTarget(terminalTarget(providerValue), source);
|
|
69
|
+
if (notice) {
|
|
70
|
+
notices.push(notice);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return notices;
|
|
74
|
+
}
|
|
75
|
+
export function formatDispatchNotices(notices) {
|
|
76
|
+
return notices
|
|
77
|
+
.map((notice) => `[${notice.level}] ${notice.code}: ${notice.message}`)
|
|
78
|
+
.join('\n');
|
|
79
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DispatchNotice } from '../providers/identity/dispatch-report.js';
|
|
1
2
|
import { type WorkflowManagedDispatchPolicy } from './oat-config.js';
|
|
2
3
|
export type DispatchPolicyChoiceKind = 'managed-capped' | 'managed-uncapped' | 'inherit' | 'unresolved';
|
|
3
4
|
export interface DispatchPolicyChoice {
|
|
@@ -6,6 +7,7 @@ export interface DispatchPolicyChoice {
|
|
|
6
7
|
kind: DispatchPolicyChoiceKind;
|
|
7
8
|
runtimePolicy: boolean;
|
|
8
9
|
description: string;
|
|
10
|
+
notices: DispatchNotice[];
|
|
9
11
|
policy?: WorkflowManagedDispatchPolicy;
|
|
10
12
|
providers?: {
|
|
11
13
|
codex: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-policy-options.d.ts","sourceRoot":"","sources":["../../src/config/dispatch-policy-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dispatch-policy-options.d.ts","sourceRoot":"","sources":["../../src/config/dispatch-policy-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAU1E,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,wBAAwB,GAChC,gBAAgB,GAChB,kBAAkB,GAClB,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,wBAAwB,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,SAAS,CAAC,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AA4DD,wBAAgB,wBAAwB,IAAI,oBAAoB,EAAE,CAsBjE;AAED,wBAAgB,8BAA8B,CAAC,SAAS,SAAQ,GAAG,MAAM,CAExE;AAED,wBAAgB,6BAA6B,IAAI,MAAM,CAOtD;AAED,wBAAgB,+BAA+B,IAAI,MAAM,CASxD;AAYD,wBAAgB,mCAAmC,CACjD,OAAO,yBAA6B,GACnC,MAAM,CAaR"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { dispatchPolicyProviderTargets, } from './dispatch-ceiling-preset.js';
|
|
2
|
+
import { formatDispatchNotices, terminalReviewerNoticeForTarget, } from './dispatch-notices.js';
|
|
2
3
|
import { VALID_MANAGED_DISPATCH_POLICIES, } from './oat-config.js';
|
|
3
4
|
const MANAGED_POLICY_DESCRIPTIONS = {
|
|
4
5
|
economy: 'Managed capped policy for lower-cost implementation and review dispatch.',
|
|
@@ -19,14 +20,17 @@ function isCappedManagedPolicy(policy) {
|
|
|
19
20
|
}
|
|
20
21
|
function managedChoice(policy) {
|
|
21
22
|
if (isCappedManagedPolicy(policy)) {
|
|
23
|
+
const providers = dispatchPolicyProviderTargets(policy);
|
|
24
|
+
const terminalNotice = terminalReviewerNoticeForTarget(providers.claude, 'bundled-recommendation');
|
|
22
25
|
return {
|
|
23
26
|
value: policy,
|
|
24
27
|
label: MANAGED_POLICY_LABELS[policy],
|
|
25
28
|
kind: 'managed-capped',
|
|
26
29
|
runtimePolicy: true,
|
|
27
30
|
description: MANAGED_POLICY_DESCRIPTIONS[policy],
|
|
31
|
+
notices: terminalNotice ? [terminalNotice] : [],
|
|
28
32
|
policy,
|
|
29
|
-
providers
|
|
33
|
+
providers,
|
|
30
34
|
};
|
|
31
35
|
}
|
|
32
36
|
return {
|
|
@@ -35,6 +39,7 @@ function managedChoice(policy) {
|
|
|
35
39
|
kind: 'managed-uncapped',
|
|
36
40
|
runtimePolicy: true,
|
|
37
41
|
description: MANAGED_POLICY_DESCRIPTIONS[policy],
|
|
42
|
+
notices: [],
|
|
38
43
|
policy,
|
|
39
44
|
};
|
|
40
45
|
}
|
|
@@ -47,6 +52,7 @@ export function getDispatchPolicyChoices() {
|
|
|
47
52
|
kind: 'inherit',
|
|
48
53
|
runtimePolicy: true,
|
|
49
54
|
description: 'OAT does not choose model or effort. Subagents use the current host/provider default behavior, such as parent session model, base Codex role defaults, or provider config.',
|
|
55
|
+
notices: [],
|
|
50
56
|
},
|
|
51
57
|
{
|
|
52
58
|
value: 'leave-unresolved',
|
|
@@ -54,6 +60,7 @@ export function getDispatchPolicyChoices() {
|
|
|
54
60
|
kind: 'unresolved',
|
|
55
61
|
runtimePolicy: false,
|
|
56
62
|
description: 'Planning records no policy as a planning/preflight deferral. Implementation preflight must block until a policy is configured or explicitly selected.',
|
|
63
|
+
notices: [],
|
|
57
64
|
},
|
|
58
65
|
];
|
|
59
66
|
}
|
|
@@ -91,6 +98,11 @@ export function renderDispatchPolicyChoicesMarkdown(choices = getDispatchPolicyC
|
|
|
91
98
|
return [
|
|
92
99
|
'Set the dispatch policy - how OAT should choose subagent model/effort controls.',
|
|
93
100
|
'',
|
|
94
|
-
...choices.map((choice, index) =>
|
|
101
|
+
...choices.map((choice, index) => [
|
|
102
|
+
`${index + 1}. ${choice.label} - ${providerSummary(choice)}. ${choice.description}`,
|
|
103
|
+
...(choice.notices.length > 0
|
|
104
|
+
? [formatDispatchNotices(choice.notices)]
|
|
105
|
+
: []),
|
|
106
|
+
].join('\n')),
|
|
95
107
|
].join('\n');
|
|
96
108
|
}
|
|
@@ -3,6 +3,17 @@ import type { IdentityProvenance } from './provenance.js';
|
|
|
3
3
|
import type { DispatchAction, DispatchRole, DispatchStampRecord } from './stamp.js';
|
|
4
4
|
export type DispatchReportPolicyStatus = 'resolved' | 'unresolved' | 'blocked';
|
|
5
5
|
export type DispatchReportPolicyMode = 'managed' | 'inherit' | null;
|
|
6
|
+
export type DispatchTaskClass = 'mechanical-recon' | 'intelligent-recon' | 'default-implementation' | 'hard-reasoning' | 'consequential';
|
|
7
|
+
export interface DispatchReportClassification {
|
|
8
|
+
taskClass: DispatchTaskClass | null;
|
|
9
|
+
preferredEffort: string | null;
|
|
10
|
+
source: 'caller' | 'not-reported';
|
|
11
|
+
}
|
|
12
|
+
export interface DispatchNotice {
|
|
13
|
+
code: 'managed-capped-selection-skipped' | 'managed-capped-classification-missing' | 'terminal-reviewer-eligibility';
|
|
14
|
+
level: 'warning' | 'advisory';
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
6
17
|
export interface ResolvedDispatchTargetReport {
|
|
7
18
|
harness: string;
|
|
8
19
|
model?: string;
|
|
@@ -47,6 +58,7 @@ export interface DispatchReportSelectionInput {
|
|
|
47
58
|
model: string;
|
|
48
59
|
effort?: string;
|
|
49
60
|
} | null;
|
|
61
|
+
preferredValue?: string | null;
|
|
50
62
|
candidateTier: WorkflowDispatchMatrixTier | null;
|
|
51
63
|
candidateIndex: number | null;
|
|
52
64
|
ceilingTier: WorkflowDispatchMatrixTier | null;
|
|
@@ -92,6 +104,7 @@ export interface DispatchReportV1 {
|
|
|
92
104
|
model: string;
|
|
93
105
|
effort?: string;
|
|
94
106
|
} | null;
|
|
107
|
+
preferredValue: string | null;
|
|
95
108
|
candidateTier: WorkflowDispatchMatrixTier | null;
|
|
96
109
|
candidateIndex: number | null;
|
|
97
110
|
ceilingTier: WorkflowDispatchMatrixTier | null;
|
|
@@ -102,6 +115,8 @@ export interface DispatchReportV1 {
|
|
|
102
115
|
selectionBranch: string;
|
|
103
116
|
cellSource: string | null;
|
|
104
117
|
};
|
|
118
|
+
classification: DispatchReportClassification;
|
|
119
|
+
notices: DispatchNotice[];
|
|
105
120
|
requestedControls: DispatchRequestedControls;
|
|
106
121
|
configuredDefaults: DispatchConfiguredDefaults;
|
|
107
122
|
gateInvocation: Readonly<DispatchGateInvocation> | null;
|
|
@@ -114,6 +129,8 @@ export interface DispatchReportInput {
|
|
|
114
129
|
resolution: DispatchReportResolution;
|
|
115
130
|
requestedControls: DispatchRequestedControls;
|
|
116
131
|
configuredDefaults: DispatchConfiguredDefaults;
|
|
132
|
+
classification?: DispatchReportClassification;
|
|
133
|
+
notices?: DispatchNotice[];
|
|
117
134
|
gateInvocation?: DispatchGateInvocation | null;
|
|
118
135
|
runtimeIdentity?: DispatchRuntimeIdentity;
|
|
119
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-report.d.ts","sourceRoot":"","sources":["../../../src/providers/identity/dispatch-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch-report.d.ts","sourceRoot":"","sources":["../../../src/providers/identity/dispatch-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AACpE,MAAM,MAAM,iBAAiB,GACzB,kBAAkB,GAClB,mBAAmB,GACnB,wBAAwB,GACxB,gBAAgB,GAChB,eAAe,CAAC;AAEpB,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,QAAQ,GAAG,cAAc,C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AC;CAC1C;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,wBAAwB,CAAC;IACrC,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,kBAAkB,EAAE,0BAA0B,CAAC;IAC/C,cAAc,CAAC,EAAE,4BAA4B,CAAC;IAC9C,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,uBAAuB,CAAC;CAC3C;AAqND,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,mBAAmB,GACzB,gBAAgB,CA0DlB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAExE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAmErE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,GACvB,mBAAmB,CAcrB"}
|
|
@@ -10,6 +10,11 @@ const NOT_REPORTED_RUNTIME_IDENTITY = {
|
|
|
10
10
|
provenance: 'unknown',
|
|
11
11
|
confidence: 'not-reported',
|
|
12
12
|
};
|
|
13
|
+
const NOT_REPORTED_CLASSIFICATION = {
|
|
14
|
+
taskClass: null,
|
|
15
|
+
preferredEffort: null,
|
|
16
|
+
source: 'not-reported',
|
|
17
|
+
};
|
|
13
18
|
function cloneTarget(target) {
|
|
14
19
|
return target ? { ...target } : null;
|
|
15
20
|
}
|
|
@@ -58,6 +63,7 @@ function orderedReport(report) {
|
|
|
58
63
|
: { effort: report.selection.requestedCandidate.effort }),
|
|
59
64
|
}
|
|
60
65
|
: null,
|
|
66
|
+
preferredValue: report.selection.preferredValue,
|
|
61
67
|
candidateTier: report.selection.candidateTier,
|
|
62
68
|
candidateIndex: report.selection.candidateIndex,
|
|
63
69
|
ceilingTier: report.selection.ceilingTier,
|
|
@@ -68,6 +74,16 @@ function orderedReport(report) {
|
|
|
68
74
|
selectionBranch: report.selection.selectionBranch,
|
|
69
75
|
cellSource: report.selection.cellSource,
|
|
70
76
|
},
|
|
77
|
+
classification: {
|
|
78
|
+
taskClass: report.classification.taskClass,
|
|
79
|
+
preferredEffort: report.classification.preferredEffort,
|
|
80
|
+
source: report.classification.source,
|
|
81
|
+
},
|
|
82
|
+
notices: report.notices.map((notice) => ({
|
|
83
|
+
code: notice.code,
|
|
84
|
+
level: notice.level,
|
|
85
|
+
message: notice.message,
|
|
86
|
+
})),
|
|
71
87
|
requestedControls: {
|
|
72
88
|
model: {
|
|
73
89
|
value: report.requestedControls.model.value,
|
|
@@ -190,6 +206,7 @@ export function buildDispatchReport(input) {
|
|
|
190
206
|
requestedCandidate: selection.requestedCandidate
|
|
191
207
|
? { ...selection.requestedCandidate }
|
|
192
208
|
: null,
|
|
209
|
+
preferredValue: selection.preferredValue ?? null,
|
|
193
210
|
candidateTier: selection.candidateTier,
|
|
194
211
|
candidateIndex: selection.candidateIndex,
|
|
195
212
|
ceilingTier: selection.ceilingTier,
|
|
@@ -200,6 +217,10 @@ export function buildDispatchReport(input) {
|
|
|
200
217
|
selectionBranch: selection.selectionBranch,
|
|
201
218
|
cellSource: selection.cellSource,
|
|
202
219
|
},
|
|
220
|
+
classification: input.classification
|
|
221
|
+
? { ...input.classification }
|
|
222
|
+
: { ...NOT_REPORTED_CLASSIFICATION },
|
|
223
|
+
notices: (input.notices ?? []).map((notice) => ({ ...notice })),
|
|
203
224
|
requestedControls: {
|
|
204
225
|
model: { ...input.requestedControls.model },
|
|
205
226
|
effort: { ...input.requestedControls.effort },
|
|
@@ -242,6 +263,7 @@ export function formatDispatchReport(report) {
|
|
|
242
263
|
` Source: ${display(report.policy.source)}`,
|
|
243
264
|
'Selection',
|
|
244
265
|
` Requested candidate: ${formatCandidate(report.selection.requestedCandidate)}`,
|
|
266
|
+
` Legacy preferred value: ${display(report.selection.preferredValue)}`,
|
|
245
267
|
` Candidate tier / index: ${display(report.selection.candidateTier)} / ${display(report.selection.candidateIndex)}`,
|
|
246
268
|
` Ceiling tier: ${display(report.selection.ceilingTier)}`,
|
|
247
269
|
` Ceiling target: ${formatTarget(report.selection.ceilingTarget)}`,
|
|
@@ -249,6 +271,14 @@ export function formatDispatchReport(report) {
|
|
|
249
271
|
` Exact selected target: ${formatTarget(report.selection.exactSelectedTarget)}`,
|
|
250
272
|
` Mode / branch: ${report.selection.selectionMode} / ${report.selection.selectionBranch}`,
|
|
251
273
|
` Cell source: ${display(report.selection.cellSource)}`,
|
|
274
|
+
'Classification',
|
|
275
|
+
` Task class: ${display(report.classification.taskClass)}`,
|
|
276
|
+
` Preferred effort: ${display(report.classification.preferredEffort)}`,
|
|
277
|
+
` Source: ${report.classification.source}`,
|
|
278
|
+
'Notices',
|
|
279
|
+
...(report.notices.length === 0
|
|
280
|
+
? [' None']
|
|
281
|
+
: report.notices.map((notice) => ` [${notice.level}] ${notice.code}: ${notice.message}`)),
|
|
252
282
|
'Requested controls',
|
|
253
283
|
formatControl('Model', report.requestedControls.model),
|
|
254
284
|
formatControl('Effort', report.requestedControls.effort),
|
|
@@ -4,14 +4,20 @@ export interface PublicPackageContract {
|
|
|
4
4
|
role: 'cli' | 'docs-library' | 'support-library';
|
|
5
5
|
requiredMetadataFields: string[];
|
|
6
6
|
requiredPaths: string[];
|
|
7
|
+
requiredPackedTextFiles: PackedTextFileRequirement[];
|
|
7
8
|
forbiddenPathPatterns: string[];
|
|
8
9
|
versionPolicyAdditionalRoots: string[];
|
|
9
10
|
versionPolicyIgnorePatterns: string[];
|
|
10
11
|
}
|
|
12
|
+
export interface PackedTextFileRequirement {
|
|
13
|
+
path: string;
|
|
14
|
+
requiredContents: string[];
|
|
15
|
+
}
|
|
11
16
|
export declare function getPublicPackageContracts(): PublicPackageContract[];
|
|
12
17
|
export declare function findMissingMetadataFields(packageJson: Record<string, unknown>, contract: PublicPackageContract): string[];
|
|
13
18
|
export declare function findMissingPackedPaths(packedPaths: readonly string[], contract: PublicPackageContract): string[];
|
|
14
19
|
export declare function findForbiddenPackedPaths(packedPaths: readonly string[], contract: PublicPackageContract): string[];
|
|
20
|
+
export declare function findMissingPackedTextContents(packedTextFiles: Readonly<Record<string, string>>, contract: PublicPackageContract): string[];
|
|
15
21
|
export declare function findWorkspaceProtocolDependencySpecs(packageJson: Record<string, unknown>): string[];
|
|
16
22
|
export declare function findNonPublicWorkspaceDependencySpecs(packageJson: Record<string, unknown>, publicPackageNames: readonly string[], workspacePackageNames: readonly string[]): string[];
|
|
17
23
|
//# sourceMappingURL=public-package-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-package-contract.d.ts","sourceRoot":"","sources":["../../src/release/public-package-contract.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,GAAG,cAAc,GAAG,iBAAiB,CAAC;IACjD,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,4BAA4B,EAAE,MAAM,EAAE,CAAC;IACvC,2BAA2B,EAAE,MAAM,EAAE,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"public-package-contract.d.ts","sourceRoot":"","sources":["../../src/release/public-package-contract.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,GAAG,cAAc,GAAG,iBAAiB,CAAC;IACjD,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,uBAAuB,EAAE,yBAAyB,EAAE,CAAC;IACrD,qBAAqB,EA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