@tangle-network/agent-interface 2.14.0 → 2.15.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/README.md CHANGED
@@ -269,3 +269,11 @@ Repeated cumulative totals do not add spend.
269
269
  An absent mode means the aggregation semantics are unknown.
270
270
  Materialization receipts cover all three model token ceilings at their exact requested paths.
271
271
  A strict profile rejects unsupported ceilings instead of silently accepting them.
272
+
273
+
274
+ ### Native session observations
275
+
276
+ Adapters emit `native.session.observed` with `provider` and `nativeSessionId` after observing the provider conversation identity.
277
+ The execution owner binds the observation to its execution and keeps it private.
278
+ Public `session.updated` events retain their resume-key semantics and do not establish native identity.
279
+ Native identity does not establish artifact capture completeness.
package/dist/index.d.ts CHANGED
@@ -43,3 +43,4 @@ export * from "./profile-security.js";
43
43
  export * from "./sandbox-size.js";
44
44
  export { CONTRACT_MAX_ARRAY_LENGTH, CONTRACT_MAX_CONFIDENTIAL_ATTESTATION_QUOTE_LENGTH, CONTRACT_MAX_IDENTIFIER_LENGTH, CONTRACT_MAX_JSON_BYTES, CONTRACT_MAX_JSON_DEPTH, CONTRACT_MAX_JSON_NODES, CONTRACT_MAX_MAP_ENTRIES, CONTRACT_MAX_STRING_LENGTH, boundedEventContentJsonSchema, boundedEventContentRecordSchema, boundedEventContentStringSchema, isBoundedEventContentJson, } from "./contract-limits.js";
45
45
  export { AgentEnvironmentEgressPolicySchema } from "./environment-requests.js";
46
+ export * from "./native-session-event.js";
package/dist/index.js CHANGED
@@ -45,3 +45,4 @@ export {
45
45
  // does exactly that, after three bound mismatches shipped through it (agent-sdk#311, #312, #314).
46
46
  CONTRACT_MAX_ARRAY_LENGTH, CONTRACT_MAX_CONFIDENTIAL_ATTESTATION_QUOTE_LENGTH, CONTRACT_MAX_IDENTIFIER_LENGTH, CONTRACT_MAX_JSON_BYTES, CONTRACT_MAX_JSON_DEPTH, CONTRACT_MAX_JSON_NODES, CONTRACT_MAX_MAP_ENTRIES, CONTRACT_MAX_STRING_LENGTH, boundedEventContentJsonSchema, boundedEventContentRecordSchema, boundedEventContentStringSchema, isBoundedEventContentJson, } from "./contract-limits.js";
47
47
  export { AgentEnvironmentEgressPolicySchema } from "./environment-requests.js";
48
+ export * from "./native-session-event.js";
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Private adapter observation of a provider conversation or resume identity.
4
+ * The adapter must obtain this ID from its bound provider process or API.
5
+ * Caller keys, execution IDs, storage paths, and public session updates are not evidence.
6
+ * The execution owner binds this observation to its own execution and session.
7
+ * Public SSE and user-visible event streams must exclude this control event.
8
+ * An observation establishes identity only, not native artifact completeness.
9
+ */
10
+ export declare const NativeSessionObservedEventSchema: z.ZodObject<{
11
+ type: z.ZodLiteral<"native.session.observed">;
12
+ provider: z.ZodString;
13
+ nativeSessionId: z.ZodString;
14
+ }, z.core.$strict>;
15
+ export type NativeSessionObservedEvent = z.infer<typeof NativeSessionObservedEventSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Private adapter observation of a provider conversation or resume identity.
4
+ * The adapter must obtain this ID from its bound provider process or API.
5
+ * Caller keys, execution IDs, storage paths, and public session updates are not evidence.
6
+ * The execution owner binds this observation to its own execution and session.
7
+ * Public SSE and user-visible event streams must exclude this control event.
8
+ * An observation establishes identity only, not native artifact completeness.
9
+ */
10
+ export const NativeSessionObservedEventSchema = z.object({
11
+ type: z.literal("native.session.observed"),
12
+ provider: z.string().regex(/^[a-z][a-z0-9-]{0,127}$/),
13
+ nativeSessionId: z.string().min(1).max(512).regex(/^\S+$/u),
14
+ }).strict();
@@ -1,3 +1,4 @@
1
+ import { NativeSessionObservedEventSchema } from "./native-session-event.js";
1
2
  import { z } from "zod";
2
3
  import { canonicalCandidateDigest, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
3
4
  import { boundedEventContentJsonSchema, boundedEventContentRecordSchema, boundedEventContentStringSchema, boundedIdentifierSchema, boundedJsonRecordSchema, boundedStringSchema, isBoundedEventContentJson, } from "./contract-limits.js";
@@ -385,6 +386,7 @@ const CanonicalStreamEventUnionSchema = z.discriminatedUnion("type", [
385
386
  backend: stableIdSchema,
386
387
  event: boundedEventContentJsonSchema,
387
388
  }),
389
+ NativeSessionObservedEventSchema,
388
390
  z.strictObject({
389
391
  type: z.literal("session.updated"),
390
392
  sessionId: stableIdSchema,
@@ -1,3 +1,4 @@
1
+ import type { NativeSessionObservedEvent } from "./native-session-event.js";
1
2
  import type { TokenUsage } from "./execution-types.js";
2
3
  import type { InteractionRequest } from "./interaction.js";
3
4
  import type { DurablePlan } from "./plan.js";
@@ -65,7 +66,7 @@ export type ChildTaskEvent = {
65
66
  sourceEventId: string;
66
67
  raw?: Record<string, unknown>;
67
68
  };
68
- export type StreamEvent = MessagePartUpdatedEvent | {
69
+ export type StreamEvent = NativeSessionObservedEvent | MessagePartUpdatedEvent | {
69
70
  type: "tool-heartbeat";
70
71
  toolName: string;
71
72
  partId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",