agentfootprint 9.22.0 → 9.23.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/adapters/hosting/agentcore.js +10 -0
- package/dist/adapters/hosting/agentcore.js.map +1 -1
- package/dist/core/Agent.js +16 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/esm/adapters/hosting/agentcore.js +10 -0
- package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +15 -0
- package/dist/esm/core/Agent.js +16 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +12 -4
- package/dist/esm/hosting/artifactWire.d.ts +94 -0
- package/dist/esm/hosting/artifactWire.js +90 -0
- package/dist/esm/hosting/artifactWire.js.map +1 -0
- package/dist/esm/hosting/errors.d.ts +78 -0
- package/dist/esm/hosting/errors.js +112 -0
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/httpHost.d.ts +26 -3
- package/dist/esm/hosting/httpHost.js +61 -13
- package/dist/esm/hosting/httpHost.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +3 -1
- package/dist/esm/hosting/index.js +8 -1
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/nodeHost.d.ts +5 -1
- package/dist/esm/hosting/nodeHost.js +15 -1
- package/dist/esm/hosting/nodeHost.js.map +1 -1
- package/dist/esm/hosting/standingAgent.js +180 -1
- package/dist/esm/hosting/standingAgent.js.map +1 -1
- package/dist/esm/hosting/types.d.ts +54 -13
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/hosting/artifactWire.js +95 -0
- package/dist/hosting/artifactWire.js.map +1 -0
- package/dist/hosting/errors.js +118 -1
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/httpHost.js +60 -12
- package/dist/hosting/httpHost.js.map +1 -1
- package/dist/hosting/index.js +17 -1
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/nodeHost.js +15 -1
- package/dist/hosting/nodeHost.js.map +1 -1
- package/dist/hosting/standingAgent.js +179 -0
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/hosting/types.js.map +1 -1
- package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +15 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +12 -4
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/hosting/artifactWire.d.ts +95 -0
- package/dist/types/hosting/artifactWire.d.ts.map +1 -0
- package/dist/types/hosting/errors.d.ts +78 -0
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/httpHost.d.ts +26 -3
- package/dist/types/hosting/httpHost.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +3 -1
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/nodeHost.d.ts +5 -1
- package/dist/types/hosting/nodeHost.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent.d.ts.map +1 -1
- package/dist/types/hosting/types.d.ts +54 -13
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -97,10 +97,11 @@
|
|
|
97
97
|
* Pattern: Composition root. It owns wiring and ordering; it invents no
|
|
98
98
|
* mechanism of its own.
|
|
99
99
|
*/
|
|
100
|
+
import { bindArtifacts } from '../artifacts/capability.js';
|
|
100
101
|
import { isPaused } from '../core/pause.js';
|
|
101
102
|
import { durableWriter } from './durability.js';
|
|
102
103
|
import { readEnvelope, readPausedRun, toEnvelope, toPausedEnvelope } from './envelope.js';
|
|
103
|
-
import { AwaitingDecisionError, ConcurrentRunError, NoPendingAskError, PauseNotCarriedError, UnreadableEnvelopeError, } from './errors.js';
|
|
104
|
+
import { ArtifactNotCarriedError, ArtifactNotFoundError, ArtifactSessionRequiredError, AwaitingDecisionError, ConcurrentRunError, NoArtifactStoreError, NoPendingAskError, PauseNotCarriedError, UnreadableEnvelopeError, } from './errors.js';
|
|
104
105
|
import { DEFAULT_MAX_ACTIVE_SESSIONS } from './types.js';
|
|
105
106
|
/**
|
|
106
107
|
* The pool key the anonymous fallback instance is held under, and the session
|
|
@@ -392,6 +393,22 @@ export async function standingAgent(options) {
|
|
|
392
393
|
return mine;
|
|
393
394
|
}
|
|
394
395
|
const handler = async (request, reply) => {
|
|
396
|
+
// ── A claim-ticket redemption is not a turn ────────────────────────
|
|
397
|
+
// Its presence is the discriminant, exactly as `decision`'s is one line
|
|
398
|
+
// down: a request carrying `artifact` redeems a ref and never starts,
|
|
399
|
+
// queues behind, or is refused as, a run. Read-only against the store, so
|
|
400
|
+
// it deliberately bypasses the lane's serialization — a screen describing
|
|
401
|
+
// a chart while the model is mid-turn must not be refused as a
|
|
402
|
+
// "concurrent run", and must not make the turn wait either.
|
|
403
|
+
if (request.artifact !== undefined) {
|
|
404
|
+
try {
|
|
405
|
+
await answerArtifact(request.artifact, request, reply);
|
|
406
|
+
}
|
|
407
|
+
catch (err) {
|
|
408
|
+
reply.fail(err instanceof Error ? err : new Error(String(err)));
|
|
409
|
+
}
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
395
412
|
const sessionId = request.sessionId;
|
|
396
413
|
// A request with no session has nothing to hydrate and nowhere to persist
|
|
397
414
|
// that the caller could ask for again, so it gets its own key and can never
|
|
@@ -408,6 +425,118 @@ export async function standingAgent(options) {
|
|
|
408
425
|
reply.fail(err instanceof Error ? err : new Error(String(err)));
|
|
409
426
|
}
|
|
410
427
|
};
|
|
428
|
+
/**
|
|
429
|
+
* Redeem one claim ticket for the screen: `artifact-head` (metadata — the
|
|
430
|
+
* render-by-ref decision) or `artifact-get` (metadata + payload), against
|
|
431
|
+
* the store of the agent that serves this session.
|
|
432
|
+
*
|
|
433
|
+
* ── The scope is the run's own, re-composed — one isolation rule ────────
|
|
434
|
+
* A ref is redeemed under EXACTLY the scope the run's tools minted it in:
|
|
435
|
+
* `identityForRequest(userId, sessionId, storedIdentity)` when the request
|
|
436
|
+
* names a user — the same call, on the same inputs, that composed the run's
|
|
437
|
+
* identity — else the session rung `{ conversationId: sessionId }` (what
|
|
438
|
+
* seed derives for an identity-less served run). No new spelling exists to
|
|
439
|
+
* drift. The stored identity is read only when a `userId` arrived (it is
|
|
440
|
+
* the only rung that needs the stored tenant/conversation tuple), through
|
|
441
|
+
* the same wake → hydrate → refuse-unreadable steps a turn takes.
|
|
442
|
+
*
|
|
443
|
+
* A ref from another session — or a right session presented with the wrong
|
|
444
|
+
* identity — composes a different tuple, and the store answers a wrong
|
|
445
|
+
* tuple with "no data", never with a distinguishable error. So the wire's
|
|
446
|
+
* not-found is ONE shape for missing, expired and foreign alike:
|
|
447
|
+
* {@link ArtifactNotFoundError}, byte-identical but for the ref itself.
|
|
448
|
+
*
|
|
449
|
+
* ── On the record, once ─────────────────────────────────────────────────
|
|
450
|
+
* Resolution rides the existing `artifacts.resolved` / `artifacts.refused`
|
|
451
|
+
* events through the capability's own fact sink (the raw store emits
|
|
452
|
+
* nothing, so binding is the ONE emitter — no double-emit), delivered on
|
|
453
|
+
* the serving agent's dispatcher with no `tool` field: the redeemer was the
|
|
454
|
+
* hosting door, and a phantom tool name would be an actor that does not
|
|
455
|
+
* exist.
|
|
456
|
+
*
|
|
457
|
+
* Zero-cost when unused: an agent without a store answers with the teaching
|
|
458
|
+
* refusal naming the attach, and nothing else in the composer changes.
|
|
459
|
+
*/
|
|
460
|
+
async function answerArtifact(op, request, reply) {
|
|
461
|
+
const sessionId = request.sessionId;
|
|
462
|
+
if (sessionId === undefined) {
|
|
463
|
+
// An anonymous run scopes its artifacts to its own runId — a name no
|
|
464
|
+
// later request can present — so there is genuinely nothing a
|
|
465
|
+
// session-less redemption could ever resolve. Taught, not 404'd: this
|
|
466
|
+
// is a caller gap, not a missing ref.
|
|
467
|
+
reply.fail(new ArtifactSessionRequiredError(op.op));
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const lane = laneFor(sessionId);
|
|
471
|
+
// Admitted for the duration: a lane with work is never evicted, and a
|
|
472
|
+
// resolution mid-flight is work — retiring the instance under it would
|
|
473
|
+
// tear down the very store being read.
|
|
474
|
+
lane.admitted += 1;
|
|
475
|
+
try {
|
|
476
|
+
const store = lane.agent.getArtifactStore();
|
|
477
|
+
if (store === undefined) {
|
|
478
|
+
// The fail-closed law at the wire: the refusal lands on the record
|
|
479
|
+
// (`no-store`, the same reason `ctx.artifacts` teaches with) and the
|
|
480
|
+
// reply names the attach.
|
|
481
|
+
emitArtifactFact(lane.agent, {
|
|
482
|
+
type: 'refused',
|
|
483
|
+
op: op.op,
|
|
484
|
+
reason: 'no-store',
|
|
485
|
+
ref: op.ref,
|
|
486
|
+
});
|
|
487
|
+
reply.fail(new NoArtifactStoreError(op.op));
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
let stored;
|
|
491
|
+
if (request.userId !== undefined) {
|
|
492
|
+
await sessions.onWake?.(sessionId, 'artifact');
|
|
493
|
+
try {
|
|
494
|
+
const envelope = await sessions.hydrate(sessionId);
|
|
495
|
+
if (envelope !== undefined) {
|
|
496
|
+
stored =
|
|
497
|
+
envelope.format === 'flowchart-v1'
|
|
498
|
+
? readPausedRun(envelope).conversation.identity
|
|
499
|
+
: readEnvelope(envelope).identity;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
catch (err) {
|
|
503
|
+
// The same law as a turn: an unreadable stored conversation is a
|
|
504
|
+
// different fact from an absent one, and only one of them is safe
|
|
505
|
+
// to compose a scope from.
|
|
506
|
+
throw err instanceof UnreadableEnvelopeError ? err.withSession(sessionId) : err;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
const scope = identityForRequest(request.userId, sessionId, stored) ?? {
|
|
510
|
+
conversationId: sessionId,
|
|
511
|
+
};
|
|
512
|
+
const bound = bindArtifacts(store, scope, {
|
|
513
|
+
onEvent: (fact) => emitArtifactFact(lane.agent, fact),
|
|
514
|
+
});
|
|
515
|
+
if (op.op === 'head') {
|
|
516
|
+
const meta = await bound.head(op.ref);
|
|
517
|
+
if (meta === null) {
|
|
518
|
+
reply.fail(new ArtifactNotFoundError(op.ref));
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
deliverArtifact(reply, { op: 'head', ref: op.ref, meta });
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
// A digest mismatch throws here (ArtifactIntegrityError) rather than
|
|
525
|
+
// returning corrupt bytes as whole — it propagates to the handler's
|
|
526
|
+
// catch as this request's failure, already on the record via the sink.
|
|
527
|
+
const record = await bound.get(op.ref);
|
|
528
|
+
if (record === null) {
|
|
529
|
+
reply.fail(new ArtifactNotFoundError(op.ref));
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
deliverArtifact(reply, { op: 'get', ref: op.ref, meta: record.meta, data: record.data });
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
finally {
|
|
536
|
+
lane.admitted -= 1;
|
|
537
|
+
lane.lastUsedMs = Date.now();
|
|
538
|
+
}
|
|
539
|
+
}
|
|
411
540
|
async function answerOne(lane, store, request, reply, sessionId) {
|
|
412
541
|
const runner = lane.agent;
|
|
413
542
|
lane.activeReply = reply;
|
|
@@ -696,6 +825,56 @@ function identityForRequest(userId, sessionId, stored) {
|
|
|
696
825
|
principal: userId,
|
|
697
826
|
};
|
|
698
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* End the reply with a resolved artifact — through the terminal built for it
|
|
830
|
+
* when the host has one, and through the named refusal when it does not.
|
|
831
|
+
*
|
|
832
|
+
* The `awaiting` fallback law, applied to the other optional terminal: a host
|
|
833
|
+
* that cannot describe the result must say so by name rather than deliver an
|
|
834
|
+
* improvised shape or nothing. The resolution itself already happened and is
|
|
835
|
+
* already on the record either way.
|
|
836
|
+
*/
|
|
837
|
+
function deliverArtifact(reply, result) {
|
|
838
|
+
if (reply.artifact) {
|
|
839
|
+
reply.artifact(result);
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
reply.fail(new ArtifactNotCarriedError(result.ref));
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Put one capability fact on the serving agent's typed record — the wire
|
|
846
|
+
* door's adapter onto the SAME `artifacts.resolved` / `artifacts.refused`
|
|
847
|
+
* events every tool redemption rides, minus the `tool` field (the redeemer
|
|
848
|
+
* was the hosting door, and payloads never carry an actor that does not
|
|
849
|
+
* exist).
|
|
850
|
+
*
|
|
851
|
+
* `minted` and `expired` have no arm because a read-only door cannot produce
|
|
852
|
+
* them — only `put` does, and the wire deliberately has no put. Dropped when
|
|
853
|
+
* nobody listens (the dispatcher's own fast path), so an unobserved agent
|
|
854
|
+
* pays one listener check per fact and nothing more.
|
|
855
|
+
*/
|
|
856
|
+
function emitArtifactFact(agent, fact) {
|
|
857
|
+
switch (fact.type) {
|
|
858
|
+
case 'resolved':
|
|
859
|
+
agent.emit('agentfootprint.artifacts.resolved', {
|
|
860
|
+
ref: fact.ref,
|
|
861
|
+
via: fact.via,
|
|
862
|
+
kind: fact.kind,
|
|
863
|
+
bytes: fact.bytes,
|
|
864
|
+
});
|
|
865
|
+
return;
|
|
866
|
+
case 'refused':
|
|
867
|
+
agent.emit('agentfootprint.artifacts.refused', {
|
|
868
|
+
op: fact.op,
|
|
869
|
+
reason: fact.reason,
|
|
870
|
+
...(fact.ref !== undefined && { ref: fact.ref }),
|
|
871
|
+
...(fact.detail !== undefined && { detail: fact.detail }),
|
|
872
|
+
});
|
|
873
|
+
return;
|
|
874
|
+
default:
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
699
878
|
/**
|
|
700
879
|
* Project a paused run into the part that is safe to hand back: the question,
|
|
701
880
|
* never the state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingAgent.js","sourceRoot":"","sources":["../../../src/hosting/standingAgent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,MAAM,QAAQ,GAAG,OAAO,IAAI,EAAE,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,OAAO;QACL,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7C,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC3C,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;QAClE,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;QACtD,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -26,6 +26,7 @@ import type { CheckInRequest } from '../core/checkin.js';
|
|
|
26
26
|
import type { MiddlewareAsk } from '../core/pause.js';
|
|
27
27
|
import type { AgentRunCheckpoint } from '../core/runCheckpoint.js';
|
|
28
28
|
import type { Unsubscribe } from '../events/dispatcher.js';
|
|
29
|
+
import type { ArtifactWireRequest, ArtifactWireResult } from './artifactWire.js';
|
|
29
30
|
export type { Unsubscribe };
|
|
30
31
|
/**
|
|
31
32
|
* Something a host can do BEYOND the baseline of "accept a request, deliver one
|
|
@@ -107,6 +108,22 @@ export interface HostRequest {
|
|
|
107
108
|
* knows what stands in front of it.
|
|
108
109
|
*/
|
|
109
110
|
readonly userId?: string;
|
|
111
|
+
/**
|
|
112
|
+
* An artifact operation this request carries INSTEAD of a message (9.23.0)
|
|
113
|
+
* — `head` (the claim ticket's metadata) or `get` (metadata + payload), for
|
|
114
|
+
* one ref.
|
|
115
|
+
*
|
|
116
|
+
* Its PRESENCE is the discriminant, exactly as {@link decision}'s is: a
|
|
117
|
+
* request carrying `artifact` redeems a ticket and never starts or resumes
|
|
118
|
+
* a run — `input` and `decision` do not ride it. A handler that serves
|
|
119
|
+
* artifacts answers with {@link HostReply.artifact}; a handler that does
|
|
120
|
+
* not should refuse it by name rather than treat it as a message, because a
|
|
121
|
+
* redemption silently answered by a model turn is a caller told nothing and
|
|
122
|
+
* billed anyway. `standingAgent` answers it: the ref is resolved against
|
|
123
|
+
* the serving agent's store under the requesting session's
|
|
124
|
+
* identity-composed scope — exactly the scope the run's own tools used.
|
|
125
|
+
*/
|
|
126
|
+
readonly artifact?: ArtifactWireRequest;
|
|
110
127
|
/**
|
|
111
128
|
* Transport headers with lower-cased names, as delivered. Present so a
|
|
112
129
|
* handler can map its own conventions (a correlation id, a tenant) without
|
|
@@ -118,14 +135,18 @@ export interface HostRequest {
|
|
|
118
135
|
}
|
|
119
136
|
/**
|
|
120
137
|
* The one reply a request gets. Exactly one of {@link HostReply.complete},
|
|
121
|
-
* {@link HostReply.awaiting}
|
|
122
|
-
* ignored rather than allowed
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* `
|
|
128
|
-
*
|
|
138
|
+
* {@link HostReply.awaiting}, {@link HostReply.artifact} or
|
|
139
|
+
* {@link HostReply.fail} ends it; a second call is ignored rather than allowed
|
|
140
|
+
* to corrupt the wire.
|
|
141
|
+
*
|
|
142
|
+
* Three terminals for a RUN, because a run has three ends and only three: it
|
|
143
|
+
* answered, it stopped to ask a person something, or it failed. Before
|
|
144
|
+
* `'flowchart-v1'` there was nowhere to keep a paused run, so the middle one
|
|
145
|
+
* was delivered through `fail` — an error standing in for unfinished work. It
|
|
146
|
+
* is a terminal of its own now, and a pause is never reported as a failure
|
|
147
|
+
* again. The fourth terminal ends a request that never was a run:
|
|
148
|
+
* {@link HostRequest.artifact} redeems a claim ticket, and `artifact(...)` is
|
|
149
|
+
* how the resolved ticket comes back.
|
|
129
150
|
*/
|
|
130
151
|
export interface HostReply {
|
|
131
152
|
/** Deliver the final answer and end the reply. */
|
|
@@ -148,6 +169,20 @@ export interface HostReply {
|
|
|
148
169
|
* the pause is never lost merely because the wire could not describe it.
|
|
149
170
|
*/
|
|
150
171
|
awaiting?(pending: PendingAsk): void;
|
|
172
|
+
/**
|
|
173
|
+
* End the reply with a **resolved artifact** (9.23.0): the metadata for a
|
|
174
|
+
* `head`, metadata + payload for a `get`. The terminal a request carrying
|
|
175
|
+
* {@link HostRequest.artifact} ends through when the ref resolved; a ref
|
|
176
|
+
* that did not resolve ends through `fail` with the one indistinguishable
|
|
177
|
+
* not-found refusal.
|
|
178
|
+
*
|
|
179
|
+
* Optional on the TYPE for the same reason {@link HostReply.awaiting} is: a
|
|
180
|
+
* minimal adapter need not implement it, and every shipped adapter does.
|
|
181
|
+
* When it is absent the composer ends the reply with a named refusal
|
|
182
|
+
* (`ArtifactNotCarriedError`) instead — the resolution is not lost quietly
|
|
183
|
+
* merely because the wire could not describe it.
|
|
184
|
+
*/
|
|
185
|
+
artifact?(result: ArtifactWireResult): void;
|
|
151
186
|
/**
|
|
152
187
|
* A piece of the answer, as it is produced.
|
|
153
188
|
*
|
|
@@ -540,12 +575,18 @@ export type DurabilityMode = 'exit' | 'async' | 'sync';
|
|
|
540
575
|
* - `'invoke'` — a request arrived for that session.
|
|
541
576
|
* - `'resume'` — that request carries a person's decision for a run which
|
|
542
577
|
* paused earlier.
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
578
|
+
* - `'artifact'` — that request redeems an artifact ref, and the session's
|
|
579
|
+
* stored identity is needed to compose the scope it resolves under. Fired
|
|
580
|
+
* only when the resolution actually reads the store (a request carrying a
|
|
581
|
+
* `userId`); a session-only resolution composes its scope from the request
|
|
582
|
+
* alone and wakes nothing.
|
|
583
|
+
*
|
|
584
|
+
* `'resume'` was absent until 7.19, and `'artifact'` until 9.23, because
|
|
585
|
+
* nothing could produce them: naming reasons nothing fires would be an
|
|
586
|
+
* interface describing a system that does not exist. Something produces each
|
|
587
|
+
* of them now.
|
|
547
588
|
*/
|
|
548
|
-
export type WakeReason = 'invoke' | 'resume';
|
|
589
|
+
export type WakeReason = 'invoke' | 'resume' | 'artifact';
|
|
549
590
|
/**
|
|
550
591
|
* The port: where a conversation lives between requests.
|
|
551
592
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hosting/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hosting/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAssBH;iFACiF;AACjF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* hosting/artifactWire — the wire grammar for redeeming claim tickets, owned
|
|
4
|
+
* once.
|
|
5
|
+
*
|
|
6
|
+
* The artifacts layer (9.21–9.22) taught tools and the model to route refs
|
|
7
|
+
* instead of hauling data; `present({ ref, as })` hands one to the screen.
|
|
8
|
+
* This module is the screen's half of that handshake: the two WIRE OPERATIONS
|
|
9
|
+
* a hosting door answers so a frontend can redeem the ticket —
|
|
10
|
+
*
|
|
11
|
+
* `{ op: 'artifact-head', ref }` → the ticket's metadata (the render
|
|
12
|
+
* decision: pick a component from `kind`
|
|
13
|
+
* and `bytes` without paying for bytes)
|
|
14
|
+
* `{ op: 'artifact-get', ref }` → metadata + the payload (render it)
|
|
15
|
+
*
|
|
16
|
+
* Read-only on purpose. The wire deliberately carries NO put/delete/list:
|
|
17
|
+
* a screen redeems tickets, it does not mint or sweep, and `list` over a wire
|
|
18
|
+
* would let a caller ENUMERATE a scope — possession of a ref is the whole
|
|
19
|
+
* entitlement this door honours, and even that only under the requesting
|
|
20
|
+
* session's identity-composed scope (`standingAgent` composes it; the store
|
|
21
|
+
* enforces it).
|
|
22
|
+
*
|
|
23
|
+
* ── Why ONE owner ────────────────────────────────────────────────────────────
|
|
24
|
+
* Two shipped dialects speak these ops (`jsonWire`, and the managed-runtime
|
|
25
|
+
* wire in `adapters/hosting/`) and any custom `HttpWire` may join them. An op
|
|
26
|
+
* grammar re-derived per dialect is how one of them ends up accepting
|
|
27
|
+
* `'artifact-head'` and another `'artifactHead'` — so the reader, the op names
|
|
28
|
+
* and the standard reply body live here and every dialect calls them (the
|
|
29
|
+
* `headerValue` precedent).
|
|
30
|
+
*
|
|
31
|
+
* ── The refusal law ──────────────────────────────────────────────────────────
|
|
32
|
+
* A body that NAMES an `op` never falls through to a model turn. A caller who
|
|
33
|
+
* typo'd `'artifact-head'` and silently got a conversation turn (with the ref
|
|
34
|
+
* as garbage input) would be the accepted-and-silently-wrong failure, so an
|
|
35
|
+
* unknown op — and a known op missing its `ref` — throws
|
|
36
|
+
* {@link InvalidWireOpError}, which `httpHost` answers as that request's 400.
|
|
37
|
+
*/
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.artifactWireBody = exports.readArtifactWireOp = exports.ARTIFACT_GET_OP = exports.ARTIFACT_HEAD_OP = void 0;
|
|
40
|
+
const errors_js_1 = require("./errors.js");
|
|
41
|
+
/** The wire spelling of `head` — metadata only, the render-by-ref decision. */
|
|
42
|
+
exports.ARTIFACT_HEAD_OP = 'artifact-head';
|
|
43
|
+
/** The wire spelling of `get` — metadata + payload. */
|
|
44
|
+
exports.ARTIFACT_GET_OP = 'artifact-get';
|
|
45
|
+
/**
|
|
46
|
+
* Read an artifact operation out of a request body, if the body names one.
|
|
47
|
+
*
|
|
48
|
+
* Returns `undefined` for a body with no `op` field — an ordinary invoke,
|
|
49
|
+
* untouched. Throws {@link InvalidWireOpError} for an `op` this grammar does
|
|
50
|
+
* not know, and for a known op whose `ref` is missing or blank: a request
|
|
51
|
+
* that NAMED an operation must never quietly become something else.
|
|
52
|
+
*
|
|
53
|
+
* Exported for custom {@link import('./httpHost.js').HttpWire} dialects, so a
|
|
54
|
+
* third dialect reads the ops exactly as the two shipped ones do.
|
|
55
|
+
*/
|
|
56
|
+
function readArtifactWireOp(body) {
|
|
57
|
+
const op = body.op;
|
|
58
|
+
if (op === undefined)
|
|
59
|
+
return undefined;
|
|
60
|
+
if (op !== exports.ARTIFACT_HEAD_OP && op !== exports.ARTIFACT_GET_OP) {
|
|
61
|
+
throw new errors_js_1.InvalidWireOpError(`the wire operation '${String(op)}' is not one this host speaks. Known operations: ` +
|
|
62
|
+
`'${exports.ARTIFACT_HEAD_OP}' (the claim ticket's metadata) and '${exports.ARTIFACT_GET_OP}' ` +
|
|
63
|
+
`(metadata + payload), each taking { ref }. A request without 'op' is an ordinary ` +
|
|
64
|
+
`invoke.`);
|
|
65
|
+
}
|
|
66
|
+
const ref = body.ref;
|
|
67
|
+
if (typeof ref !== 'string' || ref.trim().length === 0) {
|
|
68
|
+
throw new errors_js_1.InvalidWireOpError(`'${String(op)}' needs 'ref' — the art_… claim ticket to redeem. The refs a run ` +
|
|
69
|
+
`minted travel in its tool results and artifacts.minted events; a present(...) ` +
|
|
70
|
+
`result carries the ref beside its description snapshot.`);
|
|
71
|
+
}
|
|
72
|
+
return { op: op === exports.ARTIFACT_HEAD_OP ? 'head' : 'get', ref };
|
|
73
|
+
}
|
|
74
|
+
exports.readArtifactWireOp = readArtifactWireOp;
|
|
75
|
+
/**
|
|
76
|
+
* The standard reply body for a resolved artifact operation:
|
|
77
|
+
* `{ artifact: { ref, meta } }` for `head`, `{ artifact: { ref, meta, data } }`
|
|
78
|
+
* for `get`.
|
|
79
|
+
*
|
|
80
|
+
* Authored once so the two shipped dialects (and any custom one that wants
|
|
81
|
+
* interop with the lens family's resolver) answer byte-compatibly; a dialect
|
|
82
|
+
* that must add its own envelope fields spreads this and adds them beside
|
|
83
|
+
* `artifact` (the managed-runtime wire adds its own `status`).
|
|
84
|
+
*/
|
|
85
|
+
function artifactWireBody(result) {
|
|
86
|
+
return {
|
|
87
|
+
artifact: {
|
|
88
|
+
ref: result.ref,
|
|
89
|
+
meta: result.meta,
|
|
90
|
+
...(result.op === 'get' && { data: result.data }),
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
exports.artifactWireBody = artifactWireBody;
|
|
95
|
+
//# sourceMappingURL=artifactWire.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifactWire.js","sourceRoot":"","sources":["../../src/hosting/artifactWire.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;;AAGH,2CAAiD;AAEjD,+EAA+E;AAClE,QAAA,gBAAgB,GAAG,eAAe,CAAC;AAChD,uDAAuD;AAC1C,QAAA,eAAe,GAAG,cAAc,CAAC;AAgC9C;;;;;;;;;;GAUG;AACH,SAAgB,kBAAkB,CAChC,IAAuC;IAEvC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACnB,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACvC,IAAI,EAAE,KAAK,wBAAgB,IAAI,EAAE,KAAK,uBAAe,EAAE,CAAC;QACtD,MAAM,IAAI,8BAAkB,CAC1B,uBAAuB,MAAM,CAAC,EAAE,CAAC,mDAAmD;YAClF,IAAI,wBAAgB,wCAAwC,uBAAe,IAAI;YAC/E,mFAAmF;YACnF,SAAS,CACZ,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,8BAAkB,CAC1B,IAAI,MAAM,CAAC,EAAE,CAAC,mEAAmE;YAC/E,gFAAgF;YAChF,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,wBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC/D,CAAC;AAtBD,gDAsBC;AAED;;;;;;;;;GASG;AACH,SAAgB,gBAAgB,CAAC,MAA0B;IAGzD,OAAO;QACL,QAAQ,EAAE;YACR,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;SAClD;KACF,CAAC;AACJ,CAAC;AAVD,4CAUC"}
|
package/dist/hosting/errors.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* say so loudly and name the adapter it is talking about.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.requireCapability = exports.UnreadableEnvelopeError = exports.FrameTooLargeError = exports.ConversationClosedError = exports.NoPendingAskError = exports.AwaitingDecisionError = exports.PauseNotCarriedError = exports.ConcurrentRunError = exports.HostClosedError = void 0;
|
|
22
|
+
exports.requireCapability = exports.UnreadableEnvelopeError = exports.ArtifactNotCarriedError = exports.ArtifactNotFoundError = exports.NoArtifactStoreError = exports.ArtifactSessionRequiredError = exports.InvalidWireOpError = exports.FrameTooLargeError = exports.ConversationClosedError = exports.NoPendingAskError = exports.AwaitingDecisionError = exports.PauseNotCarriedError = exports.ConcurrentRunError = exports.HostClosedError = void 0;
|
|
23
23
|
const storedPreview_js_1 = require("../lib/storedPreview.js");
|
|
24
24
|
/**
|
|
25
25
|
* Thrown when a request arrives at a host that is shutting down or shut down.
|
|
@@ -237,6 +237,123 @@ class FrameTooLargeError extends Error {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
exports.FrameTooLargeError = FrameTooLargeError;
|
|
240
|
+
/**
|
|
241
|
+
* Thrown when a request body names a wire operation this host does not speak,
|
|
242
|
+
* or names one and leaves out what it needs (an artifact op without a `ref`).
|
|
243
|
+
*
|
|
244
|
+
* The law it enforces: **a body that named an `op` never falls through to a
|
|
245
|
+
* model turn.** A caller who typo'd `'artifact-head'` and silently got a
|
|
246
|
+
* conversation turn — with the ref as garbage input — would be told nothing
|
|
247
|
+
* and billed anyway, which is the accepted-and-silently-wrong failure this
|
|
248
|
+
* refusal exists to prevent. Adapters answer it as that request's 400: the
|
|
249
|
+
* request is what is wrong, and the same caller can send the right shape.
|
|
250
|
+
*/
|
|
251
|
+
class InvalidWireOpError extends Error {
|
|
252
|
+
code = 'ERR_INVALID_WIRE_OP';
|
|
253
|
+
constructor(detail) {
|
|
254
|
+
super(`[hosting] ${detail}`);
|
|
255
|
+
this.name = 'InvalidWireOpError';
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
exports.InvalidWireOpError = InvalidWireOpError;
|
|
259
|
+
/**
|
|
260
|
+
* Thrown when an artifact operation arrives with no session id.
|
|
261
|
+
*
|
|
262
|
+
* Artifact resolution is governed by the requesting session's identity —
|
|
263
|
+
* a ref is redeemed under exactly the scope the run's tools minted it in, and
|
|
264
|
+
* a request that names no session presents no scope to resolve under. (A run
|
|
265
|
+
* served without a session scopes its artifacts to its own runId, which no
|
|
266
|
+
* later request can name — so there is genuinely nothing this request could
|
|
267
|
+
* ever redeem.) There is deliberately no bare-ref mode: an id alone opens
|
|
268
|
+
* nothing, ever.
|
|
269
|
+
*/
|
|
270
|
+
class ArtifactSessionRequiredError extends Error {
|
|
271
|
+
code = 'ERR_ARTIFACT_SESSION_REQUIRED';
|
|
272
|
+
constructor(op) {
|
|
273
|
+
super(`[hosting] artifact-${op} needs the session whose run minted the ref: refs resolve ` +
|
|
274
|
+
`under the requesting session's identity-composed scope, and this request named no ` +
|
|
275
|
+
`session. Send sessionId the same way the conversation's own requests do — in the ` +
|
|
276
|
+
`body, the session header, or the session cookie. There is no bare-ref mode: a ref ` +
|
|
277
|
+
`alone opens nothing.`);
|
|
278
|
+
this.name = 'ArtifactSessionRequiredError';
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
exports.ArtifactSessionRequiredError = ArtifactSessionRequiredError;
|
|
282
|
+
/**
|
|
283
|
+
* Thrown when an artifact operation arrives and the agent serving this
|
|
284
|
+
* session has no artifact store attached.
|
|
285
|
+
*
|
|
286
|
+
* The teaching refusal of the fail-closed capability (`ctx.artifacts` with no
|
|
287
|
+
* store), spoken at the hosting door: it names the attach rather than
|
|
288
|
+
* answering "not found" — a deployment gap and a missing ref are different
|
|
289
|
+
* facts, and only one of them is the operator's to fix.
|
|
290
|
+
*/
|
|
291
|
+
class NoArtifactStoreError extends Error {
|
|
292
|
+
code = 'ERR_NO_ARTIFACT_STORE';
|
|
293
|
+
constructor(op) {
|
|
294
|
+
super(`[hosting] artifact-${op} has no artifact store behind it: the agent serving this ` +
|
|
295
|
+
`session was built without one, so no ref could ever resolve here. Pass ` +
|
|
296
|
+
`\`artifacts\` to Agent.create({ ..., artifacts }) — inMemoryArtifacts() for an ` +
|
|
297
|
+
`in-process store, fileArtifacts({ directory }) or sqliteArtifacts({ file }) for ` +
|
|
298
|
+
`one that survives a restart — and the wire operations answer from it.`);
|
|
299
|
+
this.name = 'NoArtifactStoreError';
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
exports.NoArtifactStoreError = NoArtifactStoreError;
|
|
303
|
+
/**
|
|
304
|
+
* Thrown when a ref does not resolve for the requesting session — missing,
|
|
305
|
+
* expired, or minted under a scope this session's identity does not compose.
|
|
306
|
+
*
|
|
307
|
+
* **Deliberately one shape for all three.** Distinguishing "never existed"
|
|
308
|
+
* from "another session's" would let a caller probe scopes it does not own;
|
|
309
|
+
* the store already answers a wrong scope with "no data" rather than a
|
|
310
|
+
* cross-tenant error, and this refusal keeps that ambiguity on the wire.
|
|
311
|
+
* The screen renders a stated absence in place — the `present` result's
|
|
312
|
+
* description snapshot exists exactly so an expired pane can still say what
|
|
313
|
+
* is gone.
|
|
314
|
+
*/
|
|
315
|
+
class ArtifactNotFoundError extends Error {
|
|
316
|
+
code = 'ERR_ARTIFACT_NOT_FOUND';
|
|
317
|
+
/** The ref that did not resolve. */
|
|
318
|
+
ref;
|
|
319
|
+
constructor(ref) {
|
|
320
|
+
super(`[hosting] artifact '${ref}' does not resolve for this session — missing, expired, ` +
|
|
321
|
+
`swept, or never stored under this session's scope. Render its stated absence in ` +
|
|
322
|
+
`place (a present(...) result carries a description snapshot for exactly this ` +
|
|
323
|
+
`moment); re-run to regenerate the data.`);
|
|
324
|
+
this.name = 'ArtifactNotFoundError';
|
|
325
|
+
this.ref = ref;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
exports.ArtifactNotFoundError = ArtifactNotFoundError;
|
|
329
|
+
/**
|
|
330
|
+
* Raised when an artifact RESOLVED and the reply cannot describe it — a host
|
|
331
|
+
* without {@link HostReply.artifact}, or an `HttpWire` dialect without an
|
|
332
|
+
* `artifact` body shape.
|
|
333
|
+
*
|
|
334
|
+
* The `PauseNotCarriedError` shape, for the other optional terminal: the
|
|
335
|
+
* resolution itself succeeded and nothing about the store is wrong — it is
|
|
336
|
+
* THIS REPLY that has no vocabulary for the answer. Named rather than
|
|
337
|
+
* improvised, because an adapter inventing a body shape on the spot would be
|
|
338
|
+
* a body no client was written against.
|
|
339
|
+
*/
|
|
340
|
+
class ArtifactNotCarriedError extends Error {
|
|
341
|
+
code = 'ERR_ARTIFACT_NOT_CARRIED';
|
|
342
|
+
/** The ref that resolved but could not be delivered. */
|
|
343
|
+
ref;
|
|
344
|
+
constructor(ref, hostName) {
|
|
345
|
+
super(`[hosting] artifact '${ref}' resolved, but ` +
|
|
346
|
+
(hostName !== undefined
|
|
347
|
+
? `the '${hostName}' host's wire has no artifact() body shape, `
|
|
348
|
+
: `this host does not implement reply.artifact(), `) +
|
|
349
|
+
`so the result cannot be described on this wire. Nothing is wrong with the ` +
|
|
350
|
+
`artifact — serve on an adapter that carries artifact results (nodeHost does), or ` +
|
|
351
|
+
`add the artifact body shape to the dialect.`);
|
|
352
|
+
this.name = 'ArtifactNotCarriedError';
|
|
353
|
+
this.ref = ref;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
exports.ArtifactNotCarriedError = ArtifactNotCarriedError;
|
|
240
357
|
/**
|
|
241
358
|
* An already-computed preview, so {@link UnreadableEnvelopeError.withSession}
|
|
242
359
|
* can copy a refusal without being handed the stored bytes a second time. Not
|