@xenosystem/agent-sdk 0.9.21 → 0.9.22
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 +6 -3
- package/dist/artifacts/index.cjs +1 -1
- package/dist/artifacts/index.js +1 -1
- package/dist/automation/index.d.cts +28 -0
- package/dist/automation/index.d.ts +28 -0
- package/dist/control-plane/index.cjs +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/electron/index.cjs +132 -128
- package/dist/electron/index.d.cts +56 -0
- package/dist/electron/index.d.ts +56 -0
- package/dist/electron/index.js +129 -125
- package/dist/electron/metafile-cjs.json +1 -1
- package/dist/electron/metafile-esm.json +1 -1
- package/dist/governance/index.d.cts +29 -0
- package/dist/governance/index.d.ts +29 -0
- package/dist/hosted/index.cjs +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/hosted/metafile-cjs.json +1 -1
- package/dist/hosted/metafile-esm.json +1 -1
- package/dist/index.cjs +336 -330
- package/dist/index.d.cts +165 -2
- package/dist/index.d.ts +165 -2
- package/dist/index.js +333 -327
- package/dist/mcp/index.d.cts +28 -0
- package/dist/mcp/index.d.ts +28 -0
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/metafile-cjs.json +1 -1
- package/dist/providers/metafile-esm.json +1 -1
- package/dist/session/index.cjs +56 -54
- package/dist/session/index.d.cts +63 -1
- package/dist/session/index.d.ts +63 -1
- package/dist/session/index.js +56 -54
- package/dist/session/metafile-cjs.json +1 -1
- package/dist/session/metafile-esm.json +1 -1
- package/dist/skills/index.d.cts +28 -0
- package/dist/skills/index.d.ts +28 -0
- package/dist/ui/index.d.cts +28 -0
- package/dist/ui/index.d.ts +28 -0
- package/dist/utils/index.cjs +17 -16
- package/dist/utils/index.d.cts +31 -1
- package/dist/utils/index.d.ts +31 -1
- package/dist/utils/index.js +14 -13
- package/dist/utils/metafile-cjs.json +1 -1
- package/dist/utils/metafile-esm.json +1 -1
- package/package.json +1 -1
|
@@ -74,6 +74,33 @@ interface CompactionRecord {
|
|
|
74
74
|
artifactReferences: string[];
|
|
75
75
|
createdAt: string;
|
|
76
76
|
}
|
|
77
|
+
declare const WEB_CONTEXT_TOOL_RESULT_SCHEMA: "xeno.web-context.tool-result.v1";
|
|
78
|
+
interface WebContextEvidenceProjection {
|
|
79
|
+
evidenceId: string;
|
|
80
|
+
requestId: string;
|
|
81
|
+
sourceUrl: string;
|
|
82
|
+
finalUrl?: string;
|
|
83
|
+
citations: Array<{
|
|
84
|
+
url: string;
|
|
85
|
+
title?: string;
|
|
86
|
+
artifactId?: string;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
89
|
+
interface WebContextToolResult {
|
|
90
|
+
schemaVersion: typeof WEB_CONTEXT_TOOL_RESULT_SCHEMA;
|
|
91
|
+
operation: "search" | "fetch";
|
|
92
|
+
requestId: string;
|
|
93
|
+
evidence: WebContextEvidenceProjection;
|
|
94
|
+
job?: {
|
|
95
|
+
jobId: string;
|
|
96
|
+
state: string;
|
|
97
|
+
};
|
|
98
|
+
artifact?: {
|
|
99
|
+
artifactId: string;
|
|
100
|
+
mediaType: string;
|
|
101
|
+
bytes: number;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
77
104
|
type PermissionProfileName = "default" | "read-only" | "trusted-dev";
|
|
78
105
|
type PermissionProfileDecision = "allow" | "ask" | "deny";
|
|
79
106
|
type PermissionProfileMode = "default" | "acceptEdits" | "bypassPermissions" | "auto";
|
|
@@ -219,6 +246,7 @@ interface ToolResult {
|
|
|
219
246
|
assistantOnlyContent?: ToolAssistantContentBlock[];
|
|
220
247
|
operation?: ToolOperationSnapshot;
|
|
221
248
|
evidence?: ToolEvidence[];
|
|
249
|
+
webContext?: WebContextToolResult;
|
|
222
250
|
retryable?: boolean;
|
|
223
251
|
}
|
|
224
252
|
interface ToolExecutionContext {
|
|
@@ -262,6 +290,7 @@ interface ToolResultBlock {
|
|
|
262
290
|
is_error?: boolean;
|
|
263
291
|
operation?: ToolOperationSnapshot;
|
|
264
292
|
evidence?: ToolEvidence[];
|
|
293
|
+
web_context?: WebContextToolResult;
|
|
265
294
|
retryable?: boolean;
|
|
266
295
|
}
|
|
267
296
|
type ContentBlock = TextBlock | ToolUseBlock;
|
|
@@ -947,6 +976,7 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
947
976
|
success: boolean;
|
|
948
977
|
outputPreview: string;
|
|
949
978
|
error?: string;
|
|
979
|
+
webContext?: WebContextToolResult;
|
|
950
980
|
elapsedMs: number;
|
|
951
981
|
iteration?: number;
|
|
952
982
|
}) | (XenoRuntimeEventBase & {
|
|
@@ -1080,6 +1110,16 @@ declare class TranscriptWriter {
|
|
|
1080
1110
|
offset?: number;
|
|
1081
1111
|
}): Promise<TranscriptEvent[]>;
|
|
1082
1112
|
private isMessageData;
|
|
1113
|
+
isMessageEvent(event: TranscriptEvent): event is TranscriptEvent & {
|
|
1114
|
+
data: Message;
|
|
1115
|
+
};
|
|
1116
|
+
readValidated(): Promise<{
|
|
1117
|
+
events: TranscriptEvent[];
|
|
1118
|
+
issues: Array<{
|
|
1119
|
+
code: "torn_transcript_tail" | "invalid_transcript_event" | "non_monotonic_sequence";
|
|
1120
|
+
detail: string;
|
|
1121
|
+
}>;
|
|
1122
|
+
}>;
|
|
1083
1123
|
getMessages(): Promise<Message[]>;
|
|
1084
1124
|
replaceMessages(messages: Message[]): Promise<void>;
|
|
1085
1125
|
truncateAfterMessageCount(messageCount: number): Promise<void>;
|
|
@@ -1122,18 +1162,34 @@ interface SessionResumeOptions {
|
|
|
1122
1162
|
sessionId: string;
|
|
1123
1163
|
fromCheckpoint?: string;
|
|
1124
1164
|
}
|
|
1165
|
+
type SessionRecoverySource = "transcript" | "checkpoint" | "empty";
|
|
1166
|
+
interface SessionRecoveryIssue {
|
|
1167
|
+
code: "torn_transcript_tail" | "invalid_transcript_event" | "non_monotonic_sequence" | "interrupted_tool_call" | "checkpoint_fallback" | "divergent_checkpoint" | "stale_metadata";
|
|
1168
|
+
detail: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface SessionRecoveryResult {
|
|
1171
|
+
messages: Message[];
|
|
1172
|
+
source: SessionRecoverySource;
|
|
1173
|
+
sourceId?: string;
|
|
1174
|
+
issues: SessionRecoveryIssue[];
|
|
1175
|
+
repairMessages: Message[];
|
|
1176
|
+
transcriptEventCount: number;
|
|
1177
|
+
latestTimestamp?: string;
|
|
1178
|
+
}
|
|
1125
1179
|
declare class SessionManager {
|
|
1126
1180
|
private sessionDir;
|
|
1127
1181
|
private _meta;
|
|
1128
1182
|
private _transcript;
|
|
1129
1183
|
private _checkpoints;
|
|
1130
1184
|
private _lock;
|
|
1185
|
+
private _recovery;
|
|
1131
1186
|
private constructor();
|
|
1132
1187
|
static create(options: SessionCreateOptions): Promise<SessionManager>;
|
|
1133
1188
|
static resume(options: SessionResumeOptions): Promise<SessionManager>;
|
|
1134
1189
|
get meta(): SessionMeta;
|
|
1135
1190
|
get transcript(): TranscriptWriter;
|
|
1136
1191
|
get checkpoints(): CheckpointManager;
|
|
1192
|
+
get recovery(): SessionRecoveryResult;
|
|
1137
1193
|
updateMeta(partial: Partial<SessionMeta>): Promise<void>;
|
|
1138
1194
|
end(status?: "completed" | "abandoned"): Promise<void>;
|
|
1139
1195
|
recordUserMessage(content: string): Promise<void>;
|
package/dist/electron/index.d.ts
CHANGED
|
@@ -74,6 +74,33 @@ interface CompactionRecord {
|
|
|
74
74
|
artifactReferences: string[];
|
|
75
75
|
createdAt: string;
|
|
76
76
|
}
|
|
77
|
+
declare const WEB_CONTEXT_TOOL_RESULT_SCHEMA: "xeno.web-context.tool-result.v1";
|
|
78
|
+
interface WebContextEvidenceProjection {
|
|
79
|
+
evidenceId: string;
|
|
80
|
+
requestId: string;
|
|
81
|
+
sourceUrl: string;
|
|
82
|
+
finalUrl?: string;
|
|
83
|
+
citations: Array<{
|
|
84
|
+
url: string;
|
|
85
|
+
title?: string;
|
|
86
|
+
artifactId?: string;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
89
|
+
interface WebContextToolResult {
|
|
90
|
+
schemaVersion: typeof WEB_CONTEXT_TOOL_RESULT_SCHEMA;
|
|
91
|
+
operation: "search" | "fetch";
|
|
92
|
+
requestId: string;
|
|
93
|
+
evidence: WebContextEvidenceProjection;
|
|
94
|
+
job?: {
|
|
95
|
+
jobId: string;
|
|
96
|
+
state: string;
|
|
97
|
+
};
|
|
98
|
+
artifact?: {
|
|
99
|
+
artifactId: string;
|
|
100
|
+
mediaType: string;
|
|
101
|
+
bytes: number;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
77
104
|
type PermissionProfileName = "default" | "read-only" | "trusted-dev";
|
|
78
105
|
type PermissionProfileDecision = "allow" | "ask" | "deny";
|
|
79
106
|
type PermissionProfileMode = "default" | "acceptEdits" | "bypassPermissions" | "auto";
|
|
@@ -219,6 +246,7 @@ interface ToolResult {
|
|
|
219
246
|
assistantOnlyContent?: ToolAssistantContentBlock[];
|
|
220
247
|
operation?: ToolOperationSnapshot;
|
|
221
248
|
evidence?: ToolEvidence[];
|
|
249
|
+
webContext?: WebContextToolResult;
|
|
222
250
|
retryable?: boolean;
|
|
223
251
|
}
|
|
224
252
|
interface ToolExecutionContext {
|
|
@@ -262,6 +290,7 @@ interface ToolResultBlock {
|
|
|
262
290
|
is_error?: boolean;
|
|
263
291
|
operation?: ToolOperationSnapshot;
|
|
264
292
|
evidence?: ToolEvidence[];
|
|
293
|
+
web_context?: WebContextToolResult;
|
|
265
294
|
retryable?: boolean;
|
|
266
295
|
}
|
|
267
296
|
type ContentBlock = TextBlock | ToolUseBlock;
|
|
@@ -947,6 +976,7 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
947
976
|
success: boolean;
|
|
948
977
|
outputPreview: string;
|
|
949
978
|
error?: string;
|
|
979
|
+
webContext?: WebContextToolResult;
|
|
950
980
|
elapsedMs: number;
|
|
951
981
|
iteration?: number;
|
|
952
982
|
}) | (XenoRuntimeEventBase & {
|
|
@@ -1080,6 +1110,16 @@ declare class TranscriptWriter {
|
|
|
1080
1110
|
offset?: number;
|
|
1081
1111
|
}): Promise<TranscriptEvent[]>;
|
|
1082
1112
|
private isMessageData;
|
|
1113
|
+
isMessageEvent(event: TranscriptEvent): event is TranscriptEvent & {
|
|
1114
|
+
data: Message;
|
|
1115
|
+
};
|
|
1116
|
+
readValidated(): Promise<{
|
|
1117
|
+
events: TranscriptEvent[];
|
|
1118
|
+
issues: Array<{
|
|
1119
|
+
code: "torn_transcript_tail" | "invalid_transcript_event" | "non_monotonic_sequence";
|
|
1120
|
+
detail: string;
|
|
1121
|
+
}>;
|
|
1122
|
+
}>;
|
|
1083
1123
|
getMessages(): Promise<Message[]>;
|
|
1084
1124
|
replaceMessages(messages: Message[]): Promise<void>;
|
|
1085
1125
|
truncateAfterMessageCount(messageCount: number): Promise<void>;
|
|
@@ -1122,18 +1162,34 @@ interface SessionResumeOptions {
|
|
|
1122
1162
|
sessionId: string;
|
|
1123
1163
|
fromCheckpoint?: string;
|
|
1124
1164
|
}
|
|
1165
|
+
type SessionRecoverySource = "transcript" | "checkpoint" | "empty";
|
|
1166
|
+
interface SessionRecoveryIssue {
|
|
1167
|
+
code: "torn_transcript_tail" | "invalid_transcript_event" | "non_monotonic_sequence" | "interrupted_tool_call" | "checkpoint_fallback" | "divergent_checkpoint" | "stale_metadata";
|
|
1168
|
+
detail: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface SessionRecoveryResult {
|
|
1171
|
+
messages: Message[];
|
|
1172
|
+
source: SessionRecoverySource;
|
|
1173
|
+
sourceId?: string;
|
|
1174
|
+
issues: SessionRecoveryIssue[];
|
|
1175
|
+
repairMessages: Message[];
|
|
1176
|
+
transcriptEventCount: number;
|
|
1177
|
+
latestTimestamp?: string;
|
|
1178
|
+
}
|
|
1125
1179
|
declare class SessionManager {
|
|
1126
1180
|
private sessionDir;
|
|
1127
1181
|
private _meta;
|
|
1128
1182
|
private _transcript;
|
|
1129
1183
|
private _checkpoints;
|
|
1130
1184
|
private _lock;
|
|
1185
|
+
private _recovery;
|
|
1131
1186
|
private constructor();
|
|
1132
1187
|
static create(options: SessionCreateOptions): Promise<SessionManager>;
|
|
1133
1188
|
static resume(options: SessionResumeOptions): Promise<SessionManager>;
|
|
1134
1189
|
get meta(): SessionMeta;
|
|
1135
1190
|
get transcript(): TranscriptWriter;
|
|
1136
1191
|
get checkpoints(): CheckpointManager;
|
|
1192
|
+
get recovery(): SessionRecoveryResult;
|
|
1137
1193
|
updateMeta(partial: Partial<SessionMeta>): Promise<void>;
|
|
1138
1194
|
end(status?: "completed" | "abandoned"): Promise<void>;
|
|
1139
1195
|
recordUserMessage(content: string): Promise<void>;
|