@borgee/agents-host 0.2.44 → 0.2.56
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 +23 -27
- package/dist/agents-host.d.ts +26 -5
- package/dist/agents-host.js +163 -192
- package/dist/chat/chat-control-plane.d.ts +3 -0
- package/dist/chat/sdk-chat-control-plane.d.ts +4 -3
- package/dist/chat/sdk-chat-control-plane.js +3 -0
- package/dist/cli.js +1 -5
- package/dist/compatibility-gates.d.ts +4 -0
- package/dist/compatibility-gates.js +18 -1
- package/dist/context/claude-file-brief.d.ts +2 -0
- package/dist/context/claude-file-brief.js +83 -0
- package/dist/context/compaction.d.ts +20 -0
- package/dist/context/compaction.js +59 -0
- package/dist/context/injection.d.ts +39 -6
- package/dist/context/injection.js +317 -26
- package/dist/context/main-session-delegation.d.ts +1 -1
- package/dist/context/projection-strategy.d.ts +24 -0
- package/dist/context/projection-strategy.js +90 -0
- package/dist/context/prompt.d.ts +16 -1
- package/dist/context/prompt.js +456 -22
- package/dist/context/resolved-workspace.d.ts +2 -0
- package/dist/context/resolved-workspace.js +64 -0
- package/dist/context/skill-manual.d.ts +1 -0
- package/dist/context/skill-manual.js +4 -1
- package/dist/context/turn-preparation.d.ts +8 -2
- package/dist/context/turn-preparation.js +56 -14
- package/dist/gateway/localhost-gateway.js +2 -0
- package/dist/managed-daemon.js +122 -9
- package/dist/plugin-sdk.js +276 -359
- package/dist/plugin-sdk.js.map +4 -4
- package/dist/progress-to-activity.d.ts +16 -0
- package/dist/progress-to-activity.js +24 -0
- package/dist/projection-strategy-values.d.ts +4 -0
- package/dist/projection-strategy-values.js +28 -0
- package/dist/providers/acp-progress-collector.d.ts +44 -0
- package/dist/providers/acp-progress-collector.js +130 -0
- package/dist/providers/awaiting-user.d.ts +2 -3
- package/dist/providers/awaiting-user.js +5 -7
- package/dist/providers/claude/activity-metadata.d.ts +14 -0
- package/dist/providers/claude/activity-metadata.js +81 -0
- package/dist/providers/claude/cli-client.d.ts +1 -2
- package/dist/providers/claude/cli-client.js +190 -117
- package/dist/providers/codex/cli-client.js +3 -83
- package/dist/providers/codex/project-doc.js +12 -11
- package/dist/providers/copilot/cli-client.js +3 -83
- package/dist/providers/create-provider.d.ts +2 -0
- package/dist/providers/create-provider.js +20 -4
- package/dist/state-paths.d.ts +1 -1
- package/dist/state-paths.js +3 -3
- package/dist/task-thread-resolution.d.ts +3 -2
- package/dist/types.d.ts +130 -6
- package/package.json +2 -2
- package/skills/borgee-agent/SKILL.md +9 -1
- package/skills/borgee-agent/references/task-properties.md +5 -2
- package/dist/durable-cursor-store.d.ts +0 -5
- package/dist/durable-cursor-store.js +0 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
+
import { DEFAULT_PROJECTION_STRATEGY, normalizeProjectionStrategy, } from './projection-strategy-values.js';
|
|
2
3
|
export const CLAUDE_PROVIDER_V2_COMPATIBILITY_GATE = 'claude-provider-v2';
|
|
3
4
|
export const COPILOT_PROVIDER_V2_COMPATIBILITY_GATE = 'copilot-provider-v2';
|
|
4
5
|
export const CODEX_PROVIDER_COMPATIBILITY_GATE = 'codex-provider';
|
|
@@ -19,6 +20,7 @@ export const COMPATIBILITY_GATES_ENV = 'AGENTS_HOST_INTERNAL_COMPATIBILITY_GATES
|
|
|
19
20
|
export const INTERNAL_DISABLED_COMPATIBILITY_GATES_ENV = 'AGENTS_HOST_INTERNAL_DISABLED_COMPATIBILITY_GATES';
|
|
20
21
|
export const INTERNAL_POLICY_MODE_ENV = 'AGENTS_HOST_INTERNAL_POLICY_MODE';
|
|
21
22
|
export const INTERNAL_PROVIDER_IMPLEMENTATIONS_ENV = 'AGENTS_HOST_INTERNAL_PROVIDER_IMPLEMENTATIONS';
|
|
23
|
+
export const INTERNAL_CLAUDE_PROMPT_STRATEGY_ENV = 'AGENTS_HOST_INTERNAL_CLAUDE_PROMPT_STRATEGY';
|
|
22
24
|
export const MANAGED_RUNTIME_SETTINGS_SCHEMA_VERSION = 1;
|
|
23
25
|
const VALID_PROVIDER_IMPLEMENTATION_ENTRIES = '"claude:v1", "claude:v2", "copilot:v1", or "copilot:v2"';
|
|
24
26
|
export const DEFAULT_INTERNAL_COMPATIBILITY_GATES = Object.freeze([
|
|
@@ -44,6 +46,17 @@ function sortUniqueStrings(values) {
|
|
|
44
46
|
return [...new Set([...values].map((value) => value.trim()).filter((value) => value.length > 0))]
|
|
45
47
|
.sort((left, right) => left.localeCompare(right));
|
|
46
48
|
}
|
|
49
|
+
export function resolveInternalProjectionStrategy(env = process.env) {
|
|
50
|
+
const rawValue = env[INTERNAL_CLAUDE_PROMPT_STRATEGY_ENV]?.trim();
|
|
51
|
+
if (!rawValue || rawValue.length === 0) {
|
|
52
|
+
return DEFAULT_PROJECTION_STRATEGY;
|
|
53
|
+
}
|
|
54
|
+
const strategy = normalizeProjectionStrategy(rawValue);
|
|
55
|
+
if (strategy) {
|
|
56
|
+
return strategy;
|
|
57
|
+
}
|
|
58
|
+
throw new Error(`Invalid ${INTERNAL_CLAUDE_PROMPT_STRATEGY_ENV}: expected "session-brief", "turn-full", "message-only", or "turn-thin"`);
|
|
59
|
+
}
|
|
47
60
|
function isInternalProviderImplementationPath(value) {
|
|
48
61
|
return value === 'v1' || value === 'v2';
|
|
49
62
|
}
|
|
@@ -160,10 +173,14 @@ export function resolveManagedRuntimeSettingsSnapshot(env = process.env) {
|
|
|
160
173
|
compatibilityGates,
|
|
161
174
|
providerImplementationOverrides: resolveManagedRuntimeProviderImplementationOverrides(env, compatibilityGates),
|
|
162
175
|
internalPolicyMode: resolveInternalPolicyMode(compatibilityGates.includes(POLICY_AUDIT_ENFORCEMENT_COMPATIBILITY_GATE), env),
|
|
176
|
+
projectionStrategy: resolveInternalProjectionStrategy(env),
|
|
163
177
|
};
|
|
164
178
|
}
|
|
165
179
|
export function serializeManagedRuntimeSettingsSnapshot(snapshot) {
|
|
166
|
-
return JSON.stringify(
|
|
180
|
+
return JSON.stringify({
|
|
181
|
+
...snapshot,
|
|
182
|
+
claudePromptStrategy: snapshot.projectionStrategy,
|
|
183
|
+
});
|
|
167
184
|
}
|
|
168
185
|
export function createManagedRuntimeSettingsFingerprint(snapshot) {
|
|
169
186
|
return createHash('sha256')
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { buildCollaborationCapabilityDeclarationSummaryLines, } from './collaboration-capabilities-diagnostics.js';
|
|
2
|
+
import { MAIN_SESSION_DELEGATION_LINES } from './main-session-delegation.js';
|
|
3
|
+
import { buildResolvedWorkspaceGuidanceLines } from './resolved-workspace.js';
|
|
4
|
+
import { buildSkillManualLines, buildSkillManualReadLine } from './skill-manual.js';
|
|
5
|
+
function buildStableSkillLines(context) {
|
|
6
|
+
if (!context?.skillRuntime) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
return context.gatewayCredentialPath
|
|
10
|
+
? buildSkillManualLines(context.skillRuntime)
|
|
11
|
+
: [buildSkillManualReadLine(context.skillRuntime)];
|
|
12
|
+
}
|
|
13
|
+
function buildStableGatewayLines(context) {
|
|
14
|
+
if (!context?.localhostGateway || !context.gatewayCredentialPath) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
const lines = [`Gateway credential file: ${context.gatewayCredentialPath}`];
|
|
18
|
+
if (context.runtimeSurface?.task.currentThread === 'parent-channel') {
|
|
19
|
+
lines.push('This channel is a parent channel, not a task thread.', 'For parent-channel task operations, use the packaged borgee-agent task rail through this gateway credential file.', 'Do not invent a bare task or bare borgee command.');
|
|
20
|
+
if (context.runtimeSurface.task.currentTaskShorthand === 'requires-task-id') {
|
|
21
|
+
lines.push('In this parent channel, task get, task update, task history, and task property commands require an explicit task id.');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (context.runtimeSurface?.task.currentThread === 'task-assignment-thread') {
|
|
25
|
+
lines.push('This channel is an active task thread.', 'Task list and task create stay on the parent channel.', 'Keep the main work in this thread.', 'Return your normal final response in this thread, and do not move the main work back to the parent channel.');
|
|
26
|
+
if (context.taskAssignmentContext?.currentTaskId) {
|
|
27
|
+
lines.push(`Current assigned task id: ${context.taskAssignmentContext.currentTaskId}.`);
|
|
28
|
+
}
|
|
29
|
+
else if (context.taskAssignmentContext?.active === true) {
|
|
30
|
+
lines.push('No current task id is persisted in the injected thread context for this task thread.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return lines;
|
|
34
|
+
}
|
|
35
|
+
function buildStableTaskThreadLines(context) {
|
|
36
|
+
if (context?.taskAssignmentContext?.active !== true) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
const lines = [
|
|
40
|
+
'This session is an active task assignment thread.',
|
|
41
|
+
'Keep the main work in this thread.',
|
|
42
|
+
'Return your normal final response in this thread, and do not move the main work back to the parent channel.',
|
|
43
|
+
];
|
|
44
|
+
if (context.taskAssignmentContext.currentTaskId) {
|
|
45
|
+
lines.push(`Current assigned task id: ${context.taskAssignmentContext.currentTaskId}.`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
lines.push('No current task id is persisted in the injected thread context for this task thread.');
|
|
49
|
+
}
|
|
50
|
+
return lines;
|
|
51
|
+
}
|
|
52
|
+
export function buildClaudeFileBrief(context) {
|
|
53
|
+
const sessionDelegationLines = context?.skillRuntime ? [] : MAIN_SESSION_DELEGATION_LINES;
|
|
54
|
+
const lines = [
|
|
55
|
+
'# Borgee Claude runtime brief',
|
|
56
|
+
'',
|
|
57
|
+
'This directory belongs to one Borgee Claude channel session hosted by agents-host.',
|
|
58
|
+
'Keep visible replies concise, honest, and grounded in the current channel. Do not claim actions you did not actually perform.',
|
|
59
|
+
'',
|
|
60
|
+
...sessionDelegationLines,
|
|
61
|
+
...(() => {
|
|
62
|
+
const workspaceLines = buildResolvedWorkspaceGuidanceLines(context);
|
|
63
|
+
return workspaceLines.length > 0 ? ['', ...workspaceLines] : [];
|
|
64
|
+
})(),
|
|
65
|
+
...(() => {
|
|
66
|
+
const capabilityLines = buildCollaborationCapabilityDeclarationSummaryLines(context?.collaborationCapabilities);
|
|
67
|
+
return capabilityLines.length > 0 ? ['', ...capabilityLines] : [];
|
|
68
|
+
})(),
|
|
69
|
+
...(() => {
|
|
70
|
+
const taskThreadLines = buildStableTaskThreadLines(context);
|
|
71
|
+
return taskThreadLines.length > 0 ? ['', ...taskThreadLines] : [];
|
|
72
|
+
})(),
|
|
73
|
+
...(() => {
|
|
74
|
+
const skillLines = buildStableSkillLines(context);
|
|
75
|
+
return skillLines.length > 0 ? ['', ...skillLines] : [];
|
|
76
|
+
})(),
|
|
77
|
+
...(() => {
|
|
78
|
+
const gatewayLines = buildStableGatewayLines(context);
|
|
79
|
+
return gatewayLines.length > 0 ? ['', ...gatewayLines] : [];
|
|
80
|
+
})(),
|
|
81
|
+
];
|
|
82
|
+
return `${lines.join('\n').trimEnd()}\n`;
|
|
83
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompactionSnapshot, ProviderCompactionStage, ProviderKind } from '../types.js';
|
|
2
|
+
export declare function buildCompactionSnapshot(params: {
|
|
3
|
+
provider: ProviderKind;
|
|
4
|
+
stage: ProviderCompactionStage;
|
|
5
|
+
observedAt?: number;
|
|
6
|
+
turnExecutionId?: string;
|
|
7
|
+
usedTokens?: number;
|
|
8
|
+
contextWindowTokens?: number;
|
|
9
|
+
failureReason?: string;
|
|
10
|
+
}): CompactionSnapshot;
|
|
11
|
+
export declare function mergeCompactionSnapshot(current: CompactionSnapshot | undefined, update: {
|
|
12
|
+
provider: ProviderKind;
|
|
13
|
+
stage: ProviderCompactionStage;
|
|
14
|
+
observedAt?: number;
|
|
15
|
+
turnExecutionId?: string;
|
|
16
|
+
usedTokens?: number;
|
|
17
|
+
contextWindowTokens?: number;
|
|
18
|
+
failureReason?: string;
|
|
19
|
+
}): CompactionSnapshot;
|
|
20
|
+
export declare function parsePersistedCompactionSnapshot(raw: unknown): CompactionSnapshot | undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function isRecord(value) {
|
|
2
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
function isProviderKind(value) {
|
|
5
|
+
return value === 'claude' || value === 'copilot' || value === 'codex';
|
|
6
|
+
}
|
|
7
|
+
function isCompactionStage(value) {
|
|
8
|
+
return value === 'started' || value === 'completed' || value === 'failed';
|
|
9
|
+
}
|
|
10
|
+
function isTerminalCompactionStage(value) {
|
|
11
|
+
return value === 'completed' || value === 'failed';
|
|
12
|
+
}
|
|
13
|
+
function normalizeFiniteNumber(value) {
|
|
14
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
15
|
+
}
|
|
16
|
+
function normalizeNonEmptyString(value) {
|
|
17
|
+
return typeof value === 'string' && value.trim().length > 0 ? value : undefined;
|
|
18
|
+
}
|
|
19
|
+
export function buildCompactionSnapshot(params) {
|
|
20
|
+
return {
|
|
21
|
+
source: 'host-observed',
|
|
22
|
+
provider: params.provider,
|
|
23
|
+
stage: params.stage,
|
|
24
|
+
observedAt: params.observedAt ?? Date.now(),
|
|
25
|
+
...(params.turnExecutionId ? { turnExecutionId: params.turnExecutionId } : {}),
|
|
26
|
+
...(params.usedTokens !== undefined ? { usedTokens: params.usedTokens } : {}),
|
|
27
|
+
...(params.contextWindowTokens !== undefined
|
|
28
|
+
? { contextWindowTokens: params.contextWindowTokens }
|
|
29
|
+
: {}),
|
|
30
|
+
...(params.failureReason ? { failureReason: params.failureReason } : {}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function mergeCompactionSnapshot(current, update) {
|
|
34
|
+
const retainUsageFromCurrent = current?.stage === 'completed' && update.stage === 'completed';
|
|
35
|
+
return buildCompactionSnapshot({
|
|
36
|
+
provider: update.provider,
|
|
37
|
+
stage: update.stage,
|
|
38
|
+
observedAt: update.observedAt,
|
|
39
|
+
turnExecutionId: update.turnExecutionId,
|
|
40
|
+
usedTokens: update.usedTokens ?? (retainUsageFromCurrent ? current?.usedTokens : undefined),
|
|
41
|
+
contextWindowTokens: update.contextWindowTokens
|
|
42
|
+
?? (retainUsageFromCurrent ? current?.contextWindowTokens : undefined),
|
|
43
|
+
failureReason: update.failureReason,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function parsePersistedCompactionSnapshot(raw) {
|
|
47
|
+
if (!isRecord(raw) || !isProviderKind(raw.provider) || !isTerminalCompactionStage(raw.stage)) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return buildCompactionSnapshot({
|
|
51
|
+
provider: raw.provider,
|
|
52
|
+
stage: raw.stage,
|
|
53
|
+
observedAt: normalizeFiniteNumber(raw.observedAt) ?? Date.now(),
|
|
54
|
+
turnExecutionId: normalizeNonEmptyString(raw.turnExecutionId),
|
|
55
|
+
usedTokens: normalizeFiniteNumber(raw.usedTokens),
|
|
56
|
+
contextWindowTokens: normalizeFiniteNumber(raw.contextWindowTokens),
|
|
57
|
+
failureReason: normalizeNonEmptyString(raw.failureReason),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatControlPlane } from '../chat/chat-control-plane.js';
|
|
2
|
+
import type { AttentionSnapshot, ProjectionStrategy, CollaborationCapabilityDeclaration, CollaborationOutcomeSnapshot, CompactionSnapshot, LocalhostGatewayBootstrapMetadata, MissedCollaborationDiagnostic, ProviderKind, ProviderCollaborationContext, ResolvedWorkspaceContext, RuntimeSurface, SkillRuntimeBootstrapMetadata, TaskThreadCollaborationContract, TaskAssignmentThreadContext } from '../types.js';
|
|
2
3
|
export interface SkillRuntimeBootstrapPayload {
|
|
3
4
|
skillDirectoryPath: string;
|
|
4
5
|
nodeCliPath: string;
|
|
@@ -7,24 +8,28 @@ export interface SkillRuntimeBootstrapPayload {
|
|
|
7
8
|
export interface ChannelContextPayload {
|
|
8
9
|
schemaVersion: 1;
|
|
9
10
|
channelId: string;
|
|
11
|
+
runtimeSurface?: RuntimeSurface;
|
|
10
12
|
collaborationOutcome?: CollaborationOutcomeSnapshot;
|
|
11
13
|
attentionSnapshot?: AttentionSnapshot;
|
|
14
|
+
compactionSnapshot?: CompactionSnapshot;
|
|
12
15
|
taskThreadCollaborationContract?: TaskThreadCollaborationContract;
|
|
13
16
|
collaborationCapabilities?: CollaborationCapabilityDeclaration;
|
|
14
17
|
missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
|
|
15
18
|
skillRuntime?: SkillRuntimeBootstrapPayload;
|
|
16
19
|
localhostGateway?: LocalhostGatewayBootstrapMetadata;
|
|
17
20
|
taskAssignmentContext?: TaskAssignmentThreadContext;
|
|
18
|
-
|
|
21
|
+
resolvedWorkspace?: ResolvedWorkspaceContext;
|
|
19
22
|
}
|
|
20
23
|
export interface PreparedChannelContext {
|
|
21
24
|
directoryPath: string;
|
|
22
25
|
payload: ChannelContextPayload;
|
|
23
26
|
payloadPath?: string;
|
|
27
|
+
claudeProjectedBriefPath?: string;
|
|
28
|
+
claudeProjectedBriefHash?: string;
|
|
24
29
|
gatewayCredentialPath?: string;
|
|
25
30
|
skillRuntime?: SkillRuntimeBootstrapMetadata;
|
|
26
31
|
localhostGateway?: LocalhostGatewayBootstrapMetadata;
|
|
27
|
-
|
|
32
|
+
resolvedWorkspace?: ResolvedWorkspaceContext;
|
|
28
33
|
}
|
|
29
34
|
export declare class ChannelContextPreparationError extends Error {
|
|
30
35
|
readonly partialContext: PreparedChannelContext;
|
|
@@ -33,9 +38,12 @@ export declare class ChannelContextPreparationError extends Error {
|
|
|
33
38
|
export interface ChannelContextStore {
|
|
34
39
|
prepare(input: {
|
|
35
40
|
channelId: string;
|
|
41
|
+
provider?: ProviderKind;
|
|
42
|
+
projectionStrategy?: ProjectionStrategy;
|
|
36
43
|
collaboration?: ProviderCollaborationContext;
|
|
37
44
|
collaborationOutcome?: CollaborationOutcomeSnapshot;
|
|
38
45
|
attentionSnapshot?: AttentionSnapshot;
|
|
46
|
+
compactionSnapshot?: CompactionSnapshot;
|
|
39
47
|
taskThreadCollaborationContract?: TaskThreadCollaborationContract;
|
|
40
48
|
collaborationCapabilities?: CollaborationCapabilityDeclaration;
|
|
41
49
|
missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
|
|
@@ -43,9 +51,12 @@ export interface ChannelContextStore {
|
|
|
43
51
|
incomingContent?: string;
|
|
44
52
|
}): Promise<PreparedChannelContext>;
|
|
45
53
|
prepare(channelId: string, options?: {
|
|
54
|
+
provider?: ProviderKind;
|
|
55
|
+
projectionStrategy?: ProjectionStrategy;
|
|
46
56
|
collaboration?: ProviderCollaborationContext;
|
|
47
57
|
collaborationOutcome?: CollaborationOutcomeSnapshot;
|
|
48
58
|
attentionSnapshot?: AttentionSnapshot;
|
|
59
|
+
compactionSnapshot?: CompactionSnapshot;
|
|
49
60
|
taskThreadCollaborationContract?: TaskThreadCollaborationContract;
|
|
50
61
|
collaborationCapabilities?: CollaborationCapabilityDeclaration;
|
|
51
62
|
missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
|
|
@@ -91,16 +102,30 @@ interface FileChannelContextStoreOptions {
|
|
|
91
102
|
skillRuntimeEnabled?: boolean;
|
|
92
103
|
skillAssetResolver?: SkillAssetResolver;
|
|
93
104
|
localhostGateway?: LocalhostGatewayContextPublisher;
|
|
94
|
-
|
|
105
|
+
workspaceCollectionRootDir?: string;
|
|
106
|
+
taskReader?: Pick<ChatControlPlane, 'getTask' | 'listChannels' | 'listTasks'>;
|
|
107
|
+
taskResolutionTimeoutMs?: number;
|
|
108
|
+
env?: NodeJS.ProcessEnv;
|
|
109
|
+
resolvedHomeDir?: string;
|
|
95
110
|
}
|
|
111
|
+
export declare function buildRuntimeSurfaceForTurn(options?: {
|
|
112
|
+
localhostGateway?: LocalhostGatewayBootstrapMetadata;
|
|
113
|
+
collaboration?: Pick<ProviderCollaborationContext, 'sendRoutesAllowed' | 'turnMode'>;
|
|
114
|
+
taskAssignmentContext?: TaskAssignmentThreadContext;
|
|
115
|
+
}): RuntimeSurface;
|
|
96
116
|
export declare function extractTaskIdFromTaskAssignmentContent(incomingContent: string | undefined): string | undefined;
|
|
97
117
|
export declare function encodeChannelPathSegment(channelId: string): string;
|
|
98
118
|
export declare function resolveChannelContextDirectory(stateRootDir: string, channelId: string): string;
|
|
99
119
|
export declare function resolveChannelContextPayloadPath(stateRootDir: string, channelId: string): string;
|
|
100
120
|
export declare function resolveTaskWorkspaceRootDirectory(startupWorkspaceRootDir: string): string;
|
|
101
|
-
export declare function
|
|
121
|
+
export declare function resolveManagedWorkspaceCollectionRoot(workspaceCollectionRootDir: string | undefined, env?: NodeJS.ProcessEnv, resolvedHomeDir?: string): string;
|
|
122
|
+
export declare function resolveChannelWorkspaceRootDirectory(workspaceCollectionRootDir: string, channelId: string): string;
|
|
123
|
+
export declare function resolveChannelWorkspaceDirectory(workspaceCollectionRootDir: string, channelId: string): string;
|
|
124
|
+
export declare function resolveTaskIsolatedWorkspaceDirectory(workspaceCollectionRootDir: string, channelId: string, taskId: string): string;
|
|
125
|
+
export declare const resolveTaskWorkspaceDirectory: typeof resolveTaskIsolatedWorkspaceDirectory;
|
|
102
126
|
export declare function resolveChannelGatewayCredentialPath(stateRootDir: string, channelId: string): string;
|
|
103
127
|
export declare function resolveGatewayCredentialPathFromPayloadPath(payloadPath: string): string;
|
|
128
|
+
export declare function resolveClaudeProjectedBriefPathFromPayloadPath(payloadPath: string): string;
|
|
104
129
|
export declare function isGatewayCredentialSidecarBasename(basename: string): boolean;
|
|
105
130
|
export declare function resolveBorgeeAgentSkillRuntimeAssets(moduleUrl: string, fileSystem?: Pick<ContextFileSystem, 'access'>): Promise<SkillRuntimeBootstrapMetadata>;
|
|
106
131
|
export declare class FileChannelContextStore implements ChannelContextStore {
|
|
@@ -109,22 +134,30 @@ export declare class FileChannelContextStore implements ChannelContextStore {
|
|
|
109
134
|
private readonly skillRuntimeEnabled;
|
|
110
135
|
private readonly skillAssetResolver;
|
|
111
136
|
private readonly localhostGateway?;
|
|
112
|
-
private readonly
|
|
137
|
+
private readonly workspaceCollectionRootDir;
|
|
138
|
+
private readonly taskReader?;
|
|
139
|
+
private readonly taskResolutionTimeoutMs;
|
|
113
140
|
constructor(stateRootDir: string, options?: FileChannelContextStoreOptions);
|
|
114
141
|
prepare(inputOrChannelId: {
|
|
115
142
|
channelId: string;
|
|
143
|
+
provider?: ProviderKind;
|
|
144
|
+
projectionStrategy?: ProjectionStrategy;
|
|
116
145
|
collaboration?: ProviderCollaborationContext;
|
|
117
146
|
collaborationOutcome?: CollaborationOutcomeSnapshot;
|
|
118
147
|
attentionSnapshot?: AttentionSnapshot;
|
|
148
|
+
compactionSnapshot?: CompactionSnapshot;
|
|
119
149
|
taskThreadCollaborationContract?: TaskThreadCollaborationContract;
|
|
120
150
|
collaborationCapabilities?: CollaborationCapabilityDeclaration;
|
|
121
151
|
missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
|
|
122
152
|
incomingMessageType?: string;
|
|
123
153
|
incomingContent?: string;
|
|
124
154
|
} | string, options?: {
|
|
155
|
+
provider?: ProviderKind;
|
|
156
|
+
projectionStrategy?: ProjectionStrategy;
|
|
125
157
|
collaboration?: ProviderCollaborationContext;
|
|
126
158
|
collaborationOutcome?: CollaborationOutcomeSnapshot;
|
|
127
159
|
attentionSnapshot?: AttentionSnapshot;
|
|
160
|
+
compactionSnapshot?: CompactionSnapshot;
|
|
128
161
|
taskThreadCollaborationContract?: TaskThreadCollaborationContract;
|
|
129
162
|
collaborationCapabilities?: CollaborationCapabilityDeclaration;
|
|
130
163
|
missedCollaborationDiagnostic?: MissedCollaborationDiagnostic;
|