@agentconnect.md/daemon 1.0.0-rc.116 → 1.0.0-rc.117
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/index.js +8 -53
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12818,7 +12818,6 @@ const Envelope = object({
|
|
|
12818
12818
|
});
|
|
12819
12819
|
object({
|
|
12820
12820
|
epoch: number().int(),
|
|
12821
|
-
seq: number().int().optional(),
|
|
12822
12821
|
agentId: string().uuid().optional(),
|
|
12823
12822
|
launchId: string().uuid().optional()
|
|
12824
12823
|
});
|
|
@@ -12839,20 +12838,14 @@ const AuthReq = object({
|
|
|
12839
12838
|
machineId: string().uuid().optional(),
|
|
12840
12839
|
attestation: string().optional(),
|
|
12841
12840
|
agentVersion: string(),
|
|
12842
|
-
resume: object({
|
|
12843
|
-
lastEpoch: number().int(),
|
|
12844
|
-
lastRecvSeq: record(string(), number())
|
|
12845
|
-
}).optional()
|
|
12841
|
+
resume: object({ lastEpoch: number().int() }).optional()
|
|
12846
12842
|
});
|
|
12847
12843
|
const AuthOk = object({
|
|
12848
12844
|
daemonId: string().uuid(),
|
|
12849
12845
|
sessionEpoch: number().int(),
|
|
12850
12846
|
heartbeatSec: number().int(),
|
|
12851
12847
|
serverTime: string().datetime(),
|
|
12852
|
-
resume: object({
|
|
12853
|
-
accepted: boolean(),
|
|
12854
|
-
redeliverFromSeq: record(string(), number()).optional()
|
|
12855
|
-
}).optional()
|
|
12848
|
+
resume: object({ accepted: boolean() }).optional()
|
|
12856
12849
|
});
|
|
12857
12850
|
//#endregion
|
|
12858
12851
|
//#region ../protocol/dist/frames/route.js
|
|
@@ -13020,21 +13013,13 @@ const ScopeAttestation = object({
|
|
|
13020
13013
|
//#endregion
|
|
13021
13014
|
//#region ../protocol/dist/frames/agent.js
|
|
13022
13015
|
/**
|
|
13023
|
-
* Agent lifecycle
|
|
13016
|
+
* Agent lifecycle (protocol §4.4, §7.4, §8).
|
|
13024
13017
|
*
|
|
13025
|
-
*
|
|
13026
|
-
*
|
|
13027
|
-
*
|
|
13028
|
-
|
|
13029
|
-
/**
|
|
13030
|
-
* A REFERENCE/digest of a normalized message, NOT the body (protocol §4.3).
|
|
13031
|
-
* Enough for D4/D6 to fetch the local body and prompt.
|
|
13018
|
+
* There is no CP→daemon prompt-delivery frame: the daemon prompts an agent from
|
|
13019
|
+
* its own ingress (platform adapters, and webchat over its own `webchat/*`
|
|
13020
|
+
* frames), never the CP. The old `agent/prompt` + per-agent `seq` machinery was
|
|
13021
|
+
* reserved infrastructure with no live caller and has been removed.
|
|
13032
13022
|
*/
|
|
13033
|
-
const NormalizedMessageRef = object({
|
|
13034
|
-
sessionKey: SessionKey,
|
|
13035
|
-
platformMsgId: string(),
|
|
13036
|
-
seenUpToSeq: number().int()
|
|
13037
|
-
});
|
|
13038
13023
|
/**
|
|
13039
13024
|
* Where the agent runs. Two modes; the **path is always daemon-generated** —
|
|
13040
13025
|
* never specified by the caller (UX picks the mode, the machine owns the dir).
|
|
@@ -13102,23 +13087,6 @@ const AgentStop = object({
|
|
|
13102
13087
|
launchId: string().uuid(),
|
|
13103
13088
|
reason: string()
|
|
13104
13089
|
});
|
|
13105
|
-
const AgentPrompt = object({
|
|
13106
|
-
sessionKey: SessionKey,
|
|
13107
|
-
agentId: string().uuid(),
|
|
13108
|
-
content: NormalizedMessageRef,
|
|
13109
|
-
seenUpToSeq: number().int()
|
|
13110
|
-
});
|
|
13111
|
-
const AgentPromptAck = object({
|
|
13112
|
-
accepted: boolean(),
|
|
13113
|
-
reason: _enum([
|
|
13114
|
-
"queued",
|
|
13115
|
-
"held",
|
|
13116
|
-
"scope_denied",
|
|
13117
|
-
"no_session",
|
|
13118
|
-
"stale"
|
|
13119
|
-
]).optional(),
|
|
13120
|
-
seq: number().int()
|
|
13121
|
-
});
|
|
13122
13090
|
const AgentActivity = object({
|
|
13123
13091
|
agentId: string().uuid(),
|
|
13124
13092
|
launchId: string().uuid(),
|
|
@@ -13567,8 +13535,6 @@ const FRAME_SCHEMAS = {
|
|
|
13567
13535
|
"agent/stop": AgentStop,
|
|
13568
13536
|
"agent/upsert": AgentUpsert,
|
|
13569
13537
|
"agent/remove": AgentRemove,
|
|
13570
|
-
"agent/prompt": AgentPrompt,
|
|
13571
|
-
"agent/prompt/ack": AgentPromptAck,
|
|
13572
13538
|
"agent/activity": AgentActivity,
|
|
13573
13539
|
"agent/scope-denied": AgentScopeDenied,
|
|
13574
13540
|
"route/assign": RouteAssign,
|
|
@@ -13634,9 +13600,7 @@ const FRAME_SCHEMAS = {
|
|
|
13634
13600
|
"ATTESTATION_INVALID",
|
|
13635
13601
|
"STALE_EPOCH",
|
|
13636
13602
|
"STALE_LAUNCH",
|
|
13637
|
-
"SEQ_GAP",
|
|
13638
13603
|
"NO_SESSION",
|
|
13639
|
-
"HELD",
|
|
13640
13604
|
"SCOPE_DENIED",
|
|
13641
13605
|
"LEASE_EXPIRED",
|
|
13642
13606
|
"LEASE_DENIED",
|
|
@@ -13674,8 +13638,6 @@ discriminatedUnion("type", [
|
|
|
13674
13638
|
frame("agent/stop", FRAME_SCHEMAS["agent/stop"]),
|
|
13675
13639
|
frame("agent/upsert", FRAME_SCHEMAS["agent/upsert"]),
|
|
13676
13640
|
frame("agent/remove", FRAME_SCHEMAS["agent/remove"]),
|
|
13677
|
-
frame("agent/prompt", FRAME_SCHEMAS["agent/prompt"]),
|
|
13678
|
-
frame("agent/prompt/ack", FRAME_SCHEMAS["agent/prompt/ack"]),
|
|
13679
13641
|
frame("agent/activity", FRAME_SCHEMAS["agent/activity"]),
|
|
13680
13642
|
frame("agent/scope-denied", FRAME_SCHEMAS["agent/scope-denied"]),
|
|
13681
13643
|
frame("route/assign", FRAME_SCHEMAS["route/assign"]),
|
|
@@ -13734,7 +13696,6 @@ function extractControlExt(json) {
|
|
|
13734
13696
|
const o = json;
|
|
13735
13697
|
const ext = {};
|
|
13736
13698
|
if (typeof o.epoch === "number") ext.epoch = o.epoch;
|
|
13737
|
-
if (typeof o.seq === "number") ext.seq = o.seq;
|
|
13738
13699
|
if (typeof o.agentId === "string") ext.agentId = o.agentId;
|
|
13739
13700
|
if (typeof o.launchId === "string") ext.launchId = o.launchId;
|
|
13740
13701
|
return Object.keys(ext).length > 0 ? ext : void 0;
|
|
@@ -83017,10 +82978,7 @@ var CpClient = class {
|
|
|
83017
82978
|
agentVersion: this.deps.agentVersion
|
|
83018
82979
|
};
|
|
83019
82980
|
if (this.deps.daemonId) authPayload.daemonId = this.deps.daemonId;
|
|
83020
|
-
if (this.lastAuthedEpoch > 0) authPayload.resume = {
|
|
83021
|
-
lastEpoch: this.lastAuthedEpoch,
|
|
83022
|
-
lastRecvSeq: {}
|
|
83023
|
-
};
|
|
82981
|
+
if (this.lastAuthedEpoch > 0) authPayload.resume = { lastEpoch: this.lastAuthedEpoch };
|
|
83024
82982
|
const ok = (await this.request("auth", authPayload)).payload;
|
|
83025
82983
|
this.sessionEpoch = ok.sessionEpoch;
|
|
83026
82984
|
this.lastAuthedEpoch = ok.sessionEpoch;
|
|
@@ -83263,9 +83221,6 @@ var CpClient = class {
|
|
|
83263
83221
|
case "workspace/gitpull":
|
|
83264
83222
|
this.deps.workspaceGit.pull(frame.payload.agentId).then((result) => this.reply(frame, "workspace/gitpull/result", result)).catch((err) => this.workspaceError(frame.id, "workspace/gitpull", err));
|
|
83265
83223
|
return;
|
|
83266
|
-
case "agent/prompt":
|
|
83267
|
-
this.sendError(frame.id, "INTERNAL", "agent/prompt not implemented", false);
|
|
83268
|
-
return;
|
|
83269
83224
|
default:
|
|
83270
83225
|
this.deps.log.debug(`cp: ignoring ${frame.type}`);
|
|
83271
83226
|
return;
|