@excitedjs/agent-runtime-claude-code 0.5.0 → 0.6.0-alpha.g7bf178cf6e11
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/activity/budget.d.ts +8 -0
- package/dist/activity/budget.d.ts.map +1 -0
- package/dist/activity/budget.js +9 -0
- package/dist/activity/budget.js.map +1 -0
- package/dist/{transcript → activity}/cursor.d.ts +2 -2
- package/dist/activity/cursor.d.ts.map +1 -0
- package/dist/{transcript → activity}/cursor.js +11 -11
- package/dist/activity/cursor.js.map +1 -0
- package/dist/activity/error.d.ts +16 -0
- package/dist/activity/error.d.ts.map +1 -0
- package/dist/activity/error.js +22 -0
- package/dist/activity/error.js.map +1 -0
- package/dist/activity/native-hash.d.ts.map +1 -0
- package/dist/activity/native-hash.js.map +1 -0
- package/dist/{transcript → activity}/opened-file.d.ts +3 -3
- package/dist/activity/opened-file.d.ts.map +1 -0
- package/dist/{transcript → activity}/opened-file.js +16 -16
- package/dist/activity/opened-file.js.map +1 -0
- package/dist/activity/parallel-tools.d.ts +6 -0
- package/dist/activity/parallel-tools.d.ts.map +1 -0
- package/dist/activity/parallel-tools.js.map +1 -0
- package/dist/activity/path.d.ts +25 -0
- package/dist/activity/path.d.ts.map +1 -0
- package/dist/{transcript → activity}/path.js +32 -32
- package/dist/activity/path.js.map +1 -0
- package/dist/activity/reader.d.ts +16 -0
- package/dist/activity/reader.d.ts.map +1 -0
- package/dist/{transcript → activity}/reader.js +120 -161
- package/dist/activity/reader.js.map +1 -0
- package/dist/activity/rewrites.d.ts.map +1 -0
- package/dist/activity/rewrites.js.map +1 -0
- package/dist/admission-classify.d.ts +7 -0
- package/dist/admission-classify.d.ts.map +1 -0
- package/dist/admission-classify.js +17 -0
- package/dist/admission-classify.js.map +1 -0
- package/dist/diagnostic.d.ts +2 -2
- package/dist/diagnostic.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-config.d.ts +1 -0
- package/dist/mcp-config.d.ts.map +1 -1
- package/dist/mcp-config.js +5 -0
- package/dist/mcp-config.js.map +1 -1
- package/dist/provider.d.ts +26 -38
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +33 -61
- package/dist/provider.js.map +1 -1
- package/dist/runtime-deps.d.ts +8 -11
- package/dist/runtime-deps.d.ts.map +1 -1
- package/dist/runtime-session.d.ts +0 -9
- package/dist/runtime-session.d.ts.map +1 -1
- package/dist/runtime-session.js +0 -14
- package/dist/runtime-session.js.map +1 -1
- package/dist/runtime-submissions.d.ts +19 -4
- package/dist/runtime-submissions.d.ts.map +1 -1
- package/dist/runtime-submissions.js +60 -8
- package/dist/runtime-submissions.js.map +1 -1
- package/dist/runtime.d.ts +67 -33
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +197 -170
- package/dist/runtime.js.map +1 -1
- package/package.json +3 -3
- package/dist/source-reservation.d.ts +0 -6
- package/dist/source-reservation.d.ts.map +0 -1
- package/dist/source-reservation.js +0 -48
- package/dist/source-reservation.js.map +0 -1
- package/dist/transcript/budget.d.ts +0 -8
- package/dist/transcript/budget.d.ts.map +0 -1
- package/dist/transcript/budget.js +0 -9
- package/dist/transcript/budget.js.map +0 -1
- package/dist/transcript/completion.d.ts +0 -8
- package/dist/transcript/completion.d.ts.map +0 -1
- package/dist/transcript/completion.js +0 -57
- package/dist/transcript/completion.js.map +0 -1
- package/dist/transcript/cursor.d.ts.map +0 -1
- package/dist/transcript/cursor.js.map +0 -1
- package/dist/transcript/error.d.ts +0 -9
- package/dist/transcript/error.d.ts.map +0 -1
- package/dist/transcript/error.js +0 -9
- package/dist/transcript/error.js.map +0 -1
- package/dist/transcript/native-hash.d.ts.map +0 -1
- package/dist/transcript/native-hash.js.map +0 -1
- package/dist/transcript/opened-file.d.ts.map +0 -1
- package/dist/transcript/opened-file.js.map +0 -1
- package/dist/transcript/parallel-tools.d.ts +0 -6
- package/dist/transcript/parallel-tools.d.ts.map +0 -1
- package/dist/transcript/parallel-tools.js.map +0 -1
- package/dist/transcript/path.d.ts +0 -25
- package/dist/transcript/path.d.ts.map +0 -1
- package/dist/transcript/path.js.map +0 -1
- package/dist/transcript/reader.d.ts +0 -7
- package/dist/transcript/reader.d.ts.map +0 -1
- package/dist/transcript/reader.js.map +0 -1
- package/dist/transcript/rewrites.d.ts.map +0 -1
- package/dist/transcript/rewrites.js.map +0 -1
- /package/dist/{transcript → activity}/native-hash.d.ts +0 -0
- /package/dist/{transcript → activity}/native-hash.js +0 -0
- /package/dist/{transcript → activity}/parallel-tools.js +0 -0
- /package/dist/{transcript → activity}/rewrites.d.ts +0 -0
- /package/dist/{transcript → activity}/rewrites.js +0 -0
package/dist/provider.d.ts
CHANGED
|
@@ -1,65 +1,53 @@
|
|
|
1
1
|
import type { ClaudeCodeRuntimeDeps } from './runtime-deps.js';
|
|
2
2
|
import { dispatcherClaudeCodeConfig, type DispatcherClaudeCodeConfig } from './config.js';
|
|
3
3
|
import { type ClaudeCodeSessionFactory } from './supervisor.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { AgentRuntimeProvider, AgentRuntimeProviderCapabilities, AgentRuntimeProviderFactory } from '@excitedjs/dreamux-types';
|
|
5
5
|
/**
|
|
6
|
-
* Construction options for the built-in Claude Code provider. Env injection
|
|
6
|
+
* Construction options for the built-in Claude Code provider. Env injection
|
|
7
7
|
* arrives on the NEUTRAL create context (`context.injectEnv`), not as a factory
|
|
8
|
-
* hook
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* hook, and registration identity is Core's: the provider carries no
|
|
9
|
+
* descriptor. What remains here are the test/host seams (the resident-session
|
|
10
|
+
* factory, an optional host bin resolver) that let core and tests wire behavior
|
|
11
|
+
* without changing the provider.
|
|
11
12
|
*/
|
|
12
13
|
export interface ClaudeCodeAgentRuntimeProviderOptions {
|
|
13
|
-
/**
|
|
14
|
-
* The registry descriptor for `builtin:claude-code`. Defaults to a minimal
|
|
15
|
-
* one. Accepted wide (`ProviderDescriptor`) so a host that resolved it from
|
|
16
|
-
* its registry need not pre-narrow the kind; the factory validates it is an
|
|
17
|
-
* `agentRuntime` descriptor.
|
|
18
|
-
*/
|
|
19
|
-
descriptor?: ProviderDescriptor;
|
|
20
14
|
/** Optional host-level bin resolver (default: identity on the config bin). */
|
|
21
15
|
resolveBinPath?: (bin: string) => string;
|
|
22
16
|
/** Override the resident-session factory (tests inject a fake). */
|
|
23
17
|
sessionFactory?: ClaudeCodeSessionFactory;
|
|
24
18
|
/** Override native session UUID generation for deterministic tests. */
|
|
25
19
|
generateSessionId?: ClaudeCodeRuntimeDeps['generateSessionId'];
|
|
26
|
-
/** Override native transcript path resolution for deterministic tests. */
|
|
27
|
-
resolveTranscriptPath?: ClaudeCodeRuntimeDeps['resolveTranscriptPath'];
|
|
28
20
|
}
|
|
29
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Provider-static selection metadata. Recovery, session-bound structured
|
|
23
|
+
* output, and recent Activity reads are mandatory provider behavior, so none of
|
|
24
|
+
* them is advertised here.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CLAUDE_CODE_AGENT_RUNTIME_CAPABILITIES: AgentRuntimeProviderCapabilities;
|
|
30
27
|
/**
|
|
31
28
|
* Create the built-in Claude Code `AgentRuntimeProvider`. It implements the
|
|
32
|
-
* neutral `@excitedjs/dreamux-types` contract: `
|
|
33
|
-
* runtime config, `
|
|
34
|
-
* builds a {@link ClaudeCodeRuntime} from the
|
|
35
|
-
* host-supplied options.
|
|
29
|
+
* neutral `@excitedjs/dreamux-types` contract: `config.read` parses Claude Code
|
|
30
|
+
* runtime config, `readRecentActivity` serves neutral Activity Records for any
|
|
31
|
+
* session, and `createRuntime` builds a {@link ClaudeCodeRuntime} from the
|
|
32
|
+
* neutral create context plus the host-supplied options.
|
|
33
|
+
*
|
|
34
|
+
* Claude Code resumes from its native session id alone, which it publishes as
|
|
35
|
+
* the neutral opaque session id.
|
|
36
36
|
*/
|
|
37
37
|
export declare function createClaudeCodeAgentRuntimeProvider(options?: ClaudeCodeAgentRuntimeProviderOptions): AgentRuntimeProvider<DispatcherClaudeCodeConfig>;
|
|
38
38
|
/** Re-export the typed accessor for a runtime's resolved claude-code config. */
|
|
39
39
|
export { dispatcherClaudeCodeConfig };
|
|
40
|
-
/**
|
|
41
|
-
* The context Dreamux core's generic provider package-loader passes to this
|
|
42
|
-
* package's factory export. A back-compat alias of the public
|
|
43
|
-
* {@link ProviderFactoryContext}, narrowed to the Agent Runtime descriptor kind
|
|
44
|
-
* so the factory assigns `descriptor` without a cast.
|
|
45
|
-
*/
|
|
46
|
-
export type ClaudeCodeProviderFactoryContext = ProviderFactoryContext<AgentRuntimeProviderDescriptor>;
|
|
47
40
|
/**
|
|
48
41
|
* Default export — the factory Dreamux core's generic provider-loader selects
|
|
49
42
|
* for the `builtin:claude-code` ref (it imports this package and calls the
|
|
50
|
-
* default export with `{ ref
|
|
51
|
-
*
|
|
52
|
-
* and `process.env` base env.
|
|
43
|
+
* default export with `{ ref }`). It returns a provider on package defaults:
|
|
44
|
+
* the real resident-session factory and an identity bin resolver.
|
|
53
45
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* path context, and any role-gated skill sources; MCP shims receive an explicit
|
|
60
|
-
* dreamux bin path). This default export keeps the package a
|
|
61
|
-
* first-class, loadable `AgentRuntimeProvider` for the generic loader and for
|
|
62
|
-
* external embedders.
|
|
46
|
+
* This is the production path. Core drives the loaded provider through the
|
|
47
|
+
* neutral facade alone — it holds no adapter for this package — and supplies
|
|
48
|
+
* every host contract (state lease, path context, skill sources, MCP servers)
|
|
49
|
+
* through the neutral create context. The options argument of
|
|
50
|
+
* {@link createClaudeCodeAgentRuntimeProvider} exists for embedders and tests.
|
|
63
51
|
*/
|
|
64
52
|
declare const claudeCodeAgentRuntimeProviderFactory: AgentRuntimeProviderFactory<DispatcherClaudeCodeConfig>;
|
|
65
53
|
export default claudeCodeAgentRuntimeProviderFactory;
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAEL,0BAA0B,EAE1B,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAEL,0BAA0B,EAE1B,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAGV,oBAAoB,EACpB,gCAAgC,EAChC,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AASlC;;;;;;;GAOG;AACH,MAAM,WAAW,qCAAqC;IACpD,8EAA8E;IAC9E,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,mEAAmE;IACnE,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CAChE;AAED;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,EAAE,gCACvC,CAAC;AAEf;;;;;;;;;GASG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,GAAE,qCAA0C,GAClD,oBAAoB,CAAC,0BAA0B,CAAC,CAiElD;AAED,gFAAgF;AAChF,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,qCAAqC,EAAE,2BAA2B,CACtE,0BAA0B,CACoB,CAAC;AAEjD,eAAe,qCAAqC,CAAC"}
|
package/dist/provider.js
CHANGED
|
@@ -1,49 +1,32 @@
|
|
|
1
1
|
import { ClaudeCodeRuntime } from './runtime.js';
|
|
2
2
|
import { DEFAULT_CLAUDE_CODE_BIN, dispatcherClaudeCodeConfig, readDispatcherClaudeCodeConfig, } from './config.js';
|
|
3
3
|
import { createDefaultClaudeCodeSession, } from './supervisor.js';
|
|
4
|
-
import { BUILTIN_CLAUDE_CODE_PROVIDER_REF } from './provider-ref.js';
|
|
5
4
|
import { claudeCodeAgentRuntimeDiagnostic } from './diagnostic.js';
|
|
6
|
-
import {
|
|
5
|
+
import { readClaudeRecentActivity } from './activity/reader.js';
|
|
7
6
|
function normalizedSystemPromptAppend(append) {
|
|
8
7
|
const normalized = (append ?? []).filter((prompt) => prompt !== '');
|
|
9
8
|
return normalized.length > 0 ? normalized : undefined;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
kind: 'agentRuntime',
|
|
18
|
-
ref: {
|
|
19
|
-
source: 'builtin',
|
|
20
|
-
id: 'claude-code',
|
|
21
|
-
raw: BUILTIN_CLAUDE_CODE_PROVIDER_REF,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
/** Validate + narrow a seed descriptor to the Agent Runtime kind. */
|
|
25
|
-
function asAgentRuntimeDescriptor(descriptor) {
|
|
26
|
-
if (descriptor.kind !== 'agentRuntime') {
|
|
27
|
-
throw new Error(`@excitedjs/agent-runtime-claude-code: descriptor.kind must be ` +
|
|
28
|
-
`'agentRuntime' (got ${JSON.stringify(descriptor.kind)})`);
|
|
29
|
-
}
|
|
30
|
-
return { ...descriptor, kind: descriptor.kind };
|
|
31
|
-
}
|
|
10
|
+
/**
|
|
11
|
+
* Provider-static selection metadata. Recovery, session-bound structured
|
|
12
|
+
* output, and recent Activity reads are mandatory provider behavior, so none of
|
|
13
|
+
* them is advertised here.
|
|
14
|
+
*/
|
|
15
|
+
export const CLAUDE_CODE_AGENT_RUNTIME_CAPABILITIES = { tags: [] };
|
|
32
16
|
/**
|
|
33
17
|
* Create the built-in Claude Code `AgentRuntimeProvider`. It implements the
|
|
34
|
-
* neutral `@excitedjs/dreamux-types` contract: `
|
|
35
|
-
* runtime config, `
|
|
36
|
-
* builds a {@link ClaudeCodeRuntime} from the
|
|
37
|
-
* host-supplied options.
|
|
18
|
+
* neutral `@excitedjs/dreamux-types` contract: `config.read` parses Claude Code
|
|
19
|
+
* runtime config, `readRecentActivity` serves neutral Activity Records for any
|
|
20
|
+
* session, and `createRuntime` builds a {@link ClaudeCodeRuntime} from the
|
|
21
|
+
* neutral create context plus the host-supplied options.
|
|
22
|
+
*
|
|
23
|
+
* Claude Code resumes from its native session id alone, which it publishes as
|
|
24
|
+
* the neutral opaque session id.
|
|
38
25
|
*/
|
|
39
26
|
export function createClaudeCodeAgentRuntimeProvider(options = {}) {
|
|
40
27
|
const sessionFactory = options.sessionFactory ?? createDefaultClaudeCodeSession;
|
|
41
28
|
const resolveBinPath = options.resolveBinPath ?? ((bin) => bin);
|
|
42
29
|
return {
|
|
43
|
-
ref: BUILTIN_CLAUDE_CODE_PROVIDER_REF,
|
|
44
|
-
descriptor: options.descriptor === undefined
|
|
45
|
-
? DEFAULT_CLAUDE_CODE_DESCRIPTOR
|
|
46
|
-
: asAgentRuntimeDescriptor(options.descriptor),
|
|
47
30
|
getCapabilities: () => CLAUDE_CODE_AGENT_RUNTIME_CAPABILITIES,
|
|
48
31
|
diagnostic: claudeCodeAgentRuntimeDiagnostic,
|
|
49
32
|
onboard: {
|
|
@@ -56,23 +39,20 @@ export function createClaudeCodeAgentRuntimeProvider(options = {}) {
|
|
|
56
39
|
return { bin };
|
|
57
40
|
},
|
|
58
41
|
},
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
config: {
|
|
43
|
+
read(rawConfig, context) {
|
|
44
|
+
return readDispatcherClaudeCodeConfig(rawConfig, context.file, context.prefix);
|
|
45
|
+
},
|
|
61
46
|
},
|
|
62
|
-
|
|
63
|
-
createRuntime(context) {
|
|
64
|
-
if (context.state === undefined) {
|
|
65
|
-
throw new Error('claude-code runtime requires a state sink in the create context');
|
|
66
|
-
}
|
|
67
|
-
if (context.paths === undefined) {
|
|
68
|
-
throw new Error('claude-code runtime requires a path context in the create context');
|
|
69
|
-
}
|
|
47
|
+
readRecentActivity: (query, context) => readClaudeRecentActivity(query, context),
|
|
48
|
+
async createRuntime(context) {
|
|
70
49
|
const systemPromptAppend = normalizedSystemPromptAppend(context.systemPrompt?.append);
|
|
71
50
|
const deps = {
|
|
72
51
|
config: context.config,
|
|
73
52
|
cwd: context.cwd,
|
|
74
53
|
state: context.state,
|
|
75
|
-
activitySink: context.
|
|
54
|
+
activitySink: context.activity ?? (() => undefined),
|
|
55
|
+
nativeTurnSink: context.nativeTurn ?? (() => undefined),
|
|
76
56
|
paths: context.paths,
|
|
77
57
|
mcpServers: context.mcpServers,
|
|
78
58
|
sessionFactory,
|
|
@@ -83,16 +63,13 @@ export function createClaudeCodeAgentRuntimeProvider(options = {}) {
|
|
|
83
63
|
...(context.skillSources !== undefined
|
|
84
64
|
? { skillSources: context.skillSources }
|
|
85
65
|
: {}),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
66
|
+
// Neutral seam name in, provider-native name out: `disableFeatures` is
|
|
67
|
+
// this package's own internal wording and stops at the adapter.
|
|
68
|
+
disableFeatures: context.disabledFeatures,
|
|
89
69
|
outputSchema: context.outputSchema,
|
|
90
70
|
...(options.generateSessionId !== undefined
|
|
91
71
|
? { generateSessionId: options.generateSessionId }
|
|
92
72
|
: {}),
|
|
93
|
-
...(options.resolveTranscriptPath !== undefined
|
|
94
|
-
? { resolveTranscriptPath: options.resolveTranscriptPath }
|
|
95
|
-
: {}),
|
|
96
73
|
...(systemPromptAppend !== undefined
|
|
97
74
|
? { systemPromptAppend }
|
|
98
75
|
: {}),
|
|
@@ -107,20 +84,15 @@ export { dispatcherClaudeCodeConfig };
|
|
|
107
84
|
/**
|
|
108
85
|
* Default export — the factory Dreamux core's generic provider-loader selects
|
|
109
86
|
* for the `builtin:claude-code` ref (it imports this package and calls the
|
|
110
|
-
* default export with `{ ref
|
|
111
|
-
*
|
|
112
|
-
* and `process.env` base env.
|
|
87
|
+
* default export with `{ ref }`). It returns a provider on package defaults:
|
|
88
|
+
* the real resident-session factory and an identity bin resolver.
|
|
113
89
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* path context, and any role-gated skill sources; MCP shims receive an explicit
|
|
120
|
-
* dreamux bin path). This default export keeps the package a
|
|
121
|
-
* first-class, loadable `AgentRuntimeProvider` for the generic loader and for
|
|
122
|
-
* external embedders.
|
|
90
|
+
* This is the production path. Core drives the loaded provider through the
|
|
91
|
+
* neutral facade alone — it holds no adapter for this package — and supplies
|
|
92
|
+
* every host contract (state lease, path context, skill sources, MCP servers)
|
|
93
|
+
* through the neutral create context. The options argument of
|
|
94
|
+
* {@link createClaudeCodeAgentRuntimeProvider} exists for embedders and tests.
|
|
123
95
|
*/
|
|
124
|
-
const claudeCodeAgentRuntimeProviderFactory = (
|
|
96
|
+
const claudeCodeAgentRuntimeProviderFactory = () => createClaudeCodeAgentRuntimeProvider();
|
|
125
97
|
export default claudeCodeAgentRuntimeProviderFactory;
|
|
126
98
|
//# sourceMappingURL=provider.js.map
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,8BAA8B,GAE/B,MAAM,aAAa,C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AC,EAAE,CAAC;gBACP,uEAAuE;gBACvE,gEAAgE;gBAChE,eAAe,EAAE,OAAO,CAAC,gBAAgB;gBACzC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,GAAG,CAAC,OAAO,CAAC,iBAAiB,KAAK,SAAS;oBACzC,CAAC,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,EAAE;oBAClD,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,kBAAkB,KAAK,SAAS;oBAClC,CAAC,CAAC,EAAE,kBAAkB,EAAE;oBACxB,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACpE,CAAC;YACF,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC;KACF,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,qCAAqC,GAEvC,GAAG,EAAE,CAAC,oCAAoC,EAAE,CAAC;AAEjD,eAAe,qCAAqC,CAAC"}
|
package/dist/runtime-deps.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AgentRuntimeMcpServer, AgentRuntimePathContext, AgentRuntimeSkillSource,
|
|
1
|
+
import type { AgentRuntimeActivitySink, AgentRuntimeMcpServer, AgentRuntimeNativeTurnSink, AgentRuntimePathContext, AgentRuntimeSkillSource, AgentRuntimeStateSink, DreamuxLogger } from '@excitedjs/dreamux-types';
|
|
2
2
|
import type { DispatcherClaudeCodeConfig } from './config.js';
|
|
3
3
|
import type { ClaudeCodeSessionFactory } from './supervisor.js';
|
|
4
4
|
/** Neutral host capabilities required by one resident Claude Code runtime. */
|
|
5
5
|
export interface ClaudeCodeRuntimeDeps {
|
|
6
6
|
config: DispatcherClaudeCodeConfig;
|
|
7
7
|
cwd: string;
|
|
8
|
-
state:
|
|
8
|
+
state: AgentRuntimeStateSink;
|
|
9
9
|
paths: AgentRuntimePathContext;
|
|
10
10
|
mcpServers: readonly AgentRuntimeMcpServer[];
|
|
11
11
|
sessionFactory: ClaudeCodeSessionFactory;
|
|
@@ -14,17 +14,14 @@ export interface ClaudeCodeRuntimeDeps {
|
|
|
14
14
|
systemPromptAppend?: readonly string[];
|
|
15
15
|
skillSources?: readonly AgentRuntimeSkillSource[];
|
|
16
16
|
disableFeatures?: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* The session-bound output schema, applied at spawn via `--json-schema`. It is
|
|
19
|
+
* fixed for the life of this runtime; no submission can change it.
|
|
20
|
+
*/
|
|
17
21
|
outputSchema?: Record<string, unknown>;
|
|
18
22
|
generateSessionId?: () => string;
|
|
19
|
-
resolveTranscriptPath?: (input: {
|
|
20
|
-
sessionId: string;
|
|
21
|
-
cwd: string;
|
|
22
|
-
locator: string | null;
|
|
23
|
-
env: NodeJS.ProcessEnv;
|
|
24
|
-
resume: boolean;
|
|
25
|
-
}) => Promise<string>;
|
|
26
|
-
sourceIdDedupeWindow?: number;
|
|
27
23
|
logger?: DreamuxLogger;
|
|
28
|
-
activitySink:
|
|
24
|
+
activitySink: AgentRuntimeActivitySink;
|
|
25
|
+
nativeTurnSink: AgentRuntimeNativeTurnSink;
|
|
29
26
|
}
|
|
30
27
|
//# sourceMappingURL=runtime-deps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-deps.d.ts","sourceRoot":"","sources":["../src/runtime-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"runtime-deps.d.ts","sourceRoot":"","sources":["../src/runtime-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACd,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,8EAA8E;AAC9E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,0BAA0B,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,EAAE,uBAAuB,CAAC;IAC/B,UAAU,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC7C,cAAc,EAAE,wBAAwB,CAAC;IACzC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,YAAY,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAClD,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,wBAAwB,CAAC;IACvC,cAAc,EAAE,0BAA0B,CAAC;CAC5C"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type { TurnOutcome } from './supervisor.js';
|
|
2
|
-
export interface ResolveRuntimeTranscriptPathInput {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
cwd: string;
|
|
5
|
-
locator: string | null;
|
|
6
|
-
env: NodeJS.ProcessEnv;
|
|
7
|
-
resume: boolean;
|
|
8
|
-
override?: (input: Omit<ResolveRuntimeTranscriptPathInput, 'override'>) => Promise<string>;
|
|
9
|
-
}
|
|
10
2
|
export declare function buildClaudeProcessEnv(injectEnv: Record<string, string> | undefined, extraEnv: Record<string, string>): NodeJS.ProcessEnv;
|
|
11
|
-
export declare function resolveRuntimeTranscriptPath(input: ResolveRuntimeTranscriptPathInput): Promise<string>;
|
|
12
3
|
export declare function resultTextFromTurnOutcome(outcome: TurnOutcome, expectedSessionId: string | null, requiresStructuredOutput: boolean): string | null;
|
|
13
4
|
//# sourceMappingURL=runtime-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-session.d.ts","sourceRoot":"","sources":["../src/runtime-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-session.d.ts","sourceRoot":"","sources":["../src/runtime-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CAAC,UAAU,CAMnB;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,wBAAwB,EAAE,OAAO,GAChC,MAAM,GAAG,IAAI,CA0Bf"}
|
package/dist/runtime-session.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { deriveClaudeTranscriptPath, locateClaudeTranscript, } from './transcript/path.js';
|
|
2
1
|
export function buildClaudeProcessEnv(injectEnv, extraEnv) {
|
|
3
2
|
return {
|
|
4
3
|
...globalThis.process.env,
|
|
@@ -6,19 +5,6 @@ export function buildClaudeProcessEnv(injectEnv, extraEnv) {
|
|
|
6
5
|
...extraEnv,
|
|
7
6
|
};
|
|
8
7
|
}
|
|
9
|
-
export function resolveRuntimeTranscriptPath(input) {
|
|
10
|
-
const { override, ...pathInput } = input;
|
|
11
|
-
if (override !== undefined)
|
|
12
|
-
return override(pathInput);
|
|
13
|
-
return input.resume
|
|
14
|
-
? locateClaudeTranscript({
|
|
15
|
-
sessionId: input.sessionId,
|
|
16
|
-
cwd: input.cwd,
|
|
17
|
-
locator: input.locator,
|
|
18
|
-
env: input.env,
|
|
19
|
-
}).then((located) => located.path)
|
|
20
|
-
: deriveClaudeTranscriptPath(input.sessionId, input.cwd, input.env);
|
|
21
|
-
}
|
|
22
8
|
export function resultTextFromTurnOutcome(outcome, expectedSessionId, requiresStructuredOutput) {
|
|
23
9
|
if (outcome.sessionId !== null &&
|
|
24
10
|
outcome.sessionId !== '' &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-session.js","sourceRoot":"","sources":["../src/runtime-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-session.js","sourceRoot":"","sources":["../src/runtime-session.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CACnC,SAA6C,EAC7C,QAAgC;IAEhC,OAAO;QACL,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG;QACzB,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;QACpB,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAoB,EACpB,iBAAgC,EAChC,wBAAiC;IAEjC,IACE,OAAO,CAAC,SAAS,KAAK,IAAI;QAC1B,OAAO,CAAC,SAAS,KAAK,EAAE;QACxB,OAAO,CAAC,SAAS,KAAK,iBAAiB,EACvC,CAAC;QACD,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GACd,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/D,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YACvB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YAC3B,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,eAAe,CAAC,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,yCAAyC,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,wBAAwB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CACb,qDAAqD;YACnD,uBAAuB,CAC1B,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { ClaudeCodeSession } from './supervisor.js';
|
|
2
|
-
import type { ClaudeProtocolEvent
|
|
3
|
-
import type { JsonValue,
|
|
2
|
+
import type { ClaudeProtocolEvent } from './types.js';
|
|
3
|
+
import type { JsonValue, AgentRuntimeActivitySink, AgentRuntimeNativeTurnSink, RuntimeNativeTurnEnd, RuntimeSubmission, RuntimeSubmissionSettlement } from '@excitedjs/dreamux-types';
|
|
4
4
|
export interface SubmissionDeferred {
|
|
5
5
|
submission: RuntimeSubmission;
|
|
6
6
|
settle: (settlement: RuntimeSubmissionSettlement) => boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* One resident execution window: the commands claude is serving together.
|
|
10
|
+
*
|
|
11
|
+
* It is not one native turn. A window is opened by an initial command and can
|
|
12
|
+
* legally produce several sequential `result` boundaries — one native turn each
|
|
13
|
+
* — as commands steered or queued into it run after the earlier ones were
|
|
14
|
+
* answered.
|
|
15
|
+
*/
|
|
8
16
|
export interface ActiveTurn {
|
|
9
17
|
initialCommandUuid: string;
|
|
10
18
|
submissions: Map<string, SubmissionDeferred>;
|
|
@@ -21,14 +29,21 @@ export interface ActiveTurn {
|
|
|
21
29
|
rejectSession: (error: Error) => void;
|
|
22
30
|
steerQueue: Promise<void>;
|
|
23
31
|
generation: number;
|
|
24
|
-
submitOptions?: TurnSubmitOptions;
|
|
25
32
|
}
|
|
26
33
|
export interface ProtocolEventContext {
|
|
27
34
|
threadId: string | null;
|
|
28
35
|
outputSchemaEnabled: boolean;
|
|
29
|
-
activitySink:
|
|
36
|
+
activitySink: AgentRuntimeActivitySink;
|
|
37
|
+
nativeTurnSink: AgentRuntimeNativeTurnSink;
|
|
30
38
|
log: (level: 'info' | 'warn' | 'error', message: string, error?: unknown) => void;
|
|
31
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Report the end of one native turn.
|
|
42
|
+
*
|
|
43
|
+
* The sink is display-only, so a throwing consumer is logged and the window
|
|
44
|
+
* proceeds.
|
|
45
|
+
*/
|
|
46
|
+
export declare function endNativeTurn(status: RuntimeNativeTurnEnd['status'], sink: AgentRuntimeNativeTurnSink, log: (level: 'info' | 'warn' | 'error', message: string, error?: unknown) => void): void;
|
|
32
47
|
export declare function createRuntimeSubmission(): SubmissionDeferred;
|
|
33
48
|
export declare function handleProtocolEvent(active: ActiveTurn, event: ClaudeProtocolEvent, context: ProtocolEventContext): void;
|
|
34
49
|
//# sourceMappingURL=runtime-submissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-submissions.d.ts","sourceRoot":"","sources":["../src/runtime-submissions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAe,
|
|
1
|
+
{"version":3,"file":"runtime-submissions.d.ts","sourceRoot":"","sources":["../src/runtime-submissions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAA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AAM,GAAG,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,IAAI,EAAE,0BAA0B,EAChC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,GAChF,IAAI,CAMN;AAED,wBAAgB,uBAAuB,IAAI,kBAAkB,CAiB5D;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CAkBN"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { resultTextFromTurnOutcome } from './runtime-session.js';
|
|
2
|
+
/**
|
|
3
|
+
* Report the end of one native turn.
|
|
4
|
+
*
|
|
5
|
+
* The sink is display-only, so a throwing consumer is logged and the window
|
|
6
|
+
* proceeds.
|
|
7
|
+
*/
|
|
8
|
+
export function endNativeTurn(status, sink, log) {
|
|
9
|
+
try {
|
|
10
|
+
sink(Object.freeze({ status, occurredAt: Date.now() }));
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
log('warn', 'claude native turn end projection failed', error);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
2
16
|
export function createRuntimeSubmission() {
|
|
3
17
|
let resolve;
|
|
4
18
|
let settled = false;
|
|
@@ -63,7 +77,6 @@ function completeStartedGroup(active, outcome, context) {
|
|
|
63
77
|
if (outcome.isError) {
|
|
64
78
|
completion = Object.freeze({
|
|
65
79
|
status: 'failed',
|
|
66
|
-
displaySubmission: representative.submission,
|
|
67
80
|
error: new Error(outcome.errors.join('; ') || outcome.subtype || 'claude turn failed'),
|
|
68
81
|
});
|
|
69
82
|
}
|
|
@@ -71,7 +84,6 @@ function completeStartedGroup(active, outcome, context) {
|
|
|
71
84
|
try {
|
|
72
85
|
completion = Object.freeze({
|
|
73
86
|
status: 'completed',
|
|
74
|
-
displaySubmission: representative.submission,
|
|
75
87
|
resultText: resultTextFromTurnOutcome(outcome, context.threadId, context.outputSchemaEnabled),
|
|
76
88
|
truncated: false,
|
|
77
89
|
});
|
|
@@ -79,11 +91,15 @@ function completeStartedGroup(active, outcome, context) {
|
|
|
79
91
|
catch (error) {
|
|
80
92
|
completion = Object.freeze({
|
|
81
93
|
status: 'failed',
|
|
82
|
-
displaySubmission: representative.submission,
|
|
83
94
|
error: asError(error),
|
|
84
95
|
});
|
|
85
96
|
}
|
|
86
97
|
}
|
|
98
|
+
// The `result` is claude's native terminal, so the native turn it answers
|
|
99
|
+
// ends here regardless of how many commands were folded into it. A window
|
|
100
|
+
// that goes on to run another command opens another native turn and reaches
|
|
101
|
+
// this again with its own `result`.
|
|
102
|
+
endNativeTurn(completion.status === 'completed' ? 'completed' : 'failed', context.nativeTurnSink, context.log);
|
|
87
103
|
for (const uuid of commandUuids) {
|
|
88
104
|
active.submissions.get(uuid)?.settle({ kind: 'completion', completion });
|
|
89
105
|
}
|
|
@@ -93,6 +109,7 @@ function failUnattributedResult(active, context) {
|
|
|
93
109
|
? 'claude emitted a conflicting result without a new started command'
|
|
94
110
|
: 'claude result cannot be attributed without command started lifecycle');
|
|
95
111
|
context.log('error', error.message, error);
|
|
112
|
+
endNativeTurn('failed', context.nativeTurnSink, context.log);
|
|
96
113
|
for (const deferred of active.submissions.values()) {
|
|
97
114
|
deferred.settle({ kind: 'failed', error });
|
|
98
115
|
}
|
|
@@ -149,6 +166,7 @@ function activityForBlock(active, messageId, blockIndex, block) {
|
|
|
149
166
|
id: `${messageId}:${callId}:started`,
|
|
150
167
|
callId,
|
|
151
168
|
toolName: name,
|
|
169
|
+
action: namedToolAction(name),
|
|
152
170
|
status: 'started',
|
|
153
171
|
arguments: args,
|
|
154
172
|
result: null,
|
|
@@ -162,17 +180,54 @@ function activityForBlock(active, messageId, blockIndex, block) {
|
|
|
162
180
|
return null;
|
|
163
181
|
const known = active.tools.get(callId);
|
|
164
182
|
const failed = block['is_error'] === true;
|
|
183
|
+
const result = normalizeTextBlocks(block['content']);
|
|
165
184
|
return {
|
|
166
185
|
kind: 'tool.call',
|
|
167
186
|
id: `${messageId}:${callId}:result`,
|
|
168
187
|
callId,
|
|
169
188
|
toolName: known?.name ?? 'tool',
|
|
189
|
+
action: namedToolAction(known?.name),
|
|
170
190
|
status: failed ? 'failed' : 'completed',
|
|
171
191
|
arguments: known?.arguments ?? null,
|
|
172
|
-
result
|
|
173
|
-
error: failed ?
|
|
192
|
+
result,
|
|
193
|
+
error: failed ? displayError(result) : null,
|
|
174
194
|
};
|
|
175
195
|
}
|
|
196
|
+
function displayError(value) {
|
|
197
|
+
if (value === null)
|
|
198
|
+
return null;
|
|
199
|
+
return typeof value === 'string' ? value : JSON.stringify(value);
|
|
200
|
+
}
|
|
201
|
+
function namedToolAction(value) {
|
|
202
|
+
switch (value) {
|
|
203
|
+
case 'Read': return 'read';
|
|
204
|
+
case 'Grep':
|
|
205
|
+
case 'Glob':
|
|
206
|
+
case 'WebSearch': return 'search';
|
|
207
|
+
case 'Write':
|
|
208
|
+
case 'Edit':
|
|
209
|
+
case 'MultiEdit':
|
|
210
|
+
case 'NotebookEdit': return 'edit';
|
|
211
|
+
case 'Bash':
|
|
212
|
+
case 'PowerShell': return 'run';
|
|
213
|
+
default: return null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function normalizeTextBlocks(value) {
|
|
217
|
+
if (!Array.isArray(value))
|
|
218
|
+
return toJsonValue(value);
|
|
219
|
+
if (value.length === 0)
|
|
220
|
+
return null;
|
|
221
|
+
const texts = value.map((entry) => {
|
|
222
|
+
const record = recordValue(entry);
|
|
223
|
+
return record?.['type'] === 'text' && typeof record['text'] === 'string'
|
|
224
|
+
? record['text']
|
|
225
|
+
: null;
|
|
226
|
+
});
|
|
227
|
+
return texts.every((text) => text !== null)
|
|
228
|
+
? texts.join('\n')
|
|
229
|
+
: toJsonValue(value);
|
|
230
|
+
}
|
|
176
231
|
function recordValue(value) {
|
|
177
232
|
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
178
233
|
? value
|
|
@@ -191,9 +246,6 @@ function toJsonValue(value) {
|
|
|
191
246
|
return String(value);
|
|
192
247
|
}
|
|
193
248
|
}
|
|
194
|
-
function renderJsonValue(value) {
|
|
195
|
-
return typeof value === 'string' ? value : JSON.stringify(value);
|
|
196
|
-
}
|
|
197
249
|
function asError(error) {
|
|
198
250
|
return error instanceof Error ? error : new Error(String(error));
|
|
199
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-submissions.js","sourceRoot":"","sources":["../src/runtime-submissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-submissions.js","sourceRoot":"","sources":["../src/runtime-submissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAmDjE;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAsC,EACtC,IAAgC,EAChC,GAAiF;IAEjF,IAAI,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,MAAM,EAAE,0CAA0C,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAI,OAA2D,CAAC;IAChE,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;QAC/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