@meistrari/agent-core 0.2.0-experimental.1 → 0.2.0-experimental.2
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 +50 -0
- package/docs/consumer-capability-matrix.md +374 -0
- package/package.json +17 -10
- package/scripts/generate-codex-protocol.ts +711 -0
- package/src/agents/agent-operation.ts +8 -0
- package/src/agents/agent-provider.ts +3 -0
- package/src/agents/agent-run.ts +14 -2
- package/src/agents/agent-runtime-error.ts +28 -0
- package/src/agents/agent-session-events.ts +33 -0
- package/src/agents/agent-tool-runner.ts +12 -11
- package/src/agents/agent-tool.ts +12 -4
- package/src/agents/author-context.ts +1 -1
- package/src/agents/claude/claude-auth.ts +40 -0
- package/src/agents/claude/claude-browser-turn-metadata.ts +70 -0
- package/src/agents/claude/claude-code-process.ts +98 -0
- package/src/agents/claude/claude-command-mapper.ts +63 -3
- package/src/agents/claude/claude-desktop.ts +55 -0
- package/src/agents/claude/claude-event-mapper.ts +864 -135
- package/src/agents/claude/claude-file-change.ts +128 -0
- package/src/agents/claude/claude-provider.ts +344 -29
- package/src/agents/claude/claude-run.ts +893 -130
- package/src/agents/claude/claude-selected-repository-instructions.ts +91 -0
- package/src/agents/claude/claude-skill-catalog.ts +75 -0
- package/src/agents/claude/claude-steered-notifications.ts +180 -0
- package/src/agents/claude/claude-tool-mapper.ts +81 -2
- package/src/agents/claude/claude-workspace-skills.ts +87 -0
- package/src/agents/claude/index.ts +2 -0
- package/src/agents/codex/codex-auth-mapper.ts +27 -0
- package/src/agents/codex/codex-auth.ts +19 -0
- package/src/agents/codex/codex-browser-auth-broker.ts +320 -0
- package/src/agents/codex/codex-browser-auth-status.ts +55 -0
- package/src/agents/codex/codex-command-mapper.ts +38 -3
- package/src/agents/codex/codex-event-mapper.ts +375 -64
- package/src/agents/codex/codex-json-rpc-client.ts +66 -21
- package/src/agents/codex/codex-provider.ts +118 -236
- package/src/agents/codex/codex-run-auth.ts +113 -0
- package/src/agents/codex/codex-run.ts +423 -53
- package/src/agents/codex/codex-tool-mapper.ts +2 -2
- package/src/agents/codex/codex.errors.ts +8 -0
- package/src/agents/codex/generated/meta.gen.ts +144 -6
- package/src/agents/codex/generated/namespaces.gen.ts +92 -3
- package/src/agents/codex/generated/schema.gen.ts +24698 -15638
- package/src/agents/codex/lazy-codex-run-auth.ts +47 -0
- package/src/agents/index.ts +5 -0
- package/src/agents/input-attachment-preparation.ts +13 -0
- package/src/agents/mcp-tool-content.ts +82 -0
- package/src/agents/model-rebinding-run.ts +14 -3
- package/src/agents/selected-repository-instructions.ts +202 -0
- package/src/agents/session-context.ts +41 -0
- package/src/agents/subscription-token-refresh.ts +73 -0
- package/src/agents/user-input-request.ts +19 -20
- package/src/errors/index.ts +1 -1
- package/src/errors/validation-error.ts +6 -0
- package/src/protocol/agent-catalog.ts +159 -0
- package/src/protocol/agent-command.ts +52 -7
- package/src/protocol/agent-content.ts +36 -16
- package/src/protocol/agent-event.ts +210 -73
- package/src/protocol/agent-identity.ts +29 -0
- package/src/protocol/agent-json.ts +122 -8
- package/src/protocol/agent-metadata.ts +2 -2
- package/src/protocol/agent-model.ts +13 -1
- package/src/protocol/agent-notification.ts +110 -0
- package/src/protocol/agent-presentation.ts +71 -20
- package/src/protocol/agent-tool.ts +66 -10
- package/src/protocol/agent-usage.ts +3 -1
- package/src/protocol/agent-user-input.ts +4 -4
- package/src/protocol/agent-work.ts +12 -10
- package/src/protocol/index.ts +2 -0
- package/src/protocol/rejected-keys.ts +11 -0
- package/src/provenance.gen.ts +3 -3
- package/src/supervisor-protocol/agent-event-wrapper.ts +30 -0
|
@@ -2,16 +2,20 @@ import type { AgentEvent } from '../protocol'
|
|
|
2
2
|
import z from 'zod'
|
|
3
3
|
import {
|
|
4
4
|
contextCompactionCompletedAgentEventSchema,
|
|
5
|
+
contextCompactionRequestCompletedAgentEventSchema,
|
|
5
6
|
contextCompactionStartedAgentEventSchema,
|
|
7
|
+
contextUpdatedAgentEventSchema,
|
|
6
8
|
errorAgentEventSchema,
|
|
7
9
|
messageDeltaAgentEventSchema,
|
|
8
10
|
messageEndedAgentEventSchema,
|
|
9
11
|
messageStartedAgentEventSchema,
|
|
12
|
+
promptTurnCorrelatedAgentEventSchema,
|
|
10
13
|
reasoningEndedAgentEventSchema,
|
|
11
14
|
reasoningStartedAgentEventSchema,
|
|
12
15
|
reasoningSummaryDeltaAgentEventSchema,
|
|
13
16
|
sessionConfiguredAgentEventSchema,
|
|
14
17
|
sessionEndedAgentEventSchema,
|
|
18
|
+
sessionSettingsChangedAgentEventSchema,
|
|
15
19
|
sessionSkillsUpdatedAgentEventSchema,
|
|
16
20
|
sessionStartedAgentEventSchema,
|
|
17
21
|
sessionStateChangedAgentEventSchema,
|
|
@@ -21,6 +25,7 @@ import {
|
|
|
21
25
|
toolCallCompletedAgentEventSchema,
|
|
22
26
|
toolCallStartedAgentEventSchema,
|
|
23
27
|
toolOutputDeltaAgentEventSchema,
|
|
28
|
+
toolOutputUpdatedAgentEventSchema,
|
|
24
29
|
turnEndedAgentEventSchema,
|
|
25
30
|
turnStartedAgentEventSchema,
|
|
26
31
|
usageAgentEventSchema,
|
|
@@ -42,6 +47,10 @@ export const wrappedSessionConfiguredAgentEventSchema = sessionConfiguredAgentEv
|
|
|
42
47
|
type: z.literal('agent.session.configured'),
|
|
43
48
|
}).strict()
|
|
44
49
|
|
|
50
|
+
export const wrappedSessionSettingsChangedAgentEventSchema = sessionSettingsChangedAgentEventSchema.extend({
|
|
51
|
+
type: z.literal('agent.session.settings.changed'),
|
|
52
|
+
}).strict()
|
|
53
|
+
|
|
45
54
|
export const wrappedSessionSkillsUpdatedAgentEventSchema = sessionSkillsUpdatedAgentEventSchema.extend({
|
|
46
55
|
type: z.literal('agent.session.skills.updated'),
|
|
47
56
|
}).strict()
|
|
@@ -58,6 +67,10 @@ export const wrappedTurnStartedAgentEventSchema = turnStartedAgentEventSchema.ex
|
|
|
58
67
|
type: z.literal('agent.turn.started'),
|
|
59
68
|
}).strict()
|
|
60
69
|
|
|
70
|
+
export const wrappedPromptTurnCorrelatedAgentEventSchema = promptTurnCorrelatedAgentEventSchema.extend({
|
|
71
|
+
type: z.literal('agent.prompt.turn-correlated'),
|
|
72
|
+
}).strict()
|
|
73
|
+
|
|
61
74
|
export const wrappedTurnEndedAgentEventSchema = turnEndedAgentEventSchema.extend({
|
|
62
75
|
type: z.literal('agent.turn.ended'),
|
|
63
76
|
}).strict()
|
|
@@ -98,6 +111,10 @@ export const wrappedToolOutputDeltaAgentEventSchema = toolOutputDeltaAgentEventS
|
|
|
98
111
|
type: z.literal('agent.tool.output.delta'),
|
|
99
112
|
}).strict()
|
|
100
113
|
|
|
114
|
+
export const wrappedToolOutputUpdatedAgentEventSchema = toolOutputUpdatedAgentEventSchema.extend({
|
|
115
|
+
type: z.literal('agent.tool.output.updated'),
|
|
116
|
+
}).strict()
|
|
117
|
+
|
|
101
118
|
export const wrappedToolCallCompletedAgentEventSchema = toolCallCompletedAgentEventSchema.extend({
|
|
102
119
|
type: z.literal('agent.tool.call.completed'),
|
|
103
120
|
}).strict()
|
|
@@ -118,6 +135,10 @@ export const wrappedUsageAgentEventSchema = usageAgentEventSchema.extend({
|
|
|
118
135
|
type: z.literal('agent.usage'),
|
|
119
136
|
}).strict()
|
|
120
137
|
|
|
138
|
+
export const wrappedContextUpdatedAgentEventSchema = contextUpdatedAgentEventSchema.extend({
|
|
139
|
+
type: z.literal('agent.context.updated'),
|
|
140
|
+
}).strict()
|
|
141
|
+
|
|
121
142
|
export const wrappedContextCompactionStartedAgentEventSchema = contextCompactionStartedAgentEventSchema.extend({
|
|
122
143
|
type: z.literal('agent.context.compaction.started'),
|
|
123
144
|
}).strict()
|
|
@@ -126,6 +147,10 @@ export const wrappedContextCompactionCompletedAgentEventSchema = contextCompacti
|
|
|
126
147
|
type: z.literal('agent.context.compaction.completed'),
|
|
127
148
|
}).strict()
|
|
128
149
|
|
|
150
|
+
export const wrappedContextCompactionRequestCompletedAgentEventSchema = contextCompactionRequestCompletedAgentEventSchema.extend({
|
|
151
|
+
type: z.literal('agent.context.compaction.request.completed'),
|
|
152
|
+
}).strict()
|
|
153
|
+
|
|
129
154
|
export const wrappedUserInputRequestedAgentEventSchema = userInputRequestedAgentEventSchema.extend({
|
|
130
155
|
type: z.literal('agent.user-input.requested'),
|
|
131
156
|
}).strict()
|
|
@@ -141,10 +166,12 @@ export const wrappedErrorAgentEventSchema = errorAgentEventSchema.extend({
|
|
|
141
166
|
export const wrappedAgentEventSchema = z.discriminatedUnion('type', [
|
|
142
167
|
wrappedSessionStartedAgentEventSchema,
|
|
143
168
|
wrappedSessionConfiguredAgentEventSchema,
|
|
169
|
+
wrappedSessionSettingsChangedAgentEventSchema,
|
|
144
170
|
wrappedSessionSkillsUpdatedAgentEventSchema,
|
|
145
171
|
wrappedSessionStateChangedAgentEventSchema,
|
|
146
172
|
wrappedSessionEndedAgentEventSchema,
|
|
147
173
|
wrappedTurnStartedAgentEventSchema,
|
|
174
|
+
wrappedPromptTurnCorrelatedAgentEventSchema,
|
|
148
175
|
wrappedTurnEndedAgentEventSchema,
|
|
149
176
|
wrappedWorkObservedAgentEventSchema,
|
|
150
177
|
wrappedMessageStartedAgentEventSchema,
|
|
@@ -155,13 +182,16 @@ export const wrappedAgentEventSchema = z.discriminatedUnion('type', [
|
|
|
155
182
|
wrappedReasoningEndedAgentEventSchema,
|
|
156
183
|
wrappedToolCallStartedAgentEventSchema,
|
|
157
184
|
wrappedToolOutputDeltaAgentEventSchema,
|
|
185
|
+
wrappedToolOutputUpdatedAgentEventSchema,
|
|
158
186
|
wrappedToolCallCompletedAgentEventSchema,
|
|
159
187
|
wrappedSubagentStartedAgentEventSchema,
|
|
160
188
|
wrappedSubagentProgressAgentEventSchema,
|
|
161
189
|
wrappedSubagentEndedAgentEventSchema,
|
|
162
190
|
wrappedUsageAgentEventSchema,
|
|
191
|
+
wrappedContextUpdatedAgentEventSchema,
|
|
163
192
|
wrappedContextCompactionStartedAgentEventSchema,
|
|
164
193
|
wrappedContextCompactionCompletedAgentEventSchema,
|
|
194
|
+
wrappedContextCompactionRequestCompletedAgentEventSchema,
|
|
165
195
|
wrappedUserInputRequestedAgentEventSchema,
|
|
166
196
|
wrappedUserInputResolvedAgentEventSchema,
|
|
167
197
|
wrappedErrorAgentEventSchema,
|