@ai-outfitter/outfitter 1.4.0 → 1.6.0
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/README.md +11 -2
- package/code/pi-extension/src/outfitter-extension.js +9 -1
- package/dist/agents/AgentLaunch.d.ts +2 -2
- package/dist/agents/AgentLaunch.js +4 -3
- package/dist/agents/AgentLaunch.js.map +1 -1
- package/dist/agents/ClaudeStatePersistence.d.ts +18 -0
- package/dist/agents/ClaudeStatePersistence.js +225 -0
- package/dist/agents/ClaudeStatePersistence.js.map +1 -0
- package/dist/cli/OutfitterCli.js +1 -1
- package/dist/cli/OutfitterCli.js.map +1 -1
- package/dist/cli/commands/RunAgentCommand.js +76 -15
- package/dist/cli/commands/RunAgentCommand.js.map +1 -1
- package/dist/cli/commands/SyncCommand.d.ts +7 -3
- package/dist/cli/commands/SyncCommand.js +110 -20
- package/dist/cli/commands/SyncCommand.js.map +1 -1
- package/dist/extensions/PiExtensionCache.d.ts +11 -1
- package/dist/extensions/PiExtensionCache.js +129 -13
- package/dist/extensions/PiExtensionCache.js.map +1 -1
- package/dist/projection/CodexMcp.d.ts +11 -0
- package/dist/projection/CodexMcp.js +143 -0
- package/dist/projection/CodexMcp.js.map +1 -0
- package/dist/projection/Materialize.d.ts +3 -1
- package/dist/projection/Materialize.js +10 -7
- package/dist/projection/Materialize.js.map +1 -1
- package/dist/projection/ProjectHarness.js +75 -32
- package/dist/projection/ProjectHarness.js.map +1 -1
- package/dist/projection/Projection.d.ts +2 -0
- package/dist/projection/Tools.d.ts +91 -0
- package/dist/projection/Tools.js +129 -0
- package/dist/projection/Tools.js.map +1 -0
- package/dist/resolver/AgentDefinition.d.ts +11 -0
- package/dist/resolver/AgentDefinition.js +91 -12
- package/dist/resolver/AgentDefinition.js.map +1 -1
- package/dist/resolver/Layer.d.ts +5 -2
- package/dist/resolver/Layer.js +47 -8
- package/dist/resolver/Layer.js.map +1 -1
- package/dist/resolver/ResolverContext.d.ts +1 -1
- package/dist/resolver/ResolverContext.js +1 -1
- package/dist/resolver/ResolverContext.js.map +1 -1
- package/dist/resolver/ResolverValidation.d.ts +12 -1
- package/dist/resolver/ResolverValidation.js +30 -20
- package/dist/resolver/ResolverValidation.js.map +1 -1
- package/dist/schemas/agent.schema.json +8 -2
- package/dist/schemas/settings.schema.json +1 -1
- package/dist/schemas/system-extension-hook.schema.json +38 -0
- package/dist/settings/Settings.d.ts +1 -1
- package/dist/settings/Settings.js +1 -1
- package/dist/settings/Settings.js.map +1 -1
- package/dist/settings/SettingsLoader.js.map +1 -1
- package/dist/setup/DefaultCatalog.d.ts +18 -0
- package/dist/setup/DefaultCatalog.js +74 -13
- package/dist/setup/DefaultCatalog.js.map +1 -1
- package/dist/sources/SourceCache.d.ts +20 -0
- package/dist/sources/SourceCache.js +31 -1
- package/dist/sources/SourceCache.js.map +1 -1
- package/dist/sources/TransitiveSources.d.ts +43 -0
- package/dist/sources/TransitiveSources.js +177 -0
- package/dist/sources/TransitiveSources.js.map +1 -0
- package/dist/system/SystemExtensionHook.d.ts +34 -0
- package/dist/system/SystemExtensionHook.js +190 -0
- package/dist/system/SystemExtensionHook.js.map +1 -0
- package/dist/validation/SchemaValidator.d.ts +1 -1
- package/dist/validation/SchemaValidator.js +2 -0
- package/dist/validation/SchemaValidator.js.map +1 -1
- package/docs/architecture/state_writeback_strategy.md +15 -3
- package/docs/documentation/README.md +15 -2
- package/docs/documentation/catalogs.md +61 -2
- package/docs/documentation/cli.md +2 -1
- package/docs/documentation/concepts.md +2 -2
- package/docs/documentation/containers.md +63 -14
- package/docs/documentation/hooks.md +33 -0
- package/docs/documentation/in-cluster.md +2 -0
- package/docs/documentation/migration.md +1 -1
- package/docs/documentation/personas.md +1 -1
- package/docs/documentation/settings.md +1 -1
- package/docs/documentation/state.md +27 -0
- package/docs/documentation/support-matrix.md +36 -23
- package/docs/documentation/usecases/org-onboarding-sdlc-report.md +143 -0
- package/docs/documentation/usecases/persona-reviews.md +1 -1
- package/docs/philosophy.md +20 -0
- package/package.json +1 -1
- package/src/schemas/agent.schema.json +8 -2
- package/src/schemas/settings.schema.json +1 -1
- package/src/schemas/system-extension-hook.schema.json +38 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Outfitter
|
|
2
2
|
|
|
3
|
-
Outfitter is the toolchain for [`.agents`](./docs/documentation/concepts.md#the-agents-protocol): it resolves agent configuration from local and remote `.agents` trees, composes agents, skills, and knowledge by slug, and launches the result through wrapped agent CLIs like [`pi`](https://github.com/earendil-works/pi-coding-agent) and
|
|
3
|
+
Outfitter is the toolchain for [`.agents`](./docs/documentation/concepts.md#the-agents-protocol): it resolves agent configuration from local and remote `.agents` trees, composes agents, skills, and knowledge by slug, and launches the result through wrapped agent CLIs like [`pi`](https://github.com/earendil-works/pi-coding-agent), Claude Code, and Codex CLI.
|
|
4
4
|
|
|
5
5
|
Outfitter does not own a configuration format. Your `.agents/` directory is the source of truth — useful without Outfitter, committed and reviewed like any other code.
|
|
6
6
|
|
|
@@ -34,7 +34,15 @@ outfitter
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Pi is bundled and also hosts Outfitter's setup walkthrough. Install other runtime harnesses, such as
|
|
37
|
-
Claude Code, separately. For the full walkthrough, see [Getting started](./docs/documentation/getting-started.md).
|
|
37
|
+
Claude Code and Codex CLI, separately. For the full walkthrough, see [Getting started](./docs/documentation/getting-started.md).
|
|
38
|
+
|
|
39
|
+
## Climb the ramp
|
|
40
|
+
|
|
41
|
+
Three runbooks, one per rung of [the adoption ramp](./docs/philosophy.md#the-ramp-to-an-autonomous-lifecycle). Each starts where the previous one ended and closes with the one concrete step that begins the next rung. Their success checks are the signals an [SDLC assessment](./docs/documentation/usecases/org-onboarding-sdlc-report.md) reports, so "done" is something you run rather than something you judge.
|
|
42
|
+
|
|
43
|
+
1. [**Share one catalog**](./docs/runbooks/share-one-catalog.md) — one pinned catalog the organization shares, instead of per-laptop configuration. → **delegated**
|
|
44
|
+
2. [**Run it without your laptop**](./docs/runbooks/run-without-your-laptop.md) — an event triggers the workflow, its output lands through review, and the session is captured. → **automated**
|
|
45
|
+
3. [**Give the agent a residence**](./docs/runbooks/give-the-agent-a-residence.md) — a named, assignable agent with an account and somewhere to live. → **governed**
|
|
38
46
|
|
|
39
47
|
## Already have a `.agents/` directory?
|
|
40
48
|
|
|
@@ -82,6 +90,7 @@ Layers merge by ID: `<project>/.agents/` over `~/.agents/` over pinned remote [c
|
|
|
82
90
|
|
|
83
91
|
The [documentation index](./docs/documentation/README.md) follows the same arc — set up your own, understand the pieces, share across your org, automate more surfaces, contribute back:
|
|
84
92
|
|
|
93
|
+
- **Climb:** [Share one catalog](./docs/runbooks/share-one-catalog.md) · [Run it without your laptop](./docs/runbooks/run-without-your-laptop.md) · [Give the agent a residence](./docs/runbooks/give-the-agent-a-residence.md)
|
|
85
94
|
- **Start:** [Getting started](./docs/documentation/getting-started.md) · [First-time CLI agent users](./docs/documentation/first-time-cli-agent-users.md) · [Switching to Outfitter](./docs/documentation/switching-to-outfitter.md)
|
|
86
95
|
- **Understand:** [Concepts](./docs/documentation/concepts.md) · [Agents](./docs/documentation/agents.md) · [Skills](./docs/documentation/skills.md) · [Personas](./docs/documentation/personas.md) · [Subagents and delegation](./docs/documentation/subagents.md)
|
|
87
96
|
- **Share:** [Catalogs](./docs/documentation/catalogs.md) · [Conventions](./docs/documentation/conventions.md) · [Organization catalog](./docs/documentation/usecases/organization-profile-catalog.md) · [Best practices](./docs/documentation/best-practices.md)
|
|
@@ -126,6 +126,12 @@ export default function outfitter(pi) {
|
|
|
126
126
|
label: 'Claude Code',
|
|
127
127
|
description: "Use Anthropic's separately installed Claude Code CLI.",
|
|
128
128
|
},
|
|
129
|
+
{
|
|
130
|
+
value: 'codex',
|
|
131
|
+
label: 'Codex CLI',
|
|
132
|
+
description:
|
|
133
|
+
"Use OpenAI's separately installed Codex CLI. Projects model and MCP servers only; agent identity is not projected yet.",
|
|
134
|
+
},
|
|
129
135
|
];
|
|
130
136
|
return selectFromItems(ctx, ['Which CLI agent should Outfitter use by default?'], items, 'pi');
|
|
131
137
|
},
|
|
@@ -458,7 +464,9 @@ const selectFromItems = async (ctx, titleLines, items, initialValue) => {
|
|
|
458
464
|
items.map((item) => item.label),
|
|
459
465
|
);
|
|
460
466
|
if (selected === undefined) return undefined;
|
|
461
|
-
return items.some((item) => item.value === selected)
|
|
467
|
+
return items.some((item) => item.value === selected)
|
|
468
|
+
? selected
|
|
469
|
+
: items.find((item) => item.label === selected)?.value;
|
|
462
470
|
};
|
|
463
471
|
|
|
464
472
|
const selectDescribedOption = (ctx, titleLines, items, initialValue) =>
|
|
@@ -24,8 +24,8 @@ export declare const attachSignalForwarding: (child: {
|
|
|
24
24
|
export declare const spawnLauncher: AgentProcessLauncher;
|
|
25
25
|
/**
|
|
26
26
|
* Launches a resolved plan through the given spawn boundary. The install-hint agentId is derived
|
|
27
|
-
* from the logical launch command ('pi' | 'claude') so a missing-CLI failure always names
|
|
28
|
-
* harness actually being launched, regardless of how the harness was selected (flag, settings
|
|
27
|
+
* from the logical launch command ('pi' | 'claude' | 'codex') so a missing-CLI failure always names
|
|
28
|
+
* the harness actually being launched, regardless of how the harness was selected (flag, settings
|
|
29
29
|
* default, or built-in fallback).
|
|
30
30
|
*/
|
|
31
31
|
export declare const launchThroughSpawn: (spawn: AgentProcessLauncher, plan: AgentLaunchPlan) => Promise<number>;
|
|
@@ -104,15 +104,16 @@ export const spawnLauncher = {
|
|
|
104
104
|
/* v8 ignore stop */
|
|
105
105
|
/**
|
|
106
106
|
* Launches a resolved plan through the given spawn boundary. The install-hint agentId is derived
|
|
107
|
-
* from the logical launch command ('pi' | 'claude') so a missing-CLI failure always names
|
|
108
|
-
* harness actually being launched, regardless of how the harness was selected (flag, settings
|
|
107
|
+
* from the logical launch command ('pi' | 'claude' | 'codex') so a missing-CLI failure always names
|
|
108
|
+
* the harness actually being launched, regardless of how the harness was selected (flag, settings
|
|
109
109
|
* default, or built-in fallback).
|
|
110
110
|
*/
|
|
111
111
|
export const launchThroughSpawn = (spawn, plan) => launchAgentProcess(spawn, resolveAgentLaunchExecutable(plan), plan.command);
|
|
112
112
|
const isCommandNotFoundError = (error) => error !== null && typeof error === 'object' && 'code' in error && error.code === 'ENOENT';
|
|
113
113
|
const agentCliInstallHints = {
|
|
114
114
|
pi: 'Install Pi with `npm install -g @earendil-works/pi-coding-agent` (see https://pi.dev).',
|
|
115
|
-
claude: 'Install Claude Code from https://claude.com/claude-code, then rerun with `--
|
|
115
|
+
claude: 'Install Claude Code from https://claude.com/claude-code, then rerun with `--harness claude`.',
|
|
116
|
+
codex: 'Install Codex CLI from https://developers.openai.com/codex/cli, then rerun with `--harness codex`.',
|
|
116
117
|
};
|
|
117
118
|
const formatMissingAgentCliMessage = (agentId, command) => {
|
|
118
119
|
const installHint = agentCliInstallHints[agentId];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentLaunch.js","sourceRoot":"","sources":["../../src/agents/AgentLaunch.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,kGAAkG;AAClG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,QAA8B,EAC9B,UAA2B,EAC3B,OAAe,EACE,EAAE;IACnB,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,OAAO,EAAE,UAAU,CAAC,OA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Aa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACzF,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAElF,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEnD,2EAA2E;QAC3E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,eAAe,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,oGAAoG;QACpG,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AAEF,oGAAoG;AACpG,MAAM,iBAAiB,GAAG,CAAC,iBAAyB,EAAU,EAAE;IAC9D,IAAI,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE3C,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAE3C,0FAA0F;QAC1F,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QAED,SAAS,GAAG,eAAe,CAAC;IAC9B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ClaudeSessionSeed {
|
|
2
|
+
readonly hashes: ReadonlyMap<string, string>;
|
|
3
|
+
readonly warning?: string;
|
|
4
|
+
}
|
|
5
|
+
/** Claude replaces every non-alphanumeric character in an absolute project path with `-`. */
|
|
6
|
+
export declare const resolveClaudeProjectSlug: (workingDirectory: string) => string;
|
|
7
|
+
/** Seeds only the current working directory's durable Claude session history. */
|
|
8
|
+
export declare const seedClaudeSessions: (projectionRoot: string, homeDirectory: string, workingDirectory: string) => ClaudeSessionSeed;
|
|
9
|
+
/** Recursively merges projected Claude session artifacts without deleting durable files. */
|
|
10
|
+
export declare const persistClaudeSessions: (projectionRoot: string, homeDirectory: string, seededHashes?: ReadonlyMap<string, string>) => string | undefined;
|
|
11
|
+
/** Seeds credentials, onboarding/account state, and the current workspace's trust decision. */
|
|
12
|
+
export declare const seedClaudeCredentials: (projectionRoot: string, homeDirectory: string, workingDirectory: string) => string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Copies changed credentials back and atomically merges account metadata into durable state.
|
|
15
|
+
* Returns a warning when a concurrent writer changed the durable credentials during the run, in
|
|
16
|
+
* which case the copy-back is skipped so the newer concurrent refresh is not overwritten.
|
|
17
|
+
*/
|
|
18
|
+
export declare const persistClaudeCredentials: (projectionRoot: string, homeDirectory: string, seededCredentialsHash?: string) => string | undefined;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// Persists Claude Code credentials and sessions across runs. CLAUDE_CONFIG_DIR points Claude at an
|
|
2
|
+
// ephemeral projection root, but its durable Claude and MCP OAuth credentials normally live in
|
|
3
|
+
// ~/.claude/.credentials.json while account metadata, onboarding state, and workspace trust live in
|
|
4
|
+
// ~/.claude.json. Seed only the required top-level state and the current workspace's existing trust
|
|
5
|
+
// decision; merge credential and project-session changes back without exposing or replacing the
|
|
6
|
+
// rest of Claude's machine-local state.
|
|
7
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
8
|
+
import { chmodSync, copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from 'node:fs';
|
|
9
|
+
import { dirname, join, relative } from 'node:path';
|
|
10
|
+
const CREDENTIALS_FILE = '.credentials.json';
|
|
11
|
+
const STATE_FILE = '.claude.json';
|
|
12
|
+
const CREDENTIAL_MODE = 0o600;
|
|
13
|
+
const PROJECTS_DIRECTORY = 'projects';
|
|
14
|
+
const hashFile = (path) => {
|
|
15
|
+
try {
|
|
16
|
+
return createHash('sha256').update(readFileSync(path)).digest('hex');
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const isJsonObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
23
|
+
const readJsonObject = (path) => {
|
|
24
|
+
try {
|
|
25
|
+
const value = JSON.parse(readFileSync(path, 'utf8'));
|
|
26
|
+
return isJsonObject(value) ? value : undefined;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const atomicReplace = (destinationPath, fillTemporary) => {
|
|
33
|
+
const destinationDirectory = dirname(destinationPath);
|
|
34
|
+
mkdirSync(destinationDirectory, { recursive: true });
|
|
35
|
+
const temporaryPath = join(destinationDirectory, `.outfitter-${randomUUID()}`);
|
|
36
|
+
try {
|
|
37
|
+
fillTemporary(temporaryPath);
|
|
38
|
+
renameSync(temporaryPath, destinationPath);
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
rmSync(temporaryPath, { force: true });
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const atomicCopy = (sourcePath, destinationPath) => {
|
|
45
|
+
if (!existsSync(sourcePath))
|
|
46
|
+
return;
|
|
47
|
+
atomicReplace(destinationPath, (temporaryPath) => {
|
|
48
|
+
copyFileSync(sourcePath, temporaryPath);
|
|
49
|
+
chmodSync(temporaryPath, CREDENTIAL_MODE);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const atomicCopyIfUnchanged = (sourcePath, destinationPath, expectedDestinationHash) => {
|
|
53
|
+
const destinationDirectory = dirname(destinationPath);
|
|
54
|
+
mkdirSync(destinationDirectory, { recursive: true });
|
|
55
|
+
const temporaryPath = join(destinationDirectory, `.outfitter-${randomUUID()}`);
|
|
56
|
+
try {
|
|
57
|
+
copyFileSync(sourcePath, temporaryPath);
|
|
58
|
+
chmodSync(temporaryPath, CREDENTIAL_MODE);
|
|
59
|
+
if (hashFile(destinationPath) !== expectedDestinationHash)
|
|
60
|
+
return false;
|
|
61
|
+
renameSync(temporaryPath, destinationPath);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
rmSync(temporaryPath, { force: true });
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const atomicWriteJson = (path, value) => {
|
|
69
|
+
atomicReplace(path, (temporaryPath) => {
|
|
70
|
+
writeFileSync(temporaryPath, `${JSON.stringify(value, null, 2)}\n`, { mode: CREDENTIAL_MODE });
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
/** Claude replaces every non-alphanumeric character in an absolute project path with `-`. */
|
|
74
|
+
export const resolveClaudeProjectSlug = (workingDirectory) => workingDirectory.replace(/[^a-zA-Z0-9]/g, '-');
|
|
75
|
+
const summarizePaths = (kind, paths) => paths.length === 0
|
|
76
|
+
? undefined
|
|
77
|
+
: `Warning: Claude session persistence ${kind === 'conflicts' ? 'skipped concurrently changed files' : 'failed for files'}: ${paths.join(', ')}.`;
|
|
78
|
+
const walkRegularFiles = (root, visit, failures, current = root) => {
|
|
79
|
+
let entries;
|
|
80
|
+
try {
|
|
81
|
+
entries = readdirSync(current, { withFileTypes: true });
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
failures.push(relative(root, current) || '.');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
for (const entry of entries) {
|
|
88
|
+
const path = join(current, entry.name);
|
|
89
|
+
const relativePath = relative(root, path);
|
|
90
|
+
if (entry.isDirectory())
|
|
91
|
+
walkRegularFiles(root, visit, failures, path);
|
|
92
|
+
else if (entry.isFile()) {
|
|
93
|
+
try {
|
|
94
|
+
visit(path, relativePath);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
failures.push(relativePath);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
/** Seeds only the current working directory's durable Claude session history. */
|
|
103
|
+
export const seedClaudeSessions = (projectionRoot, homeDirectory, workingDirectory) => {
|
|
104
|
+
const slug = resolveClaudeProjectSlug(workingDirectory);
|
|
105
|
+
const source = join(resolveClaudeUserConfigDirectory(homeDirectory), PROJECTS_DIRECTORY, slug);
|
|
106
|
+
const destination = join(projectionRoot, PROJECTS_DIRECTORY, slug);
|
|
107
|
+
const hashes = new Map();
|
|
108
|
+
const failures = [];
|
|
109
|
+
if (existsSync(source)) {
|
|
110
|
+
walkRegularFiles(source, (sourcePath, relativePath) => {
|
|
111
|
+
const hash = hashFile(sourcePath);
|
|
112
|
+
if (hash === undefined)
|
|
113
|
+
throw new Error('unreadable session artifact');
|
|
114
|
+
atomicCopy(sourcePath, join(destination, relativePath));
|
|
115
|
+
hashes.set(join(slug, relativePath), hash);
|
|
116
|
+
}, failures);
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
hashes,
|
|
120
|
+
warning: summarizePaths('failures', failures.map((path) => join(slug, path))),
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
/** Recursively merges projected Claude session artifacts without deleting durable files. */
|
|
124
|
+
export const persistClaudeSessions = (projectionRoot, homeDirectory, seededHashes = new Map()) => {
|
|
125
|
+
const projectionProjects = join(projectionRoot, PROJECTS_DIRECTORY);
|
|
126
|
+
if (!existsSync(projectionProjects))
|
|
127
|
+
return undefined;
|
|
128
|
+
const durableProjects = join(resolveClaudeUserConfigDirectory(homeDirectory), PROJECTS_DIRECTORY);
|
|
129
|
+
const conflicts = [];
|
|
130
|
+
const failures = [];
|
|
131
|
+
let slugs;
|
|
132
|
+
try {
|
|
133
|
+
slugs = readdirSync(projectionProjects, { withFileTypes: true });
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return summarizePaths('failures', ['.']);
|
|
137
|
+
}
|
|
138
|
+
for (const slug of slugs) {
|
|
139
|
+
if (!slug.isDirectory())
|
|
140
|
+
continue;
|
|
141
|
+
const slugFailures = [];
|
|
142
|
+
walkRegularFiles(join(projectionProjects, slug.name), (projectionPath, nestedPath) => {
|
|
143
|
+
const relativePath = join(slug.name, nestedPath);
|
|
144
|
+
const projectedHash = hashFile(projectionPath);
|
|
145
|
+
if (projectedHash === undefined)
|
|
146
|
+
throw new Error('unreadable session artifact');
|
|
147
|
+
const seededHash = seededHashes.get(relativePath);
|
|
148
|
+
if (projectedHash === seededHash)
|
|
149
|
+
return;
|
|
150
|
+
const durablePath = join(durableProjects, relativePath);
|
|
151
|
+
const durableHash = hashFile(durablePath);
|
|
152
|
+
if (durableHash !== seededHash) {
|
|
153
|
+
conflicts.push(relativePath);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (!atomicCopyIfUnchanged(projectionPath, durablePath, durableHash))
|
|
157
|
+
conflicts.push(relativePath);
|
|
158
|
+
}, slugFailures);
|
|
159
|
+
failures.push(...slugFailures.map((path) => join(slug.name, path)));
|
|
160
|
+
}
|
|
161
|
+
return ([summarizePaths('conflicts', conflicts), summarizePaths('failures', failures)].filter(Boolean).join(' ') ||
|
|
162
|
+
undefined);
|
|
163
|
+
};
|
|
164
|
+
/** Claude's durable configuration directory (`~/.claude`). */
|
|
165
|
+
const resolveClaudeUserConfigDirectory = (homeDirectory) => join(homeDirectory, '.claude');
|
|
166
|
+
/** Claude's durable machine-local state file (`~/.claude.json`). */
|
|
167
|
+
const resolveClaudeUserStatePath = (homeDirectory) => join(homeDirectory, STATE_FILE);
|
|
168
|
+
const persistCredentialFile = (projectionRoot, homeDirectory, seededCredentialsHash) => {
|
|
169
|
+
const projectionCredentialsPath = join(projectionRoot, CREDENTIALS_FILE);
|
|
170
|
+
const projectedCredentialsHash = hashFile(projectionCredentialsPath);
|
|
171
|
+
if (projectedCredentialsHash === undefined || projectedCredentialsHash === seededCredentialsHash)
|
|
172
|
+
return undefined;
|
|
173
|
+
const durableCredentialsPath = join(resolveClaudeUserConfigDirectory(homeDirectory), CREDENTIALS_FILE);
|
|
174
|
+
if (hashFile(durableCredentialsPath) !== seededCredentialsHash) {
|
|
175
|
+
// Both this run and another process changed the credentials since seeding. The durable copy
|
|
176
|
+
// is the newer refresh; overwriting it with this projection would revert it.
|
|
177
|
+
return 'Warning: durable Claude credentials changed during the run; skipped the credential copy-back to preserve the concurrent refresh.';
|
|
178
|
+
}
|
|
179
|
+
atomicCopy(projectionCredentialsPath, durableCredentialsPath);
|
|
180
|
+
return undefined;
|
|
181
|
+
};
|
|
182
|
+
/** Seeds credentials, onboarding/account state, and the current workspace's trust decision. */
|
|
183
|
+
export const seedClaudeCredentials = (projectionRoot, homeDirectory, workingDirectory) => {
|
|
184
|
+
const projectionCredentialsPath = join(projectionRoot, CREDENTIALS_FILE);
|
|
185
|
+
atomicCopy(join(resolveClaudeUserConfigDirectory(homeDirectory), CREDENTIALS_FILE), projectionCredentialsPath);
|
|
186
|
+
const seededCredentialsHash = hashFile(projectionCredentialsPath);
|
|
187
|
+
const durableState = readJsonObject(resolveClaudeUserStatePath(homeDirectory));
|
|
188
|
+
if (durableState === undefined)
|
|
189
|
+
return seededCredentialsHash;
|
|
190
|
+
const seededState = {};
|
|
191
|
+
if (Object.hasOwn(durableState, 'oauthAccount'))
|
|
192
|
+
seededState.oauthAccount = durableState.oauthAccount;
|
|
193
|
+
if (Object.hasOwn(durableState, 'hasCompletedOnboarding')) {
|
|
194
|
+
seededState.hasCompletedOnboarding = durableState.hasCompletedOnboarding;
|
|
195
|
+
}
|
|
196
|
+
const projects = durableState.projects;
|
|
197
|
+
const project = isJsonObject(projects) ? projects[workingDirectory] : undefined;
|
|
198
|
+
if (isJsonObject(project) && project.hasTrustDialogAccepted === true) {
|
|
199
|
+
seededState.projects = { [workingDirectory]: { hasTrustDialogAccepted: true } };
|
|
200
|
+
}
|
|
201
|
+
if (Object.keys(seededState).length > 0) {
|
|
202
|
+
atomicWriteJson(join(projectionRoot, STATE_FILE), seededState);
|
|
203
|
+
}
|
|
204
|
+
return seededCredentialsHash;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Copies changed credentials back and atomically merges account metadata into durable state.
|
|
208
|
+
* Returns a warning when a concurrent writer changed the durable credentials during the run, in
|
|
209
|
+
* which case the copy-back is skipped so the newer concurrent refresh is not overwritten.
|
|
210
|
+
*/
|
|
211
|
+
export const persistClaudeCredentials = (projectionRoot, homeDirectory, seededCredentialsHash) => {
|
|
212
|
+
const warning = persistCredentialFile(projectionRoot, homeDirectory, seededCredentialsHash);
|
|
213
|
+
const projectionState = readJsonObject(join(projectionRoot, STATE_FILE));
|
|
214
|
+
if (projectionState === undefined || !Object.hasOwn(projectionState, 'oauthAccount'))
|
|
215
|
+
return warning;
|
|
216
|
+
const durableStatePath = resolveClaudeUserStatePath(homeDirectory);
|
|
217
|
+
const durableState = readJsonObject(durableStatePath);
|
|
218
|
+
if (durableState === undefined && existsSync(durableStatePath))
|
|
219
|
+
return warning;
|
|
220
|
+
if (JSON.stringify(projectionState.oauthAccount) === JSON.stringify(durableState?.oauthAccount))
|
|
221
|
+
return warning;
|
|
222
|
+
atomicWriteJson(durableStatePath, { ...(durableState ?? {}), oauthAccount: projectionState.oauthAccount });
|
|
223
|
+
return warning;
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=ClaudeStatePersistence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClaudeStatePersistence.js","sourceRoot":"","sources":["../../src/agents/ClaudeStatePersistence.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,+FAA+F;AAC/F,oGAAoG;AACpG,oGAAoG;AACpG,gGAAgG;AAChG,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,EACT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e,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC;QAAE,OAAO,OAAO,CAAC;IAErG,MAAM,gBAAgB,GAAG,0BAA0B,CAAC,aAAa,CAAC,CAAC;IACnE,MAAM,YAAY,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACtD,IAAI,YAAY,KAAK,SAAS,IAAI,UAAU,CAAC,gBAAgB,CAAC;QAAE,OAAO,OAAO,CAAC;IAC/E,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;QAAE,OAAO,OAAO,CAAC;IAEhH,eAAe,CAAC,gBAAgB,EAAE,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,eAAe,CAAC,YAAY,EAAE,CAAC,CAAC;IAC3G,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
package/dist/cli/OutfitterCli.js
CHANGED
|
@@ -19,7 +19,7 @@ export const createOutfitterProgram = (commands = createDefaultCommands()) => {
|
|
|
19
19
|
const program = new Command();
|
|
20
20
|
program
|
|
21
21
|
.name('outfitter')
|
|
22
|
-
.description('Resolve, compose, and launch .agents agents in pi, Claude Code, and
|
|
22
|
+
.description('Resolve, compose, and launch .agents agents in pi, Claude Code, and Codex CLI.')
|
|
23
23
|
.version(readOutfitterVersion());
|
|
24
24
|
for (const command of commands) {
|
|
25
25
|
command.register(program);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutfitterCli.js","sourceRoot":"","sources":["../../src/cli/OutfitterCli.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC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AAC;IAC1D,qBAAqB,EAAE;IACvB,kBAAkB,EAAE;IACpB,iBAAiB,EAAE;IACnB,iBAAiB,EAAE;IACnB,qBAAqB,EAAE;IACvB,iBAAiB,EAAE;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,WAAqC,qBAAqB,EAAE,EAAW,EAAE;IAC9G,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,WAAW,CAAC;SACjB,WAAW,CAAC,gFAAgF,CAAC;SAC7F,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAEnC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { tmpdir } from 'node:os';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { Option } from 'commander';
|
|
6
6
|
import { launchThroughSpawn, spawnLauncher } from '../../agents/AgentLaunch.js';
|
|
7
|
+
import { persistClaudeCredentials, persistClaudeSessions, seedClaudeCredentials, seedClaudeSessions, } from '../../agents/ClaudeStatePersistence.js';
|
|
7
8
|
import { persistPiCredentials, resolvePiUserAgentDirectory, seedPiCredentials, } from '../../agents/PiCredentialPersistence.js';
|
|
8
9
|
import { resolvePiSessionDirectory } from '../../agents/PiSessionDirectory.js';
|
|
9
10
|
import { compose } from '../../composer/Composer.js';
|
|
@@ -13,6 +14,7 @@ import { projectComposition } from '../../projection/ProjectHarness.js';
|
|
|
13
14
|
import { findResource } from '../../resolver/Resource.js';
|
|
14
15
|
import { resolveEffectiveSet } from '../../resolver/ResolverContext.js';
|
|
15
16
|
import { HARNESSES } from '../../settings/Settings.js';
|
|
17
|
+
import { attachSystemExtensionHooks } from '../../system/SystemExtensionHook.js';
|
|
16
18
|
import { readOutfitterVersion } from '../../version/OutfitterVersion.js';
|
|
17
19
|
import { attachPiRuntimeExtension } from './PiRuntimeLaunch.js';
|
|
18
20
|
import { resolveHomeDirectory, resolveProjectDirectory } from './ProcessDefaults.js';
|
|
@@ -31,7 +33,7 @@ const resolveAgentSlug = (settingsDefault, requested) => {
|
|
|
31
33
|
const resolveHarness = (settingsDefault, requested) => {
|
|
32
34
|
const harness = requested ?? settingsDefault ?? 'pi';
|
|
33
35
|
if (!HARNESSES.includes(harness)) {
|
|
34
|
-
throw new Error(`Unknown harness '${harness}'. Use --harness
|
|
36
|
+
throw new Error(`Unknown harness '${harness}'. Use --harness <${HARNESSES.join('|')}>.`);
|
|
35
37
|
}
|
|
36
38
|
return harness;
|
|
37
39
|
};
|
|
@@ -40,17 +42,63 @@ const assertNoSettingsIssues = (issues) => {
|
|
|
40
42
|
throw new Error(`Cannot run with invalid settings: ${issues.map((issue) => issue.message).join('; ')}`);
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
const
|
|
45
|
+
// Pi and Claude both read credentials — and Claude its session history — from their ephemeral
|
|
46
|
+
// projection root. Seed the durable state before launch and persist changes in a finally block so
|
|
47
|
+
// login and session changes survive both a normal exit and a failed launcher.
|
|
48
|
+
const launchWithStatePersistence = async (input, harness, rootDirectory, launch, lateMessages) => {
|
|
49
|
+
// Persist warnings surface after launch, and writeLine alone can be a dropped sink (setup's
|
|
50
|
+
// auto-launch passes none), so they also go into lateMessages to reach the returned result.
|
|
51
|
+
const warn = (message) => {
|
|
52
|
+
lateMessages.push(message);
|
|
53
|
+
try {
|
|
54
|
+
input.writeLine?.(message);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// The returned late-message channel is authoritative; output sinks must never mask launch.
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const attempt = (label, action) => {
|
|
61
|
+
try {
|
|
62
|
+
action();
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
warn(`Warning: failed to ${label}: ${String(error)}`);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
47
68
|
const piUserAgentDirectory = harness === 'pi' ? resolvePiUserAgentDirectory(input.homeDirectory) : undefined;
|
|
69
|
+
let seededClaudeCredentialsHash;
|
|
70
|
+
let seededClaudeSessionHashes = new Map();
|
|
48
71
|
if (piUserAgentDirectory !== undefined)
|
|
49
72
|
seedPiCredentials(rootDirectory, piUserAgentDirectory);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
73
|
+
if (harness === 'claude') {
|
|
74
|
+
seededClaudeCredentialsHash = seedClaudeCredentials(rootDirectory, input.homeDirectory, input.projectDirectory);
|
|
75
|
+
attempt('seed Claude session history', () => {
|
|
76
|
+
const seed = seedClaudeSessions(rootDirectory, input.homeDirectory, input.projectDirectory);
|
|
77
|
+
seededClaudeSessionHashes = seed.hashes;
|
|
78
|
+
if (seed.warning !== undefined)
|
|
79
|
+
warn(seed.warning);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
return await input.launcher(launch);
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
if (piUserAgentDirectory !== undefined) {
|
|
87
|
+
attempt('persist Pi credentials', () => persistPiCredentials(rootDirectory, piUserAgentDirectory));
|
|
88
|
+
}
|
|
89
|
+
if (harness === 'claude') {
|
|
90
|
+
attempt('persist Claude credentials', () => {
|
|
91
|
+
const conflictWarning = persistClaudeCredentials(rootDirectory, input.homeDirectory, seededClaudeCredentialsHash);
|
|
92
|
+
if (conflictWarning !== undefined)
|
|
93
|
+
warn(conflictWarning);
|
|
94
|
+
});
|
|
95
|
+
attempt('persist Claude session history', () => {
|
|
96
|
+
const warning = persistClaudeSessions(rootDirectory, input.homeDirectory, seededClaudeSessionHashes);
|
|
97
|
+
if (warning !== undefined)
|
|
98
|
+
warn(warning);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
54
102
|
};
|
|
55
103
|
// pi writes sessions inside PI_CODING_AGENT_DIR — the projection root Outfitter deletes after the
|
|
56
104
|
// run — so resolve pi's durable per-project store instead and let `--continue` outlive the run. An
|
|
@@ -85,7 +133,6 @@ export const executeRunAgentCommand = async (input) => {
|
|
|
85
133
|
let resolved = resolveEffectiveSet(input);
|
|
86
134
|
assertNoSettingsIssues(resolved.settingsIssues);
|
|
87
135
|
assertReadableAppendPrompts(input.appendPromptPaths);
|
|
88
|
-
emit(resolved.warnings.map((warning) => `warning: ${warning}`));
|
|
89
136
|
// First run: nothing selected and no default configured — onboard, then resolve again.
|
|
90
137
|
const setupMessages = [];
|
|
91
138
|
if (input.agent === undefined && resolved.settings.defaultAgent === undefined && input.setup !== undefined) {
|
|
@@ -99,12 +146,17 @@ export const executeRunAgentCommand = async (input) => {
|
|
|
99
146
|
assertNoSettingsIssues(resolved.settingsIssues);
|
|
100
147
|
}
|
|
101
148
|
}
|
|
149
|
+
// Warnings from the FINAL resolved state (after any onboarding), folded into every returned message
|
|
150
|
+
// array after the setup notices — so a dependency that best-effort bootstrap could not fetch
|
|
151
|
+
// surfaces its actionable `outfitter sync` guidance to both the terminal and programmatic callers,
|
|
152
|
+
// not just a generic unknown-skill warning at composition (OFTR-004.6.10).
|
|
153
|
+
const resolutionWarnings = resolved.warnings.map((warning) => `warning: ${warning}`);
|
|
102
154
|
const { set, settings } = resolved;
|
|
103
155
|
const agentSlug = resolveAgentSlug(settings.defaultAgent, input.agent);
|
|
104
156
|
const harness = resolveHarness(settings.defaultHarness, input.harness);
|
|
105
157
|
const composed = compose(set, agentSlug, { projectDirectory: input.projectDirectory });
|
|
106
158
|
if (composed.plan === undefined) {
|
|
107
|
-
const messages = [...setupMessages, ...composed.warnings, ...composed.errors];
|
|
159
|
+
const messages = [...setupMessages, ...resolutionWarnings, ...composed.warnings, ...composed.errors];
|
|
108
160
|
emit(messages);
|
|
109
161
|
return { exitCode: 1, messages };
|
|
110
162
|
}
|
|
@@ -130,19 +182,22 @@ export const executeRunAgentCommand = async (input) => {
|
|
|
130
182
|
const warnings = [
|
|
131
183
|
...composed.plan.warnings,
|
|
132
184
|
...projection.unsupported.map((element) => `harness '${harness}' cannot project loadout element '${element}'.`),
|
|
185
|
+
...projection.warnings,
|
|
133
186
|
...extensions.warnings,
|
|
134
187
|
];
|
|
135
188
|
if (input.strict === true && warnings.length > 0) {
|
|
136
189
|
const messages = [
|
|
137
190
|
...setupMessages,
|
|
191
|
+
...resolutionWarnings,
|
|
138
192
|
...warnings,
|
|
139
193
|
'Strict mode: composition warnings and unsupported elements are fatal.',
|
|
140
194
|
];
|
|
141
195
|
emit(messages);
|
|
142
196
|
return { exitCode: 1, messages };
|
|
143
197
|
}
|
|
144
|
-
// Emit setup notices and warnings before launch so they precede
|
|
145
|
-
|
|
198
|
+
// Emit setup notices, resolution warnings, and composition warnings before launch so they precede
|
|
199
|
+
// the pi session on the terminal (and are returned to programmatic callers).
|
|
200
|
+
const messages = [...setupMessages, ...resolutionWarnings, ...warnings];
|
|
146
201
|
emit(messages);
|
|
147
202
|
// Attach the Outfitter runtime UI and sign-in extension to interactive pi sessions.
|
|
148
203
|
const launch = attachPiRuntimeExtension(projection.launch, {
|
|
@@ -150,8 +205,14 @@ export const executeRunAgentCommand = async (input) => {
|
|
|
150
205
|
profile: { id: agentSlug, label: composed.plan.identity.label },
|
|
151
206
|
rootDirectory,
|
|
152
207
|
});
|
|
153
|
-
|
|
154
|
-
|
|
208
|
+
// System hooks attach last, after projection and after the runtime extension,
|
|
209
|
+
// so an organization's collector applies to every launch — including
|
|
210
|
+
// `--mode rpc`, which fleet agents run — and cannot trip strict mode.
|
|
211
|
+
const systemHooks = attachSystemExtensionHooks(launch);
|
|
212
|
+
messages.push(...systemHooks.warnings);
|
|
213
|
+
emit(systemHooks.warnings);
|
|
214
|
+
const exitCode = await launchWithStatePersistence(input, harness, rootDirectory, systemHooks.launch, messages);
|
|
215
|
+
return { launchPlan: systemHooks.launch, exitCode, messages };
|
|
155
216
|
}
|
|
156
217
|
finally {
|
|
157
218
|
if (input.retainProjection !== true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunAgentCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/RunAgentCommand.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAgD7C,8GAA8G;AAC9G,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