@myagentroam/agent 0.9.62 → 0.9.65
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/LICENSE +202 -0
- package/NOTICE +4 -0
- package/dist/cli/codex-auth-file.js +268 -3
- package/dist/cli/main.js +431 -2
- package/dist/error.js +66 -2
- package/dist/host/contracts.js +20 -2
- package/dist/host/local-agent-host.js +146 -2
- package/dist/host/local-process-executor.js +39 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -2
- package/dist/model/anthropic-messages.js +474 -2
- package/dist/model/anthropic-thinking.js +33 -2
- package/dist/model/catalog-file.js +88 -2
- package/dist/model/configuration.js +137 -2
- package/dist/model/contracts.d.ts +2 -0
- package/dist/model/contracts.js +1 -2
- package/dist/model/http.js +529 -2
- package/dist/model/openai-responses.d.ts +2 -0
- package/dist/model/openai-responses.js +1602 -2
- package/dist/model/runtime-credential.js +35 -2
- package/dist/model/sse.js +199 -2
- package/dist/prompts/compact.js +25 -2
- package/dist/prompts/core.js +37 -2
- package/dist/prompts/execution-budget.js +10 -2
- package/dist/prompts/index.d.ts +3 -2
- package/dist/prompts/index.js +47 -2
- package/dist/prompts/modes.js +25 -2
- package/dist/prompts/output.js +1 -2
- package/dist/prompts/resources.d.ts +1 -1
- package/dist/prompts/resources.js +31 -2
- package/dist/prompts/subagent.d.ts +6 -0
- package/dist/prompts/subagent.js +29 -2
- package/dist/prompts/title.js +9 -2
- package/dist/prompts/workflow.js +32 -2
- package/dist/runtime/async-queue.js +62 -2
- package/dist/runtime/builtin-skills.js +19 -2
- package/dist/runtime/byted-ark-imagegen-skill.js +18 -2
- package/dist/runtime/codex-imagegen-skill.js +35 -2
- package/dist/runtime/compact.js +225 -2
- package/dist/runtime/context-gc-runtime.d.ts +35 -0
- package/dist/runtime/context-gc-runtime.js +163 -0
- package/dist/runtime/context-gc-tokens.d.ts +24 -0
- package/dist/runtime/context-gc-tokens.js +83 -0
- package/dist/runtime/context-gc.d.ts +66 -0
- package/dist/runtime/context-gc.js +909 -0
- package/dist/runtime/context-projection.d.ts +23 -0
- package/dist/runtime/context-projection.js +203 -0
- package/dist/runtime/environment-context.js +41 -2
- package/dist/runtime/execution-policy.js +13 -2
- package/dist/runtime/instructions.js +298 -2
- package/dist/runtime/normalize.js +40 -2
- package/dist/runtime/plan-output.js +95 -2
- package/dist/runtime/rollout-budget.d.ts +2 -0
- package/dist/runtime/rollout-budget.js +92 -2
- package/dist/runtime/token-budget.d.ts +2 -0
- package/dist/runtime/token-budget.js +44 -2
- package/dist/sdk/agent.js +1804 -2
- package/dist/sdk/types.d.ts +15 -5
- package/dist/sdk/types.js +1 -2
- package/dist/session/catalog.d.ts +5 -4
- package/dist/session/catalog.js +133 -2
- package/dist/session/context-gc-checkpoint.d.ts +148 -0
- package/dist/session/context-gc-checkpoint.js +665 -0
- package/dist/session/context-gc-replacements.d.ts +52 -0
- package/dist/session/context-gc-replacements.js +226 -0
- package/dist/session/context-gc-subagent.d.ts +43 -0
- package/dist/session/context-gc-subagent.js +267 -0
- package/dist/session/jsonl-store.d.ts +42 -4
- package/dist/session/jsonl-store.js +1657 -2
- package/dist/subagent/scheduler.d.ts +35 -2
- package/dist/subagent/scheduler.js +249 -2
- package/dist/subagent/session-controller.d.ts +94 -0
- package/dist/subagent/session-controller.js +675 -0
- package/dist/tools/agent-cancel.js +28 -2
- package/dist/tools/{task.d.ts → agent-message.d.ts} +2 -2
- package/dist/tools/agent-message.js +51 -0
- package/dist/tools/agent-start.js +84 -2
- package/dist/tools/agent-wait.js +53 -2
- package/dist/tools/apply-patch.js +478 -2
- package/dist/tools/code-mode.js +370 -2
- package/dist/tools/codex-image-gen.js +312 -2
- package/dist/tools/exec.js +455 -2
- package/dist/tools/execution-limits.d.ts +1 -0
- package/dist/tools/execution-limits.js +44 -2
- package/dist/tools/local-registry.js +233 -2
- package/dist/tools/local-workspace-tools.js +28 -2
- package/dist/tools/question.js +124 -2
- package/dist/tools/read-context.d.ts +16 -0
- package/dist/tools/read-context.js +85 -0
- package/dist/tools/read.d.ts +13 -0
- package/dist/tools/read.js +294 -2
- package/dist/tools/registry.js +76 -2
- package/dist/tools/runtime-context.d.ts +9 -2
- package/dist/tools/runtime-context.js +1 -2
- package/dist/tools/runtime.js +21 -2
- package/dist/tools/scheduler.js +41 -2
- package/dist/tools/shared/path-resolver.js +133 -2
- package/dist/tools/skill.js +37 -2
- package/dist/tools/todo-read.js +10 -2
- package/dist/tools/todo-write.js +65 -2
- package/dist/tools/todo.js +67 -2
- package/dist/tools/view-image.js +81 -2
- package/dist/tools/web-fetch.js +11 -2
- package/dist/tools/web-search.js +14 -2
- package/package.json +9 -7
- package/README.md +0 -3
- package/dist/runtime/prompt.d.ts +0 -9
- package/dist/runtime/prompt.js +0 -2
- package/dist/tools/shared/secret-redaction.d.ts +0 -4
- package/dist/tools/shared/secret-redaction.js +0 -2
- package/dist/tools/task-cancel.d.ts +0 -7
- package/dist/tools/task-cancel.js +0 -2
- package/dist/tools/task-output.d.ts +0 -7
- package/dist/tools/task-output.js +0 -2
- package/dist/tools/task-tools.d.ts +0 -36
- package/dist/tools/task-tools.js +0 -2
- package/dist/tools/task.js +0 -2
- package/dist/tools/todo-tools.d.ts +0 -25
- package/dist/tools/todo-tools.js +0 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ModelUsage } from '../model/contracts.js';
|
|
1
2
|
import type { EnvironmentContextState } from '../prompts/core.js';
|
|
2
3
|
import { type TodoSnapshot } from '../tools/todo.js';
|
|
4
|
+
import { type ContextGcCheckpointDraft } from './context-gc-checkpoint.js';
|
|
3
5
|
export interface SessionRecord {
|
|
4
6
|
schemaVersion: 1;
|
|
5
7
|
recordId: string;
|
|
@@ -16,6 +18,23 @@ export interface SessionExecutionState {
|
|
|
16
18
|
todo: TodoSnapshot;
|
|
17
19
|
contextRecords: SessionRecord[];
|
|
18
20
|
}
|
|
21
|
+
export type SessionSource = {
|
|
22
|
+
readonly type: 'user';
|
|
23
|
+
} | {
|
|
24
|
+
readonly type: 'subagent';
|
|
25
|
+
readonly parentSessionId: string;
|
|
26
|
+
readonly rootSessionId: string;
|
|
27
|
+
readonly parentExecutionId: string;
|
|
28
|
+
readonly role: 'general-purpose' | 'explore';
|
|
29
|
+
readonly description: string;
|
|
30
|
+
};
|
|
31
|
+
export interface SessionListInput {
|
|
32
|
+
readonly limit?: number;
|
|
33
|
+
readonly cursor?: string;
|
|
34
|
+
readonly source?: SessionSource['type'];
|
|
35
|
+
readonly parentSessionId?: string;
|
|
36
|
+
readonly rootSessionId?: string;
|
|
37
|
+
}
|
|
19
38
|
export interface CompactHistoryMessage {
|
|
20
39
|
role: 'user';
|
|
21
40
|
content: string;
|
|
@@ -46,11 +65,15 @@ interface SessionMeta {
|
|
|
46
65
|
workspace: string;
|
|
47
66
|
createdAt: string;
|
|
48
67
|
lastActivityAt: string;
|
|
68
|
+
source?: SessionSource;
|
|
49
69
|
nextSequence: number;
|
|
50
70
|
automaticTitlePending?: boolean;
|
|
51
71
|
resume?: {
|
|
52
72
|
version: 1;
|
|
53
73
|
compactSequence?: number;
|
|
74
|
+
gcSequence?: number;
|
|
75
|
+
gcGeneration?: number;
|
|
76
|
+
gcBaseSequence?: number;
|
|
54
77
|
todoSequence?: number;
|
|
55
78
|
todoRevision: number;
|
|
56
79
|
};
|
|
@@ -68,6 +91,7 @@ export declare class JsonlSessionStore {
|
|
|
68
91
|
createSession(input: {
|
|
69
92
|
title?: string;
|
|
70
93
|
workspace: string;
|
|
94
|
+
source?: SessionSource;
|
|
71
95
|
}): Promise<SessionMeta>;
|
|
72
96
|
sessionDirectory(sessionId: string): string;
|
|
73
97
|
persistInputImages(sessionId: string, images: readonly SessionInputImage[]): Promise<SessionInputImageMetadata[]>;
|
|
@@ -86,6 +110,7 @@ export declare class JsonlSessionStore {
|
|
|
86
110
|
workspace: string;
|
|
87
111
|
createdAt: string;
|
|
88
112
|
lastActivityAt: string;
|
|
113
|
+
source: SessionSource | undefined;
|
|
89
114
|
}>;
|
|
90
115
|
rollbackSession(sessionId: string, input: {
|
|
91
116
|
readonly boundaryTurnId: string | null;
|
|
@@ -95,17 +120,27 @@ export declare class JsonlSessionStore {
|
|
|
95
120
|
workspace: string;
|
|
96
121
|
createdAt: string;
|
|
97
122
|
lastActivityAt: string;
|
|
123
|
+
source: SessionSource;
|
|
98
124
|
}>;
|
|
99
125
|
updateTitle(sessionId: string, title: string, input?: {
|
|
100
126
|
executionId?: string;
|
|
101
127
|
turnId?: string;
|
|
102
128
|
}): Promise<void>;
|
|
129
|
+
clearSession(sessionId: string): Promise<{
|
|
130
|
+
id: string;
|
|
131
|
+
title: string;
|
|
132
|
+
workspace: string;
|
|
133
|
+
createdAt: string;
|
|
134
|
+
lastActivityAt: string;
|
|
135
|
+
source: SessionSource;
|
|
136
|
+
}>;
|
|
103
137
|
getSession(sessionId: string): Promise<{
|
|
104
138
|
id: string;
|
|
105
139
|
title: string;
|
|
106
140
|
workspace: string;
|
|
107
141
|
createdAt: string;
|
|
108
142
|
lastActivityAt: string;
|
|
143
|
+
source: SessionSource;
|
|
109
144
|
}>;
|
|
110
145
|
append(sessionId: string, input: {
|
|
111
146
|
type: string;
|
|
@@ -117,6 +152,8 @@ export declare class JsonlSessionStore {
|
|
|
117
152
|
read(sessionId: string): Promise<SessionRecord[]>;
|
|
118
153
|
readExecutionState(sessionId: string): Promise<SessionExecutionState>;
|
|
119
154
|
readContext(sessionId: string): Promise<SessionRecord[]>;
|
|
155
|
+
contextGcProjectionHash(sessionId: string, boundarySequence: number): Promise<string>;
|
|
156
|
+
commitContextGc(sessionId: string, draft: ContextGcCheckpointDraft): Promise<SessionRecord>;
|
|
120
157
|
readPage(sessionId: string, input?: {
|
|
121
158
|
limit?: number;
|
|
122
159
|
beforeSequence?: number;
|
|
@@ -130,14 +167,13 @@ export declare class JsonlSessionStore {
|
|
|
130
167
|
environment?: EnvironmentContextState;
|
|
131
168
|
automatic?: boolean;
|
|
132
169
|
modelId?: string;
|
|
170
|
+
contextWindowTokens?: number;
|
|
171
|
+
usage?: ModelUsage;
|
|
133
172
|
executionId?: string;
|
|
134
173
|
turnId?: string;
|
|
135
174
|
}): Promise<SessionRecord>;
|
|
136
175
|
acquireSessionLease(sessionId: string): Promise<() => Promise<void>>;
|
|
137
|
-
list(input?: {
|
|
138
|
-
limit?: number;
|
|
139
|
-
cursor?: string;
|
|
140
|
-
}): Promise<{
|
|
176
|
+
list(input?: SessionListInput): Promise<{
|
|
141
177
|
nextCursor?: string;
|
|
142
178
|
sessions: {
|
|
143
179
|
id: string;
|
|
@@ -145,8 +181,10 @@ export declare class JsonlSessionStore {
|
|
|
145
181
|
workspace: string;
|
|
146
182
|
createdAt: string;
|
|
147
183
|
lastActivityAt: string;
|
|
184
|
+
source: SessionSource;
|
|
148
185
|
}[];
|
|
149
186
|
}>;
|
|
187
|
+
sessionTree(sessionId: string): Promise<readonly string[]>;
|
|
150
188
|
delete(sessionId: string): Promise<{
|
|
151
189
|
readonly deleted: boolean;
|
|
152
190
|
}>;
|