@hosty-sdk/app 0.51.0 → 0.52.0
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/dist/agent-schemas.js
CHANGED
|
@@ -52,6 +52,7 @@ export const AGENT_SCHEMAS = {
|
|
|
52
52
|
object({ ...baseControl, command: { const: "park" }, decisionId: id, decisionRevision: revision, reason: text(8192) }, [...Object.keys(baseControl), "command", "decisionId", "decisionRevision"]),
|
|
53
53
|
object({ ...baseControl, command: { const: "barrier" }, barrierId: id, kind: { enum: ["task_adoption", "child_wait", "source_rebind", "limits", "human_input"] }, generation: revision, acknowledgedSequence: sequence, snapshot: text(8192) }, [...Object.keys(baseControl), "command", "barrierId", "kind", "generation", "acknowledgedSequence"]),
|
|
54
54
|
object({ ...baseControl, command: { const: "reconcile" }, stopped: { const: true }, evidence: text(8192) }, [...Object.keys(baseControl), "command", "stopped"]),
|
|
55
|
+
object({ ...baseControl, command: { const: "retire" } }),
|
|
55
56
|
object({ ...baseControl, command: { const: "liveConfigure" }, mcp: ref("McpSelection") }),
|
|
56
57
|
object({ ...baseControl, command: { const: "mcpPolicy" }, mcp: ref("McpSelection") }),
|
|
57
58
|
object({ ...baseControl, command: { const: "predictions" }, enabled: boolean }),
|
|
@@ -163,7 +164,7 @@ export const AGENT_OPENAPI = {
|
|
|
163
164
|
responses: { ...errors, "200": { description: "Persisted agent event stream.", content: { "text/event-stream": { schema: { type: "string" }, "x-event-schema": ref("Event") } } } } } },
|
|
164
165
|
"/runs/{runId}/responses": { post: operation("runs.respond", "ControlReceipt", "ResponseInput", ["runId"], [200, 202]) },
|
|
165
166
|
"/runs/{runId}/cancel": { post: operation("runs.cancel", "ControlReceipt", "CancelInput", ["runId"], [200, 202]) },
|
|
166
|
-
"/runs/{runId}/controls": { post: { ...operation("runs.control", "ControlReceipt", "ControlInput", ["runId"], [200, 202]), description: "Optional controls require their advertised capabilities. Reconcile input is an attestation, never proof of actual native exit." } },
|
|
167
|
+
"/runs/{runId}/controls": { post: { ...operation("runs.control", "ControlReceipt", "ControlInput", ["runId"], [200, 202]), description: "Optional controls require their advertised capabilities. Reconcile input is an attestation, never proof of actual native exit. Retirement requires provider-owned evidence of native process exit. Its applied receipt records retirement of the exact run and preserves unresolved tool outcomes." } },
|
|
167
168
|
"/runs/{runId}/controls/{requestId}": { get: operation("runs.controls.read", "ControlReceipt", undefined, ["runId", "requestId"]) },
|
|
168
169
|
}, components: { securitySchemes: { installationHistory: { type: "http", scheme: "bearer", description: "Core-issued installation history credential." }, coreOperation: { type: "http", scheme: "bearer", description: "Fresh Core exact-operation credential, never the caller's service/user token." } }, schemas: AGENT_SCHEMAS },
|
|
169
170
|
};
|
package/dist/agent-server.js
CHANGED
|
@@ -259,7 +259,7 @@ export function validateAgentCancelInput(value) {
|
|
|
259
259
|
export function validateAgentRunControlInput(value) {
|
|
260
260
|
if (!object(value))
|
|
261
261
|
fail("An execution control is required.");
|
|
262
|
-
const fields = { park: ["decisionId", "decisionRevision", "reason"], barrier: ["barrierId", "kind", "generation", "acknowledgedSequence", "snapshot"], reconcile: ["stopped", "evidence"], liveConfigure: ["mcp"], mcpPolicy: ["mcp"], predictions: ["enabled"] };
|
|
262
|
+
const fields = { park: ["decisionId", "decisionRevision", "reason"], barrier: ["barrierId", "kind", "generation", "acknowledgedSequence", "snapshot"], reconcile: ["stopped", "evidence"], retire: [], liveConfigure: ["mcp"], mcpPolicy: ["mcp"], predictions: ["enabled"] };
|
|
263
263
|
if (typeof value.command !== "string" || !fields[value.command])
|
|
264
264
|
fail("Unsupported execution control.", 422, "unsupported_capability");
|
|
265
265
|
shape(value, ["requestId", "expectedGeneration", "expectedRevision", "command", ...fields[value.command]], "execution control");
|
package/dist/agent.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare const AGENT_CAPABILITIES: {
|
|
|
22
22
|
readonly park: "runs.park";
|
|
23
23
|
readonly barrier: "runs.barrier";
|
|
24
24
|
readonly reconcile: "runs.reconcile";
|
|
25
|
+
readonly retire: "runs.retire";
|
|
25
26
|
readonly liveConfigure: "runs.live-configure";
|
|
26
27
|
readonly predictions: "predictions";
|
|
27
28
|
readonly connectionUsage: "connections.usage";
|
|
@@ -417,6 +418,10 @@ export type AgentRunControlInput = {
|
|
|
417
418
|
command: "reconcile";
|
|
418
419
|
stopped: true;
|
|
419
420
|
evidence?: string;
|
|
421
|
+
}
|
|
422
|
+
/** Requires provider-owned exit evidence. Applied retirement preserves uncertain tool outcomes. */
|
|
423
|
+
| {
|
|
424
|
+
command: "retire";
|
|
420
425
|
} | {
|
|
421
426
|
command: "liveConfigure";
|
|
422
427
|
mcp: AgentMcpSelection;
|
package/dist/agent.js
CHANGED
|
@@ -7,7 +7,7 @@ export const AGENT_CAPABILITIES = {
|
|
|
7
7
|
noNativeTools: "native-tools.none", skills: "skills.catalog", exclusiveSkills: "skills.exclusive-selection",
|
|
8
8
|
coreMcp: "mcp.core", externalMcp: "mcp.external", modelChange: "model.change-on-resume",
|
|
9
9
|
nextTurnDecisions: "decisions.next-turn", nativeSubagents: "subagents.native", park: "runs.park",
|
|
10
|
-
barrier: "runs.barrier", reconcile: "runs.reconcile", liveConfigure: "runs.live-configure",
|
|
10
|
+
barrier: "runs.barrier", reconcile: "runs.reconcile", retire: "runs.retire", liveConfigure: "runs.live-configure",
|
|
11
11
|
predictions: "predictions", connectionUsage: "connections.usage",
|
|
12
12
|
approvalMode: "configuration.approval-mode",
|
|
13
13
|
mcpPolicy: "mcp.policy-update", consumerWorkflow: "workflow.consumer",
|
package/package.json
CHANGED
|
@@ -1008,6 +1008,33 @@
|
|
|
1008
1008
|
],
|
|
1009
1009
|
"additionalProperties": false
|
|
1010
1010
|
},
|
|
1011
|
+
{
|
|
1012
|
+
"type": "object",
|
|
1013
|
+
"properties": {
|
|
1014
|
+
"requestId": {
|
|
1015
|
+
"type": "string",
|
|
1016
|
+
"format": "uuid"
|
|
1017
|
+
},
|
|
1018
|
+
"expectedGeneration": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"format": "uuid"
|
|
1021
|
+
},
|
|
1022
|
+
"expectedRevision": {
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"pattern": "^[1-9][0-9]{0,39}$"
|
|
1025
|
+
},
|
|
1026
|
+
"command": {
|
|
1027
|
+
"const": "retire"
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
"required": [
|
|
1031
|
+
"requestId",
|
|
1032
|
+
"expectedGeneration",
|
|
1033
|
+
"expectedRevision",
|
|
1034
|
+
"command"
|
|
1035
|
+
],
|
|
1036
|
+
"additionalProperties": false
|
|
1037
|
+
},
|
|
1011
1038
|
{
|
|
1012
1039
|
"type": "object",
|
|
1013
1040
|
"properties": {
|
|
@@ -84,6 +84,16 @@
|
|
|
84
84
|
"acknowledgedSequence": "8"
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
+
{
|
|
88
|
+
"method": "POST",
|
|
89
|
+
"path": "/runs/22222222-2222-4222-8222-222222222222/controls",
|
|
90
|
+
"body": {
|
|
91
|
+
"requestId": "44444444-4444-4444-8444-444444444444",
|
|
92
|
+
"expectedGeneration": "33333333-3333-4333-8333-333333333333",
|
|
93
|
+
"expectedRevision": "1",
|
|
94
|
+
"command": "retire"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
87
97
|
{
|
|
88
98
|
"method": "PUT",
|
|
89
99
|
"path": "/attachments/44444444-4444-4444-8444-444444444444/chunks/0",
|
|
@@ -161,6 +171,17 @@
|
|
|
161
171
|
"output": "fabricated"
|
|
162
172
|
}
|
|
163
173
|
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"method": "POST",
|
|
177
|
+
"path": "/runs/22222222-2222-4222-8222-222222222222/controls",
|
|
178
|
+
"body": {
|
|
179
|
+
"requestId": "44444444-4444-4444-8444-444444444444",
|
|
180
|
+
"expectedGeneration": "33333333-3333-4333-8333-333333333333",
|
|
181
|
+
"expectedRevision": "1",
|
|
182
|
+
"command": "retire",
|
|
183
|
+
"stopped": true
|
|
184
|
+
}
|
|
164
185
|
}
|
|
165
186
|
]
|
|
166
187
|
}
|
|
@@ -2945,7 +2945,7 @@
|
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
},
|
|
2948
|
-
"description": "Optional controls require their advertised capabilities. Reconcile input is an attestation, never proof of actual native exit."
|
|
2948
|
+
"description": "Optional controls require their advertised capabilities. Reconcile input is an attestation, never proof of actual native exit. Retirement requires provider-owned evidence of native process exit. Its applied receipt records retirement of the exact run and preserves unresolved tool outcomes."
|
|
2949
2949
|
}
|
|
2950
2950
|
},
|
|
2951
2951
|
"/runs/{runId}/controls/{requestId}": {
|
|
@@ -4117,6 +4117,33 @@
|
|
|
4117
4117
|
],
|
|
4118
4118
|
"additionalProperties": false
|
|
4119
4119
|
},
|
|
4120
|
+
{
|
|
4121
|
+
"type": "object",
|
|
4122
|
+
"properties": {
|
|
4123
|
+
"requestId": {
|
|
4124
|
+
"type": "string",
|
|
4125
|
+
"format": "uuid"
|
|
4126
|
+
},
|
|
4127
|
+
"expectedGeneration": {
|
|
4128
|
+
"type": "string",
|
|
4129
|
+
"format": "uuid"
|
|
4130
|
+
},
|
|
4131
|
+
"expectedRevision": {
|
|
4132
|
+
"type": "string",
|
|
4133
|
+
"pattern": "^[1-9][0-9]{0,39}$"
|
|
4134
|
+
},
|
|
4135
|
+
"command": {
|
|
4136
|
+
"const": "retire"
|
|
4137
|
+
}
|
|
4138
|
+
},
|
|
4139
|
+
"required": [
|
|
4140
|
+
"requestId",
|
|
4141
|
+
"expectedGeneration",
|
|
4142
|
+
"expectedRevision",
|
|
4143
|
+
"command"
|
|
4144
|
+
],
|
|
4145
|
+
"additionalProperties": false
|
|
4146
|
+
},
|
|
4120
4147
|
{
|
|
4121
4148
|
"type": "object",
|
|
4122
4149
|
"properties": {
|