@dharma-ai-labs/agent-fabric 0.2.171 → 0.2.172
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/bootstrapProcessCaller.test.js +2 -1
- package/dist/bootstrapProcessCaller.test.js.map +1 -1
- package/dist/codexSetupDiagnostic.d.ts.map +1 -1
- package/dist/codexSetupDiagnostic.js +4 -0
- package/dist/codexSetupDiagnostic.js.map +1 -1
- package/dist/codexSetupSessionCaller.test.js +80 -66
- package/dist/codexSetupSessionCaller.test.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -23
- package/dist/index.js.map +1 -1
- package/dist/namedSessionStartup.d.ts +2 -0
- package/dist/namedSessionStartup.d.ts.map +1 -1
- package/dist/namedSessionStartup.js +12 -2
- package/dist/namedSessionStartup.js.map +1 -1
- package/dist/namedSessionStartup.test.js +27 -0
- package/dist/namedSessionStartup.test.js.map +1 -1
- package/dist/namedSessionStartupChild.d.ts +19 -0
- package/dist/namedSessionStartupChild.d.ts.map +1 -0
- package/dist/namedSessionStartupChild.js +62 -0
- package/dist/namedSessionStartupChild.js.map +1 -0
- package/dist/namedSessionStartupChild.test.d.ts +2 -0
- package/dist/namedSessionStartupChild.test.d.ts.map +1 -0
- package/dist/namedSessionStartupChild.test.js +80 -0
- package/dist/namedSessionStartupChild.test.js.map +1 -0
- package/dist/repositoryOnboardingCaller.test.js +36 -0
- package/dist/repositoryOnboardingCaller.test.js.map +1 -1
- package/dist/schemas/codex-setup-failure-diagnostic.schema.json +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,7 @@ import { demoWatchStatus, disableDemoWatch, enableDemoWatch, inspectDemoWatchSup
|
|
|
65
65
|
import { namedSessionPaths, namedSessionRequest, readNamedSession, saveNamedSession, runNamedSessionService } from './namedSessionService.js';
|
|
66
66
|
import { queueNamedSessionEvidence } from './namedSessionEvidence.js';
|
|
67
67
|
import { waitForNamedSessionStartup } from './namedSessionStartup.js';
|
|
68
|
+
import { observeNamedSessionStartupChild } from './namedSessionStartupChild.js';
|
|
68
69
|
import { retainNamedSessionRepositoryState } from './namedSessionRepositoryState.js';
|
|
69
70
|
import { syncNamedSessionTaskExports } from './namedSessionTaskExportSync.js';
|
|
70
71
|
import { readNamedSessionPackageContent, readNamedSessionRepositoryContext, verifyNamedSessionVisibleSkill } from './namedSessionPackageGate.js';
|
|
@@ -91,7 +92,7 @@ import { assertCodexSetupExecutionLease } from './codexSetupAdmission.js';
|
|
|
91
92
|
import { parseLocalCodexSetupReadiness } from '@dharma-ai-labs/agent-fabric-local-vault/setup-readiness';
|
|
92
93
|
import { writeBootstrapHostJson, writeBootstrapHostText } from './bootstrapHostFiles.js';
|
|
93
94
|
export { openCooperativeInboxSession } from './cooperativeInboxSession.js';
|
|
94
|
-
const VERSION = '0.2.
|
|
95
|
+
const VERSION = '0.2.172';
|
|
95
96
|
const USAGE = CLI_USAGE;
|
|
96
97
|
const execFileAsync = promisify(execFile);
|
|
97
98
|
const LOCAL_PROVIDER_IDS = ['codex', 'claude', 'agy', 'hermes'];
|
|
@@ -3133,6 +3134,7 @@ async function bootstrap(flags, hostScope) {
|
|
|
3133
3134
|
recipientApproval.browserOpened = flags.has('no-browser') ? false : await step(() => openVerificationUri(approval.url));
|
|
3134
3135
|
await hostScope?.assert();
|
|
3135
3136
|
process.stderr.write(`Approve this exact device in the authenticated portal before ${approval.expiresAt}: ${approval.url}\n`);
|
|
3137
|
+
process.stderr.write(`Device fingerprint: ${approval.fingerprint}\nRepository fingerprint: ${approval.repositoryFingerprint}\n`);
|
|
3136
3138
|
},
|
|
3137
3139
|
}));
|
|
3138
3140
|
config = result.config;
|
|
@@ -4831,28 +4833,39 @@ async function namedSessionCommand(action, flags) {
|
|
|
4831
4833
|
if (flags.has(key))
|
|
4832
4834
|
args.push(`--${key}`, required(flags, key));
|
|
4833
4835
|
}
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4836
|
+
let startupChild;
|
|
4837
|
+
try {
|
|
4838
|
+
await step(async () => {
|
|
4839
|
+
const start = () => {
|
|
4840
|
+
const child = spawn(process.execPath, args, { cwd: item.path, detached: !hostScope && !supervisorOwner,
|
|
4841
|
+
stdio: setupSessionScope ? ['ignore', 'ignore', 'pipe', 'ipc'] : ['ignore', 'ignore', 'pipe'], env: process.env });
|
|
4842
|
+
startupChild = observeNamedSessionStartupChild(child);
|
|
4843
|
+
return child;
|
|
4844
|
+
};
|
|
4845
|
+
if (supervisorOwner) {
|
|
4846
|
+
const child = await supervisorOwner.spawn(name, start);
|
|
4847
|
+
if (setupSessionScope)
|
|
4848
|
+
await sendCodexSetupChildStart({ owner: supervisorOwner, child, scope: setupSessionScope });
|
|
4849
|
+
return;
|
|
4850
|
+
}
|
|
4851
|
+
const child = start();
|
|
4852
|
+
if (hostScope)
|
|
4853
|
+
captureBootstrapHostChild(hostScope, child);
|
|
4854
|
+
else {
|
|
4855
|
+
child.on('error', () => { });
|
|
4856
|
+
child.unref();
|
|
4857
|
+
}
|
|
4858
|
+
});
|
|
4859
|
+
return await waitForNamedSessionStartup({ step,
|
|
4860
|
+
assertActive: async () => { await hostScope?.assert(); },
|
|
4861
|
+
observe: () => namedSessionRequest(dharmaHome(), name, { action: 'status' }),
|
|
4862
|
+
readFailure: () => startupChild?.readFailure(),
|
|
4863
|
+
maximumWaitMs: setupSessionScope
|
|
4864
|
+
? Math.min(120_000, Date.parse(setupSessionScope.request.expiresAt) - Date.now()) : 120_000 });
|
|
4865
|
+
}
|
|
4866
|
+
finally {
|
|
4867
|
+
startupChild?.dispose();
|
|
4868
|
+
}
|
|
4856
4869
|
}
|
|
4857
4870
|
await mkdir(paths.root, { recursive: true, mode: 0o700 });
|
|
4858
4871
|
const vault = await openBootstrapVault({ root: resolve(dharmaHome(), 'vault') });
|