@tangle-network/agent-app 0.44.17 → 0.44.19

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.
Files changed (42) hide show
  1. package/.claude/skills/eval-campaign/SKILL.md +58 -95
  2. package/.claude/skills/surface-evolution/SKILL.md +29 -23
  3. package/README.md +8 -7
  4. package/dist/assistant/index.d.ts +2 -2
  5. package/dist/assistant/index.js +3 -3
  6. package/dist/{attachment-validation-Zw8eslhN.d.ts → attachment-validation-Dvc_Livy.d.ts} +1 -1
  7. package/dist/chat-routes/index.d.ts +17 -10
  8. package/dist/chat-routes/index.js +89 -12
  9. package/dist/chat-routes/index.js.map +1 -1
  10. package/dist/chat-store/index.d.ts +2 -2
  11. package/dist/chat-store/index.js +1 -1
  12. package/dist/{chunk-JXIQSGOV.js → chunk-2ZSSOYXP.js} +2 -6
  13. package/dist/chunk-2ZSSOYXP.js.map +1 -0
  14. package/dist/{chunk-VM6VLJH6.js → chunk-BI6NKSO4.js} +2 -2
  15. package/dist/{chunk-DV2FA2PW.js → chunk-C3SRFZGL.js} +18 -9
  16. package/dist/chunk-C3SRFZGL.js.map +1 -0
  17. package/dist/{chunk-34M7AUWO.js → chunk-M3UFMQ7D.js} +1 -1
  18. package/dist/chunk-M3UFMQ7D.js.map +1 -0
  19. package/dist/{chunk-7SMPAAIT.js → chunk-PRKSYTMQ.js} +3 -3
  20. package/dist/eval-campaign/index.d.ts +6 -8
  21. package/dist/eval-campaign/index.js +9 -5
  22. package/dist/eval-campaign/index.js.map +1 -1
  23. package/dist/{parts-S1OINlRP.d.ts → parts-fyPPdDdK.d.ts} +3 -4
  24. package/dist/profile/index.d.ts +5 -6
  25. package/dist/profile/index.js +5 -3
  26. package/dist/profile/index.js.map +1 -1
  27. package/dist/sandbox/index.d.ts +3 -7
  28. package/dist/sandbox/index.js +1 -1
  29. package/dist/skills/index.d.ts +4 -3
  30. package/dist/skills/index.js +1 -1
  31. package/dist/skills-placement/index.d.ts +0 -1
  32. package/dist/skills-placement/index.js +1 -1
  33. package/dist/web-react/index.d.ts +3 -3
  34. package/dist/web-react/index.js +3 -3
  35. package/dist/work-product/index.js +1 -19
  36. package/dist/work-product/index.js.map +1 -1
  37. package/package.json +18 -17
  38. package/dist/chunk-34M7AUWO.js.map +0 -1
  39. package/dist/chunk-DV2FA2PW.js.map +0 -1
  40. package/dist/chunk-JXIQSGOV.js.map +0 -1
  41. /package/dist/{chunk-VM6VLJH6.js.map → chunk-BI6NKSO4.js.map} +0 -0
  42. /package/dist/{chunk-7SMPAAIT.js.map → chunk-PRKSYTMQ.js.map} +0 -0
@@ -1,11 +1,11 @@
1
- import { SandboxInstance, AgentProfileMcpServer, ProvisionEvent, AgentProfileFileMount, AgentProfile, StorageConfig, ScopedTokenScope, TurnDriveResult, Sandbox } from '@tangle-network/sandbox';
1
+ import { SandboxInstance, ProvisionEvent, StorageConfig, ScopedTokenScope, TurnDriveResult, Sandbox, MintScopedTokenOptions } from '@tangle-network/sandbox';
2
2
  export { StorageConfig } from '@tangle-network/sandbox';
3
+ import { AgentProfileMcpServer, AgentProfileFileMount, AgentProfile } from '@tangle-network/agent-interface';
3
4
  import { T as ToolHeaderNames } from '../auth-anc7mv2W.js';
4
5
  import { b as AppToolName, a as AppToolContext } from '../types-BCxK0wyS.js';
5
6
  import { Harness } from '../harness/index.js';
6
7
  import { a as TangleExecutionEnvironment } from '../model-CdCDfBA9.js';
7
8
  import { b as ProfileFingerprint, C as ComposeProfileBudget } from '../budget-BOucfcb_.js';
8
- import '@tangle-network/agent-interface';
9
9
 
10
10
  /** Represent success or failure of an operation with corresponding value or error information */
11
11
  type Outcome<T> = {
@@ -769,11 +769,7 @@ interface ScopedTokenResult {
769
769
  * proxy a narrowed credential). Uses the SDK's native `box.mintScopedToken`,
770
770
  * which normalizes `expiresAt` to a Date — no hand-rolled wire call.
771
771
  */
772
- declare function mintSandboxScopedToken(box: SandboxInstance, options: {
773
- scope: ScopedTokenScope;
774
- sessionId?: string;
775
- ttlMinutes?: number;
776
- }): Promise<Outcome<ScopedTokenResult>>;
772
+ declare function mintSandboxScopedToken(box: SandboxInstance, options: MintScopedTokenOptions): Promise<Outcome<ScopedTokenResult>>;
777
773
  /** Define options to manage deterministic session resumption and turn idempotency in sandboxed drive turns */
778
774
  interface DriveSandboxTurnOptions extends StreamSandboxPromptOptions {
779
775
  /** Deterministic resume key — required. Every tick for the same logical turn
@@ -59,7 +59,7 @@ import {
59
59
  verifySandboxTerminalToken,
60
60
  verifyTerminalProxyToken,
61
61
  writeProfileFilesToBox
62
- } from "../chunk-JXIQSGOV.js";
62
+ } from "../chunk-2ZSSOYXP.js";
63
63
  import "../chunk-LWSJK546.js";
64
64
  import "../chunk-CQZSAR77.js";
65
65
  import "../chunk-ICOHEZK6.js";
@@ -1,4 +1,4 @@
1
- import { AgentProfileFileMount, AgentProfileResourceRef } from '@tangle-network/sandbox';
1
+ import { AgentProfileFileMount, AgentProfileResourceRef } from '@tangle-network/agent-interface';
2
2
 
3
3
  /**
4
4
  * Unified skill + corpus mounter for agent products.
@@ -34,10 +34,11 @@ import { AgentProfileFileMount, AgentProfileResourceRef } from '@tangle-network/
34
34
  * (see `@tangle-network/agent-app/skills-placement`) and deliberately kept out
35
35
  * of this substrate-free module.
36
36
  *
37
- * Substrate-free over storage, exact over the SDK boundary: the only inbound
37
+ * Storage-independent and exact over the profile boundary: the only inbound
38
38
  * seam is the glob-result map the consumer passes in (its call site keeps the
39
39
  * literal `import.meta.glob` Vite must static-analyze); the only outbound seam
40
- * is `@tangle-network/sandbox`'s `AgentProfileFileMount[]`/`AgentProfileResourceRef[]`,
40
+ * is `@tangle-network/agent-interface`'s
41
+ * `AgentProfileFileMount[]`/`AgentProfileResourceRef[]`,
41
42
  * the exact shapes `resources.files`/`resources.skills` consume. Node builtins
42
43
  * are resolved lazily via `process.getBuiltinModule` so a static `node:*`
43
44
  * import never reaches the Vite SSR bundle.
@@ -13,7 +13,7 @@ import {
13
13
  skillEntryFromMarkdown,
14
14
  skillMountPath,
15
15
  skillRefs
16
- } from "../chunk-34M7AUWO.js";
16
+ } from "../chunk-M3UFMQ7D.js";
17
17
  export {
18
18
  assertSkillDeliveryDisjoint,
19
19
  composeShellResources,
@@ -1,7 +1,6 @@
1
1
  import { Harness } from '../harness/index.js';
2
2
  import { SkillEntry, ComposedSkills } from '../skills/index.js';
3
3
  import '@tangle-network/agent-interface';
4
- import '@tangle-network/sandbox';
5
4
 
6
5
  /**
7
6
  * Harness-native skill directory resolution — the one place agent-app binds
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  composeSkills,
3
3
  renderInlineSkills
4
- } from "../chunk-34M7AUWO.js";
4
+ } from "../chunk-M3UFMQ7D.js";
5
5
  import {
6
6
  KNOWN_HARNESSES
7
7
  } from "../chunk-CQZSAR77.js";
@@ -5,8 +5,8 @@ export { f as ChatFreeTextField, g as ComposerAnswerDelivery, h as INTERACTION_C
5
5
  import { ChatPlan } from '../plans/index.js';
6
6
  import { InteractionData } from '@tangle-network/agent-interface';
7
7
  export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle-network/agent-interface';
8
- import { M as FileMention, g as ChatMentionPart, b as ChatAttachmentPart, a as ChatAttachmentKind, Q as ChatAttachmentInput } from '../parts-S1OINlRP.js';
9
- export { f as ChatMentionKind, P as ChatTurnFilePartInput, O as ChatTurnPartInput, N as ChatTurnRequestPayload, U as DISPATCH_MAX_MEDIA_PARTS, V as DISPATCH_MAX_PARTS, W as DISPATCH_REQUEST_MAX_BYTES, X as DISPATCH_STRUCTURAL_RESERVE_BYTES, $ as ProducerErrorEvent, a0 as ProducerNoticeEvent, a1 as ProducerPassthroughEvent, a2 as ProducerPassthroughEventType, a3 as ProducerReasoningEvent, a4 as ProducerTextEvent, a5 as ProducerToolCallEvent, a6 as ProducerToolResultEvent, a7 as ProducerUsageEvent, a8 as ProducerWireEvent, u as attachmentInputToPart, v as attachmentKindForMime, w as attachmentPartsFromMessageParts, ab as base64WireLen, ac as buildMentionPromptBlock, ad as chatTurnRequestInit, ae as fileMentionsToParts, z as isChatAttachmentPart, ag as mediaTypeForMentionPath, J as mentionInputToPart, ah as mentionKindForPath, K as mentionPartsFromMessageParts } from '../parts-S1OINlRP.js';
8
+ import { M as FileMention, g as ChatMentionPart, b as ChatAttachmentPart, a as ChatAttachmentKind, Q as ChatAttachmentInput } from '../parts-fyPPdDdK.js';
9
+ export { f as ChatMentionKind, P as ChatTurnFilePartInput, O as ChatTurnPartInput, N as ChatTurnRequestPayload, U as DISPATCH_MAX_MEDIA_PARTS, V as DISPATCH_MAX_PARTS, W as DISPATCH_REQUEST_MAX_BYTES, X as DISPATCH_STRUCTURAL_RESERVE_BYTES, $ as ProducerErrorEvent, a0 as ProducerNoticeEvent, a1 as ProducerPassthroughEvent, a2 as ProducerPassthroughEventType, a3 as ProducerReasoningEvent, a4 as ProducerTextEvent, a5 as ProducerToolCallEvent, a6 as ProducerToolResultEvent, a7 as ProducerUsageEvent, a8 as ProducerWireEvent, u as attachmentInputToPart, v as attachmentKindForMime, w as attachmentPartsFromMessageParts, ab as base64WireLen, ac as buildMentionPromptBlock, ad as chatTurnRequestInit, ae as fileMentionsToParts, z as isChatAttachmentPart, ag as mediaTypeForMentionPath, J as mentionInputToPart, ah as mentionKindForPath, K as mentionPartsFromMessageParts } from '../parts-fyPPdDdK.js';
10
10
  import { E as EvidenceEntry, g as ExceptionEntry, a as WorkProductProvenance, P as ProfileBacktestSummary, Q as QualityCheck, c as WorkProductPersistedPart, h as WorkProductStatus } from '../types-DB82fktc.js';
11
11
  import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
12
12
  import { F as FlowTrace } from '../flow-types-CJxEmaRy.js';
@@ -15,7 +15,7 @@ export { p as parseReviewQueueItem } from '../queue-vRI0Qx3X.js';
15
15
  export { S as SandboxTerminalConnection, a as SandboxTerminalConnectionResponse, U as UseSandboxTerminalConnectionOptions, b as UseSandboxTerminalConnectionResult, t as tabTerminalConnectionId, u as useSandboxTerminalConnection } from '../sandbox-terminal-ChNEdHF8.js';
16
16
  import { CatalogModel } from '../catalog/index.js';
17
17
  import { Harness } from '../harness/index.js';
18
- export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-Zw8eslhN.js';
18
+ export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-Dvc_Livy.js';
19
19
  export { a as attachmentPartKey } from '../stream-normalizer-DnuqkZvw.js';
20
20
 
21
21
  /** Represent durable plan decisions as either approved or rejected */
@@ -74,7 +74,7 @@ import {
74
74
  useSmoothText,
75
75
  useThinkingSeconds,
76
76
  waterfallLayout
77
- } from "../chunk-7SMPAAIT.js";
77
+ } from "../chunk-PRKSYTMQ.js";
78
78
  import "../chunk-FBVLEGEG.js";
79
79
  import {
80
80
  EvidenceLineageTable,
@@ -97,7 +97,7 @@ import {
97
97
  } from "../chunk-HCOROIRT.js";
98
98
  import {
99
99
  ATTACHMENT_ACCEPT
100
- } from "../chunk-VM6VLJH6.js";
100
+ } from "../chunk-BI6NKSO4.js";
101
101
  import {
102
102
  DISPATCH_MAX_MEDIA_PARTS,
103
103
  DISPATCH_MAX_PARTS,
@@ -115,7 +115,7 @@ import {
115
115
  mentionInputToPart,
116
116
  mentionKindForPath,
117
117
  mentionPartsFromMessageParts
118
- } from "../chunk-DV2FA2PW.js";
118
+ } from "../chunk-C3SRFZGL.js";
119
119
  import "../chunk-ZVEEWGDK.js";
120
120
  import {
121
121
  attachmentPartKey
@@ -804,20 +804,6 @@ function assertTargetsNotCrossed(config, entries) {
804
804
  );
805
805
  }
806
806
  }
807
- function assertEvidenceAgreesWithArtifact(config, entries, artifact) {
808
- if (config.verifyArtifactAgreement === false) return;
809
- const fieldValues = indexArtifactValues(artifact?.fields, config.normalizeTarget);
810
- if (fieldValues.size === 0) return;
811
- for (let index = 0; index < entries.length; index += 1) {
812
- const entry = entries[index];
813
- const agreement = verifyArtifactAgreement(entry.target, entry.claim, fieldValues);
814
- if (agreement.status !== "contradicts") continue;
815
- throw new ToolInputError(
816
- "contradicts_artifact",
817
- `entries[${index}].claim ${JSON.stringify(entry.claim)} contradicts this work product's own artifact: ${artifactAgreementErrorDetail(agreement, entry.target)}`
818
- );
819
- }
820
- }
821
807
  async function summarizeQuoteVerification(config, evidence, ctx) {
822
808
  const readSourceText = config.readSourceText;
823
809
  if (!readSourceText) return void 0;
@@ -894,10 +880,7 @@ function summarizeArtifactAgreement(evidence, fieldValues, targetOf) {
894
880
  checkable += 1;
895
881
  if (agreement.status === "agrees") agreeing += 1;
896
882
  else {
897
- contradicting.push({
898
- id: entry.id,
899
- detail: `${entry.id} (${target} claims ${agreement.claimed}, which the artifact reports on ${agreement.belongsTo}; ${target} is ${agreement.expected})`
900
- });
883
+ contradicting.push({ id: entry.id, detail: `${entry.id}: ${artifactAgreementErrorDetail(agreement, target)}` });
901
884
  }
902
885
  }
903
886
  return { agreeing, checkable, contradicting };
@@ -986,7 +969,6 @@ function buildWorkProductTools(config) {
986
969
  assertClaimsSupported(config, entries);
987
970
  assertTargetsNotCrossed(config, entries);
988
971
  const draft = await resolveDraft(service, config, scopeKey, ctx);
989
- assertEvidenceAgreesWithArtifact(config, entries, draft.artifact);
990
972
  const record = await unwrap(() => service.upsertEvidence(draft.id, entries), "evidence_rejected");
991
973
  return {
992
974
  workProductId: record.id,