@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.
@@ -0,0 +1,3 @@
1
+ import { type PromptTemplate } from '../execution/index.js';
2
+ import type { ResolvedWakeModulesConfig } from './config/root-schema.js';
3
+ export declare function runnerToolNotices(config: ResolvedWakeModulesConfig, templates?: ReadonlyMap<string, PromptTemplate>): string[];
@@ -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.73";
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: 'claude-cli' | 'codex-cli' | 'cursor-cli' | 'command' | 'fake';
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('claude-cli'),
25
- commandRunner('codex-cli'),
26
- commandRunner('cursor-cli'),
27
- commandRunner('command'),
28
- z.object({ kind: z.literal('fake'), ...agentRunnerBase }).strict(),
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.4.73",
3
+ "version": "0.4.74",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {