@atolis-hq/wake 0.4.73 → 0.4.74
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/dist/src/bootstrap/runner-tool-notices.d.ts +3 -0
- package/dist/src/bootstrap/runner-tool-notices.js +31 -0
- package/dist/src/bootstrap/surface-cli-applications.js +4 -1
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/execution/contracts/config.d.ts +2 -1
- package/dist/src/execution/contracts/config.js +6 -5
- package/dist/src/execution/contracts/vocabulary.d.ts +8 -0
- package/dist/src/execution/contracts/vocabulary.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BuiltInActivityName, agentActivityDefinition } from '../activities/index.js';
|
|
2
|
+
import { RunnerKind } from '../execution/index.js';
|
|
3
|
+
export function runnerToolNotices(config, templates = new Map()) {
|
|
4
|
+
const notices = [];
|
|
5
|
+
for (const [workflowName, workflow] of Object.entries(config.orchestration.workflows)) {
|
|
6
|
+
for (const [stageName, stage] of Object.entries(workflow.stages)) {
|
|
7
|
+
if (stage.activity !== BuiltInActivityName.Agent)
|
|
8
|
+
continue;
|
|
9
|
+
if (!hasToolList(stage.with, templates))
|
|
10
|
+
continue;
|
|
11
|
+
const pool = stage.execution?.runnerPool ?? config.execution.defaultRunnerPool;
|
|
12
|
+
const codexRunners = (config.execution.runnerPools[pool] ?? []).filter((runner) => config.execution.agentRunners?.[runner]?.kind === RunnerKind.CodexCli);
|
|
13
|
+
for (const runner of codexRunners) {
|
|
14
|
+
notices.push(`Workflow "${workflowName}" stage "${stageName}": allowedTools is advisory and is not enforced by Codex runner "${runner}" (pool "${pool}").`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return notices;
|
|
19
|
+
}
|
|
20
|
+
function hasToolList(input, templates) {
|
|
21
|
+
const parsed = agentActivityDefinition.inputSchema.safeParse(input);
|
|
22
|
+
if (!parsed.success)
|
|
23
|
+
return false;
|
|
24
|
+
const stage = parsed.data;
|
|
25
|
+
if (stage.template !== undefined && !templates.has(stage.template))
|
|
26
|
+
return false;
|
|
27
|
+
const templateTools = stage.template === undefined
|
|
28
|
+
? undefined
|
|
29
|
+
: templates.get(stage.template)?.frontmatter.allowedTools;
|
|
30
|
+
return (stage.allowedTools ?? templateTools ?? []).length > 0;
|
|
31
|
+
}
|
|
@@ -19,6 +19,7 @@ import { createNpmUpdatePort } from './npm-update-port.js';
|
|
|
19
19
|
import { runtimeProjectionDefinitions } from './projection-runtime.js';
|
|
20
20
|
import { createRunnerRegistry } from './runner-registry.js';
|
|
21
21
|
import { createOneShotRunnerAdvance, createResidentRunnerAdvance, withFinalProjectionCatchUp, } from './runner-tick-adapter.js';
|
|
22
|
+
import { runnerToolNotices } from './runner-tool-notices.js';
|
|
22
23
|
import { createSelfUpdateApplication, } from './self-update-application.js';
|
|
23
24
|
import { createSelfUpdateFailureLog } from './self-update-failure-log.js';
|
|
24
25
|
import { createSourceUpdatePort } from './source-update-port.js';
|
|
@@ -660,6 +661,7 @@ function spawnDocker(arguments_, onChunk, cwd, options) {
|
|
|
660
661
|
async function doctorDiagnostics(root) {
|
|
661
662
|
const failures = [];
|
|
662
663
|
const notices = [];
|
|
664
|
+
const templates = new Map();
|
|
663
665
|
try {
|
|
664
666
|
createRunnerRegistry(root.config.execution, root.fakeScenarios).resolve(root.config.execution.defaultRunnerPool);
|
|
665
667
|
}
|
|
@@ -674,12 +676,13 @@ async function doctorDiagnostics(root) {
|
|
|
674
676
|
}
|
|
675
677
|
for (const name of referencedPromptTemplateNames(root.config.orchestration.workflows)) {
|
|
676
678
|
try {
|
|
677
|
-
await loadPromptTemplate(root.paths.wakeRoot, name);
|
|
679
|
+
templates.set(name, await loadPromptTemplate(root.paths.wakeRoot, name));
|
|
678
680
|
}
|
|
679
681
|
catch (error) {
|
|
680
682
|
failures.push(`prompt template "${name}" is not readable: ${error.message}`);
|
|
681
683
|
}
|
|
682
684
|
}
|
|
685
|
+
notices.push(...runnerToolNotices(root.config, templates));
|
|
683
686
|
await checkProviders(root, failures, notices);
|
|
684
687
|
await checkMaintenanceLease(root, failures);
|
|
685
688
|
notices.push(...(await dockerSandboxHealthNotices(root)));
|
|
@@ -124,6 +124,6 @@ export function resolveWakeVersion(options = {}) {
|
|
|
124
124
|
return `g${headHash.slice(0, 7)}`;
|
|
125
125
|
return '0.1.0-dev';
|
|
126
126
|
}
|
|
127
|
-
export const wakeVersion = "v0.4.
|
|
127
|
+
export const wakeVersion = "v0.4.74";
|
|
128
128
|
/** The registry-installable version used by packaged sandbox images. */
|
|
129
129
|
export const wakePackageVersion = packageVersion(defaultRepoRoot) ?? wakeVersion;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { RunnerKind } from './vocabulary.js';
|
|
2
3
|
export declare const executionConfigSchema: z.ZodObject<{
|
|
3
4
|
agentRunners: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
5
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -69,7 +70,7 @@ export declare const executionConfigSchema: z.ZodObject<{
|
|
|
69
70
|
}, z.core.$strict>;
|
|
70
71
|
export interface ExecutionConfig {
|
|
71
72
|
readonly agentRunners?: Readonly<Record<string, {
|
|
72
|
-
readonly kind:
|
|
73
|
+
readonly kind: RunnerKind;
|
|
73
74
|
readonly command?: string;
|
|
74
75
|
readonly model?: string;
|
|
75
76
|
readonly effort?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { RunnerKind } from './vocabulary.js';
|
|
2
3
|
const isReservedFlag = (arg) => arg === '--output-format' || arg === '--resume';
|
|
3
4
|
const agentRunnerBase = {
|
|
4
5
|
model: z.string().trim().min(1).optional(),
|
|
@@ -21,11 +22,11 @@ export const executionConfigSchema = z
|
|
|
21
22
|
agentRunners: z
|
|
22
23
|
.record(z.string().trim().min(1), z
|
|
23
24
|
.discriminatedUnion('kind', [
|
|
24
|
-
commandRunner(
|
|
25
|
-
commandRunner(
|
|
26
|
-
commandRunner(
|
|
27
|
-
commandRunner(
|
|
28
|
-
z.object({ kind: z.literal(
|
|
25
|
+
commandRunner(RunnerKind.ClaudeCli),
|
|
26
|
+
commandRunner(RunnerKind.CodexCli),
|
|
27
|
+
commandRunner(RunnerKind.CursorCli),
|
|
28
|
+
commandRunner(RunnerKind.Command),
|
|
29
|
+
z.object({ kind: z.literal(RunnerKind.Fake), ...agentRunnerBase }).strict(),
|
|
29
30
|
])
|
|
30
31
|
.refine((value) => !value.args.some(isReservedFlag), {
|
|
31
32
|
message: 'args must not contain --output-format or --resume',
|
|
@@ -48,3 +48,11 @@ export declare const TranscriptGroupKind: {
|
|
|
48
48
|
readonly Run: string;
|
|
49
49
|
};
|
|
50
50
|
export type TranscriptGroupKind = ValueOf<typeof TranscriptGroupKind>;
|
|
51
|
+
export declare const RunnerKind: {
|
|
52
|
+
readonly ClaudeCli: "claude-cli";
|
|
53
|
+
readonly CodexCli: "codex-cli";
|
|
54
|
+
readonly CursorCli: "cursor-cli";
|
|
55
|
+
readonly Command: "command";
|
|
56
|
+
readonly Fake: "fake";
|
|
57
|
+
};
|
|
58
|
+
export type RunnerKind = ValueOf<typeof RunnerKind>;
|
|
@@ -46,3 +46,10 @@ export const TranscriptGroupKind = {
|
|
|
46
46
|
Session: transcriptGroupKinds[0],
|
|
47
47
|
Run: transcriptGroupKinds[1],
|
|
48
48
|
};
|
|
49
|
+
export const RunnerKind = {
|
|
50
|
+
ClaudeCli: 'claude-cli',
|
|
51
|
+
CodexCli: 'codex-cli',
|
|
52
|
+
CursorCli: 'cursor-cli',
|
|
53
|
+
Command: 'command',
|
|
54
|
+
Fake: 'fake',
|
|
55
|
+
};
|