@awak-app/simy-cli 0.5.35 → 0.5.37
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/package.json +1 -1
- package/src/cli-contract.js +1 -1
- package/src/codex-plugins/simy/hooks/delivery-loop.mjs +248 -32
- package/src/codex-plugins/simy/hooks/workspace-lease.mjs +71 -0
- package/src/delivery-hooks/command.js +15 -2
- package/src/delivery-hooks/desktop.js +12 -2
- package/src/delivery-hooks/supervisor.js +119 -12
- package/src/desktop-host.js +4 -4
- package/src/session-supervision/codex-app-server.js +34 -3
- package/src/session-supervision/handoff.js +124 -0
- package/src/session-supervision/index.js +3 -2
- package/src/session-supervision/workspace-lease.js +2 -0
- package/src/sqm/claude-plugin.js +1 -0
|
@@ -96,9 +96,10 @@ export async function monitorSession({ root, provider, session, monitor = true,
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export async function enrollSession({ root, provider, session, objective, acceptanceCriteria, contextBootstrap = false, autonomyPolicy = 'balanced',
|
|
99
|
-
maxMinutes = 30, maxContinuations = 6, maxFailures = 3, openClient = openCodexAppServer,
|
|
99
|
+
maxMinutes = 30, maxContinuations = 6, maxFailures = 3, maxNoProgressMinutes, maxTokens, openClient = openCodexAppServer,
|
|
100
100
|
readClaude = readClaudeSession, inspectProcess = processIdentity, now = Date.now() }) {
|
|
101
101
|
if (!['codex', 'claude'].includes(provider)) throw new Error('This provider does not have a verified exact-session enrollment channel.');
|
|
102
|
+
if (maxTokens !== undefined && provider !== 'codex') throw new Error('Token-budgeted supervision requires host-observed Codex usage; Claude live hooks cannot enforce this budget.');
|
|
102
103
|
if (typeof objective !== 'string' || !objective.trim() || objective.length > 4000) throw new Error('A concrete objective is required.');
|
|
103
104
|
if (!['autonomous', 'balanced', 'strict'].includes(autonomyPolicy)) throw new Error('Choose an autonomy policy.');
|
|
104
105
|
let metadata;
|
|
@@ -123,7 +124,7 @@ export async function enrollSession({ root, provider, session, objective, accept
|
|
|
123
124
|
const run = await startDelivery({ root, provider, session, cwd, objective: objective.trim(), nextStep: 'Inspect current evidence and propose the next assessed action.',
|
|
124
125
|
maxMinutes, maxContinuations, maxFailures, now, admission, inspectProcess,
|
|
125
126
|
liveHookAdmission: liveRecord ? { hookStartedAt: liveRecord.hookStartedAt, pid: liveRecord.process.pid, identity: liveRecord.process.identity } : undefined,
|
|
126
|
-
managed: { acceptanceCriteria, contextBootstrap, autonomyPolicy, approvalScopes: ['task'], approvalPolicy: 'wait',
|
|
127
|
+
managed: { acceptanceCriteria, contextBootstrap, autonomyPolicy, maxNoProgressMinutes, maxTokens, approvalScopes: ['task'], approvalPolicy: 'wait',
|
|
127
128
|
initialAction: initialPlan.alternatives[0].action, initialPlan, remainingWork: objective.trim(),
|
|
128
129
|
autoRecovery: provider === 'codex', resumeChannel: provider === 'codex' ? 'codex_app_server' : null,
|
|
129
130
|
resumeModel: metadata.model } });
|
package/src/sqm/claude-plugin.js
CHANGED
|
@@ -21,6 +21,7 @@ export async function claudePluginFiles() {
|
|
|
21
21
|
files.set(relative, content.replaceAll("current Codex thread", "current Claude Code conversation"));
|
|
22
22
|
}
|
|
23
23
|
files.set("hooks/delivery-loop.mjs", await readFile(path.join(SOURCE, "hooks/delivery-loop.mjs"), "utf8"));
|
|
24
|
+
files.set("hooks/workspace-lease.mjs", await readFile(path.join(SOURCE, "hooks/workspace-lease.mjs"), "utf8"));
|
|
24
25
|
files.set("hooks/connection-reminder.mjs", await readFile(path.join(SOURCE, "hooks/connection-reminder.mjs"), "utf8"));
|
|
25
26
|
const hooks = JSON.parse(await readFile(path.join(SOURCE, "hooks/hooks.json"), "utf8"));
|
|
26
27
|
delete hooks.hooks.Interrupt; // Codex-only event; Claude interruptions cannot be vetoed.
|