@borgee/agents-host 0.2.97 → 0.2.110
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 +77 -5
- package/dist/agents-host.d.ts +16 -0
- package/dist/agents-host.js +608 -82
- package/dist/catalog-worker.js +21 -0
- package/dist/catalog-worker.js.map +7 -0
- package/dist/chat/chat-control-plane.d.ts +19 -4
- package/dist/chat/normalized-input.d.ts +9 -0
- package/dist/chat/normalized-input.js +24 -0
- package/dist/chat/sdk-chat-control-plane.d.ts +46 -6
- package/dist/chat/sdk-chat-control-plane.js +169 -6
- package/dist/cli-args.d.ts +1 -1
- package/dist/cli-args.js +13 -4
- package/dist/config.d.ts +3 -1
- package/dist/config.js +25 -0
- package/dist/context/injection.d.ts +16 -0
- package/dist/context/injection.js +37 -21
- package/dist/context/prompt.d.ts +12 -0
- package/dist/context/prompt.js +25 -0
- package/dist/context/skill-manual.js +1 -1
- package/dist/context/turn-preparation.d.ts +2 -1
- package/dist/context/turn-preparation.js +15 -0
- package/dist/execution-telemetry.d.ts +96 -0
- package/dist/execution-telemetry.js +583 -0
- package/dist/gateway/channel-file-workspace.d.ts +15 -0
- package/dist/gateway/channel-file-workspace.js +130 -0
- package/dist/gateway/localhost-gateway.js +167 -2
- package/dist/hosted-turn-content.js +3 -2
- package/dist/local-config.js +34 -1
- package/dist/managed-daemon.js +15 -0
- package/dist/native-environment.d.ts +2 -0
- package/dist/native-environment.js +9 -0
- package/dist/native-protocol-types/codec.d.ts +49 -0
- package/dist/native-protocol-types/commands.d.ts +71 -0
- package/dist/native-protocol-types/compatibility.d.ts +5 -0
- package/dist/native-protocol-types/cursor.d.ts +7 -0
- package/dist/native-protocol-types/envelope.d.ts +1105 -0
- package/dist/native-protocol-types/file-changes.d.ts +20 -0
- package/dist/native-protocol-types/history.d.ts +487 -0
- package/dist/native-protocol-types/index.d.ts +18 -0
- package/dist/native-protocol-types/interactions.d.ts +619 -0
- package/dist/native-protocol-types/messages.d.ts +2482 -0
- package/dist/native-protocol-types/public-validation.d.ts +10 -0
- package/dist/native-protocol-types/remote-host-uplink.d.ts +67 -0
- package/dist/native-protocol-types/resources.d.ts +126 -0
- package/dist/native-protocol-types/session-settings.d.ts +22 -0
- package/dist/native-protocol-types/snapshot.d.ts +575 -0
- package/dist/native-protocol-types/timeline.d.ts +1503 -0
- package/dist/native-protocol-types/tool-result.d.ts +26 -0
- package/dist/native-protocol-types/uplink.d.ts +56 -0
- package/dist/native-protocol-types/version.d.ts +5 -0
- package/dist/native-provider-types/commands.d.ts +51 -0
- package/dist/native-provider-types/control.d.ts +192 -0
- package/dist/native-provider-types/file-changes.d.ts +9 -0
- package/dist/native-provider-types/index.d.ts +8 -0
- package/dist/native-provider-types/interactions.d.ts +7 -0
- package/dist/native-provider-types/observation.d.ts +209 -0
- package/dist/native-provider-types/provider.d.ts +124 -0
- package/dist/native-provider-types/session-settings.d.ts +17 -0
- package/dist/native-provider-types/testing.d.ts +27 -0
- package/dist/native-provider-types/tool-result.d.ts +21 -0
- package/dist/native-providers.d.ts +21 -0
- package/dist/native-providers.js +18402 -0
- package/dist/native-providers.js.map +7 -0
- package/dist/plugin-sdk.js +10713 -229
- package/dist/plugin-sdk.js.map +4 -4
- package/dist/policy/copilot-permission.js +1 -8
- package/dist/policy/gateway-authorization.d.ts +1 -1
- package/dist/policy/gateway-authorization.js +22 -2
- package/dist/providers/claude/adapter.js +1 -0
- package/dist/providers/claude/cli-client.js +4 -0
- package/dist/providers/codex/adapter.js +1 -0
- package/dist/providers/codex/cli-client.js +5 -0
- package/dist/providers/copilot/adapter.js +4 -0
- package/dist/providers/copilot/cli-client.js +11 -1
- package/dist/providers/copilot/sdk-session.d.ts +12 -3
- package/dist/providers/copilot/sdk-session.js +230 -6
- package/dist/providers/create-provider.js +24 -0
- package/dist/providers/normalized/adapter.d.ts +107 -0
- package/dist/providers/normalized/adapter.js +1650 -0
- package/dist/providers/normalized/control-policy.d.ts +5 -0
- package/dist/providers/normalized/control-policy.js +12 -0
- package/dist/providers/normalized/interactions.d.ts +3 -0
- package/dist/providers/normalized/interactions.js +39 -0
- package/dist/providers/normalized/legacy-input-ownership.d.ts +34 -0
- package/dist/providers/normalized/legacy-input-ownership.js +123 -0
- package/dist/providers/normalized/session-management.d.ts +67 -0
- package/dist/providers/normalized/session-management.js +334 -0
- package/dist/providers/normalized/session-ownership.d.ts +3 -0
- package/dist/providers/normalized/session-ownership.js +90 -0
- package/dist/providers/prompt-usage.d.ts +8 -0
- package/dist/providers/prompt-usage.js +52 -0
- package/dist/providers/provider-adapter.d.ts +43 -1
- package/dist/providers/provider-adapter.js +8 -0
- package/dist/state-paths.d.ts +2 -0
- package/dist/state-paths.js +6 -0
- package/dist/types.d.ts +66 -0
- package/dist/typing-lease.d.ts +14 -0
- package/dist/typing-lease.js +31 -0
- package/dist/vendor/agent-provider-codex/LICENSE +211 -0
- package/dist/vendor/agent-provider-codex/NOTICE +13 -0
- package/package.json +22 -13
- package/skills/borgee-agent/SKILL.md +12 -4
- package/skills/borgee-agent/scripts/borgee-agent.mjs +110 -0
- package/skills/borgee-agent/scripts/borgee-agent.py +116 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type SessionDirectoryRequest, type SessionDirectoryResult, type SessionObservationRequest, type SessionObservationResult, type ServerRequestContext } from '../../plugin-sdk.js';
|
|
2
|
+
import { type SessionControlRequest } from '../../plugin-sdk.js';
|
|
3
|
+
import type { AgentInteractionResponse, AgentProviderAdapter, AgentSession } from '../../native-providers.js';
|
|
4
|
+
import type { PreparedPromptContext, PreparedProviderTurnInput, ProviderGenerateOptions, ProviderInput, ProviderReply } from '../../types.js';
|
|
5
|
+
import { type ProviderAdapter, type ProviderSessionControlContext, type ProviderSessionControlResult } from '../provider-adapter.js';
|
|
6
|
+
import { type HostSessionManagementOptions } from './session-management.js';
|
|
7
|
+
interface SessionStore {
|
|
8
|
+
load(agentId: string): Promise<Record<string, string>>;
|
|
9
|
+
save(agentId: string, sessions: Record<string, string>): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface NormalizedProviderOptions {
|
|
12
|
+
provider: AgentProviderAdapter;
|
|
13
|
+
prepare(input: ProviderInput): Promise<PreparedProviderTurnInput>;
|
|
14
|
+
prepareSession?(channelId: string): Promise<PreparedPromptContext | undefined>;
|
|
15
|
+
resolveAgentId(): string | undefined;
|
|
16
|
+
serverUrl: string;
|
|
17
|
+
store: SessionStore;
|
|
18
|
+
configureSession(session: AgentSession): Promise<void>;
|
|
19
|
+
sessionManagement?: Omit<HostSessionManagementOptions, 'provider' | 'find' | 'register' | 'resolveAgentId' | 'serverUrl'>;
|
|
20
|
+
}
|
|
21
|
+
/** Owns Host binding and business replies; native event interpretation stays in providers. */
|
|
22
|
+
export declare class NormalizedProviderAdapter implements ProviderAdapter {
|
|
23
|
+
private readonly options;
|
|
24
|
+
readonly outputMode: "normalized";
|
|
25
|
+
readonly capabilities: import("../provider-adapter.js").ProviderCapabilities;
|
|
26
|
+
private readonly bindings;
|
|
27
|
+
private readonly bindingRecords;
|
|
28
|
+
private readonly relationPasses;
|
|
29
|
+
private readonly deferredRelations;
|
|
30
|
+
private readonly busy;
|
|
31
|
+
private readonly stores;
|
|
32
|
+
private saving;
|
|
33
|
+
private defaultAdmission;
|
|
34
|
+
private disposed;
|
|
35
|
+
private readonly management?;
|
|
36
|
+
constructor(options: NormalizedProviderOptions);
|
|
37
|
+
private hasIndependentOwner;
|
|
38
|
+
private get supportsDefaultOpening();
|
|
39
|
+
get supportsSessionManagement(): boolean;
|
|
40
|
+
describeSessionManagement(): Promise<import('../../plugin-sdk.js').SessionManagementAvailability>;
|
|
41
|
+
manageSession(request: import('../../plugin-sdk.js').SessionManagementRequest, context: ServerRequestContext): Promise<unknown>;
|
|
42
|
+
private openDefaultSession;
|
|
43
|
+
private registerIndependentSession;
|
|
44
|
+
get sessionInputOperations(): readonly ('start_turn' | 'steer' | 'next_turn')[];
|
|
45
|
+
get supportsSessionInput(): boolean;
|
|
46
|
+
private sessionPublication?;
|
|
47
|
+
setSessionPublication(publication: Parameters<NonNullable<ProviderAdapter['setSessionPublication']>>[0]): void;
|
|
48
|
+
publishSessionBindings(): void;
|
|
49
|
+
private publishAvailability;
|
|
50
|
+
private setAvailability;
|
|
51
|
+
private visibleRuntime;
|
|
52
|
+
private publishBinding;
|
|
53
|
+
private publishActivity;
|
|
54
|
+
private publisher;
|
|
55
|
+
private publishPreTurnError;
|
|
56
|
+
private publishTimeline;
|
|
57
|
+
listSessions(request: SessionDirectoryRequest, context: ServerRequestContext): SessionDirectoryResult;
|
|
58
|
+
describeSession(request: import('../../plugin-sdk.js').SessionDescriptionRequest, context: ServerRequestContext): import('../../plugin-sdk.js').SessionControlTarget | undefined;
|
|
59
|
+
observeSession(request: SessionObservationRequest, context: ServerRequestContext): Promise<SessionObservationResult>;
|
|
60
|
+
generateReply(input: ProviderInput, options?: ProviderGenerateOptions): Promise<ProviderReply>;
|
|
61
|
+
private bindingCurrent;
|
|
62
|
+
private controlBinding;
|
|
63
|
+
controlSession(request: SessionControlRequest, context: ProviderSessionControlContext): Promise<ProviderSessionControlResult>;
|
|
64
|
+
private registerInput;
|
|
65
|
+
private confirmInput;
|
|
66
|
+
private releaseExecution;
|
|
67
|
+
private reconcileAssociationMetadata;
|
|
68
|
+
private applyAssociation;
|
|
69
|
+
private observeOwned;
|
|
70
|
+
private processOwnedObservation;
|
|
71
|
+
private sendInput;
|
|
72
|
+
private finishLocalCommand;
|
|
73
|
+
private persistConfirmedBinding;
|
|
74
|
+
private withDefaultAdmission;
|
|
75
|
+
private bindingFor;
|
|
76
|
+
private bindingForDefault;
|
|
77
|
+
private admitChildren;
|
|
78
|
+
private adoptKnownChildren;
|
|
79
|
+
private observeSessionState;
|
|
80
|
+
private selectBinding;
|
|
81
|
+
private observe;
|
|
82
|
+
private queueObservation;
|
|
83
|
+
private drainObservations;
|
|
84
|
+
private processObservation;
|
|
85
|
+
private bindingCapabilities;
|
|
86
|
+
private retireInteractions;
|
|
87
|
+
private observeNativeTurn;
|
|
88
|
+
private restoreSession;
|
|
89
|
+
private observeEvent;
|
|
90
|
+
respondInteraction(input: {
|
|
91
|
+
channelId: string;
|
|
92
|
+
taskId?: string;
|
|
93
|
+
agentId: string;
|
|
94
|
+
requestId: string;
|
|
95
|
+
response: AgentInteractionResponse;
|
|
96
|
+
binding?: Pick<SessionControlRequest, 'binding_id' | 'native_session_id' | 'connection_generation'>;
|
|
97
|
+
}, context?: import('../../plugin-sdk.js').ServerRequestContext): Promise<AgentInteractionResponse>;
|
|
98
|
+
/** Capture and publication share the observation loop's synchronous ordering. */
|
|
99
|
+
syncNormalizedActivity(channelId: string, bindingId?: string): boolean;
|
|
100
|
+
cancelTurn(channelId: string, target?: Pick<SessionControlRequest, 'binding_id' | 'native_session_id' | 'connection_generation'>, context?: import('../../plugin-sdk.js').ServerRequestContext): Promise<boolean>;
|
|
101
|
+
interruptTurn(channelId: string): Promise<boolean>;
|
|
102
|
+
cancelSession(channelId: string): Promise<boolean>;
|
|
103
|
+
private closeBinding;
|
|
104
|
+
private disposeBinding;
|
|
105
|
+
dispose(): Promise<void>;
|
|
106
|
+
}
|
|
107
|
+
export {};
|