@vellumai/assistant 0.11.7-dev.202609011820.193fbf9 → 0.11.7-dev.202609011914.fd854d6

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 (55) hide show
  1. package/docs/guardian-request-flow.md +3 -3
  2. package/openapi.yaml +53 -24
  3. package/package.json +1 -1
  4. package/src/__tests__/anthropic-provider.test.ts +2 -0
  5. package/src/__tests__/channel-reply-delivery.test.ts +117 -2
  6. package/src/__tests__/config-loader-backfill.test.ts +2 -2
  7. package/src/__tests__/conversation-error.test.ts +15 -0
  8. package/src/__tests__/list-messages-page-latest.test.ts +85 -0
  9. package/src/__tests__/managed-profile-guard.test.ts +1 -1
  10. package/src/__tests__/model-intents.test.ts +2 -2
  11. package/src/__tests__/pricing.test.ts +13 -0
  12. package/src/__tests__/skill-load-tool.test.ts +6 -0
  13. package/src/__tests__/skills.test.ts +25 -0
  14. package/src/api/responses/home.ts +0 -6
  15. package/src/config/__tests__/default-profile-catalog.test.ts +1 -1
  16. package/src/config/bundled-skills/schedule/SKILL.md +23 -11
  17. package/src/config/bundled-skills/schedule/references/SCRIPT_MODE_PATTERNS.md +3 -1
  18. package/src/config/call-site-defaults.ts +1 -1
  19. package/src/config/default-profile-catalog.ts +12 -12
  20. package/src/config/default-profile-names.ts +2 -2
  21. package/src/daemon/conversation-error.ts +2 -0
  22. package/src/daemon/handlers/config-channels.ts +33 -3
  23. package/src/messaging/providers/slack/api.ts +11 -1
  24. package/src/monitoring/recovery/__tests__/stranded-delivery-events.test.ts +208 -0
  25. package/src/monitoring/recovery/db.ts +35 -0
  26. package/src/monitoring/recovery/orphaned-channel-events.ts +3 -22
  27. package/src/monitoring/recovery/run-recovery.ts +6 -2
  28. package/src/monitoring/recovery/stale-processing.ts +3 -20
  29. package/src/monitoring/recovery/stranded-delivery-events.ts +68 -0
  30. package/src/notifications/__tests__/guardian-feed-projection.test.ts +7 -16
  31. package/src/notifications/emit-signal.ts +5 -8
  32. package/src/notifications/guardian-feed-projection.ts +0 -63
  33. package/src/notifications/home-feed-side-effect.ts +0 -4
  34. package/src/persistence/delivery-status.ts +21 -2
  35. package/src/persistence/schema/conversations.ts +32 -2
  36. package/src/providers/__tests__/dispatch-connection-routing.test.ts +50 -0
  37. package/src/providers/__tests__/registry-native-web-search.test.ts +49 -2
  38. package/src/providers/anthropic/client.ts +1 -1
  39. package/src/providers/call-site-routing.ts +5 -4
  40. package/src/providers/connection-resolution.ts +29 -1
  41. package/src/providers/inference/auth.ts +6 -6
  42. package/src/providers/model-catalog.ts +54 -0
  43. package/src/providers/model-intents.ts +3 -3
  44. package/src/providers/registry.ts +10 -7
  45. package/src/providers/routing-identity.ts +2 -1
  46. package/src/providers/vellum-model-routing.ts +3 -2
  47. package/src/runtime/AGENTS.md +2 -0
  48. package/src/runtime/channel-reply-delivery.ts +90 -46
  49. package/src/runtime/channel-retry-sweep.ts +4 -0
  50. package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +1 -1
  51. package/src/runtime/routes/channel-verification-routes.ts +4 -1
  52. package/src/runtime/routes/inbound-stages/background-dispatch.test.ts +43 -4
  53. package/src/runtime/routes/inbound-stages/background-dispatch.ts +12 -1
  54. package/src/tools/skills/load.ts +1 -1
  55. package/src/util/pricing.ts +2 -1
@@ -64,9 +64,9 @@ it end to end:
64
64
  `guardian:<requestId>`, so the feed's replace-in-place merge keeps one
65
65
  item per request. Its typed `guardianRequest` field
66
66
  (`FeedItemGuardianRequestSchema` in `api/responses/home.ts`) is a read
67
- projection of the gateway row: intent, status, requester, tool, source
68
- reference, and the Slack-DM card deep links. It is never a delivery
69
- row of its own; clients derive every affordance from `status`.
67
+ projection of the gateway row: intent, status, requester, tool, and
68
+ source reference. It is never a delivery row of its own; clients
69
+ derive every affordance from `status`.
70
70
  - `withdrawGuardianRequestCards` rewrites it into a terminal receipt as
71
71
  one of the surfaces it settles, and its failure gates `complete` the
72
72
  same way a failed card edit does. The write-vs-resolve race converges
package/openapi.yaml CHANGED
@@ -4076,6 +4076,59 @@ paths:
4076
4076
  responses:
4077
4077
  "200":
4078
4078
  description: Successful response
4079
+ content:
4080
+ application/json:
4081
+ schema:
4082
+ type: object
4083
+ properties:
4084
+ success:
4085
+ type: boolean
4086
+ bound:
4087
+ type: boolean
4088
+ channel:
4089
+ type: string
4090
+ enum:
4091
+ - telegram
4092
+ - phone
4093
+ - vellum
4094
+ - whatsapp
4095
+ - slack
4096
+ - email
4097
+ - platform
4098
+ - a2a
4099
+ - discord
4100
+ - plugin
4101
+ assistantId:
4102
+ type: string
4103
+ hasPendingChallenge:
4104
+ type: boolean
4105
+ guardianExternalUserId:
4106
+ type: string
4107
+ guardianDeliveryChatId:
4108
+ type: string
4109
+ guardianUsername:
4110
+ type: string
4111
+ guardianDisplayName:
4112
+ type: string
4113
+ verificationSessionId:
4114
+ type: string
4115
+ expiresAt:
4116
+ type: number
4117
+ nextResendAt:
4118
+ anyOf:
4119
+ - type: number
4120
+ - type: "null"
4121
+ sendCount:
4122
+ type: number
4123
+ pendingBootstrap:
4124
+ type: boolean
4125
+ required:
4126
+ - success
4127
+ - bound
4128
+ - channel
4129
+ - assistantId
4130
+ - hasPendingChallenge
4131
+ additionalProperties: false
4079
4132
  /v1/channels/available:
4080
4133
  get:
4081
4134
  operationId: channels_available_get
@@ -13792,14 +13845,8 @@ paths:
13792
13845
  type: string
13793
13846
  sourceUrl:
13794
13847
  type: string
13795
- slackCardUrl:
13796
- type: string
13797
- slackCardAppUrl:
13798
- type: string
13799
13848
  decidedAction:
13800
13849
  type: string
13801
- decidedByLabel:
13802
- type: string
13803
13850
  decidedAt:
13804
13851
  type: string
13805
13852
  terminalReason:
@@ -14033,14 +14080,8 @@ paths:
14033
14080
  type: string
14034
14081
  sourceUrl:
14035
14082
  type: string
14036
- slackCardUrl:
14037
- type: string
14038
- slackCardAppUrl:
14039
- type: string
14040
14083
  decidedAction:
14041
14084
  type: string
14042
- decidedByLabel:
14043
- type: string
14044
14085
  decidedAt:
14045
14086
  type: string
14046
14087
  terminalReason:
@@ -14368,14 +14409,8 @@ paths:
14368
14409
  type: string
14369
14410
  sourceUrl:
14370
14411
  type: string
14371
- slackCardUrl:
14372
- type: string
14373
- slackCardAppUrl:
14374
- type: string
14375
14412
  decidedAction:
14376
14413
  type: string
14377
- decidedByLabel:
14378
- type: string
14379
14414
  decidedAt:
14380
14415
  type: string
14381
14416
  terminalReason:
@@ -23005,14 +23040,8 @@ paths:
23005
23040
  type: string
23006
23041
  sourceUrl:
23007
23042
  type: string
23008
- slackCardUrl:
23009
- type: string
23010
- slackCardAppUrl:
23011
- type: string
23012
23043
  decidedAction:
23013
23044
  type: string
23014
- decidedByLabel:
23015
- type: string
23016
23045
  decidedAt:
23017
23046
  type: string
23018
23047
  terminalReason:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.11.7-dev.202609011820.193fbf9",
3
+ "version": "0.11.7-dev.202609011914.fd854d6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -3602,6 +3602,8 @@ describe("AnthropicProvider — deprecated sampling params (temperature / top_p
3602
3602
  "claude-sonnet-5",
3603
3603
  "anthropic/claude-sonnet-5",
3604
3604
  "claude-fable-5",
3605
+ "claude-fable-5-1",
3606
+ "anthropic/claude-fable-5.1",
3605
3607
  ]) {
3606
3608
  test(`strips temperature, top_p, and top_k for ${model}`, async () => {
3607
3609
  const provider = new AnthropicProvider("sk-ant-test", model);
@@ -32,6 +32,13 @@ type UpdateMessageMetadataCall = {
32
32
  };
33
33
  const updateMessageMetadataCalls: UpdateMessageMetadataCall[] = [];
34
34
 
35
+ /**
36
+ * Number of leading `updateMessageMetadata` calls that throw a transient
37
+ * SQLite error before the mock starts writing. Lets a test assert that a lost
38
+ * reconciliation write is recovered rather than forfeited.
39
+ */
40
+ let metadataWriteFailuresRemaining = 0;
41
+
35
42
  /** Per-test override for the synthetic Slack `ts` returned by deliverChannelReply. */
36
43
  let nextDeliveryTs: string | null = null;
37
44
 
@@ -145,6 +152,14 @@ mock.module("../persistence/conversation-crud.js", () => ({
145
152
  messageId: string,
146
153
  updates: Record<string, unknown>,
147
154
  ) => {
155
+ if (metadataWriteFailuresRemaining > 0) {
156
+ metadataWriteFailuresRemaining -= 1;
157
+ // Shaped like bun:sqlite's error so `withSqliteRetry` classifies it as
158
+ // transient contention rather than a fatal write.
159
+ throw Object.assign(new Error("database is locked"), {
160
+ code: "SQLITE_BUSY",
161
+ });
162
+ }
148
163
  updateMessageMetadataCalls.push({ messageId, updates });
149
164
  const row = conversationMessages.find((m) => m.id === messageId);
150
165
  if (!row) {
@@ -192,6 +207,7 @@ describe("channel-reply-delivery", () => {
192
207
  conversationMessages.length = 0;
193
208
  attachmentsByMessageId.clear();
194
209
  updateMessageMetadataCalls.length = 0;
210
+ metadataWriteFailuresRemaining = 0;
195
211
  nextDeliveryTs = null;
196
212
  renderedHistoryContentQueue.length = 0;
197
213
  renderedHistoryContent = {
@@ -796,7 +812,9 @@ describe("channel-reply-delivery", () => {
796
812
  attachments,
797
813
  startFromSegment: 1,
798
814
  messageTs: "1700000000.000055",
799
- onMessageTs: (ts) => seenTs.push(ts),
815
+ onMessageTs: (ts) => {
816
+ seenTs.push(ts);
817
+ },
800
818
  });
801
819
 
802
820
  expect(deliveryCalls).toHaveLength(1);
@@ -1263,7 +1281,9 @@ describe("channel-reply-delivery", () => {
1263
1281
  "http://gateway/deliver/slack",
1264
1282
  "assistant-compose",
1265
1283
  {
1266
- onMessageTs: (ts) => callerTsSeen.push(ts),
1284
+ onMessageTs: (ts) => {
1285
+ callerTsSeen.push(ts);
1286
+ },
1267
1287
  },
1268
1288
  );
1269
1289
 
@@ -1303,5 +1323,100 @@ describe("channel-reply-delivery", () => {
1303
1323
  expect(parsed?.source).toBe("slack");
1304
1324
  expect(parsed?.eventKind).toBe("message");
1305
1325
  });
1326
+
1327
+ it("retries a reconciliation write that hits transient SQLite contention", async () => {
1328
+ // The stamp is the only durable record of the post's ts: no later sweep
1329
+ // heals a miss once the event is marked delivered, so a SQLITE_BUSY on
1330
+ // the first attempt must not lose it.
1331
+ pushPartialAssistantRow("conv-busy", "msg-busy", "C333");
1332
+ nextDeliveryTs = "1700000800.000444";
1333
+ metadataWriteFailuresRemaining = 1;
1334
+
1335
+ await deliverReplyViaCallback(
1336
+ "conv-busy",
1337
+ "C333",
1338
+ "http://gateway/deliver/slack",
1339
+ "assistant-busy",
1340
+ );
1341
+
1342
+ expect(updateMessageMetadataCalls.length).toBe(1);
1343
+ const merged = updateMessageMetadataCalls[0].updates.slackMeta as string;
1344
+ const parsed = JSON.parse(merged) as Record<string, unknown>;
1345
+ expect(parsed.channelTs).toBe("1700000800.000444");
1346
+ });
1347
+
1348
+ it("stamps from a later segment when the first segment's write is lost", async () => {
1349
+ // The row records the first ts that reaches a DURABLE write, not the
1350
+ // first ts observed. A first-invocation latch would forfeit channelTs
1351
+ // forever when that write fails, which is the reconciliation gap this
1352
+ // reproduces: the reply posts successfully and the row never gains its
1353
+ // own id, so history projects no `slackMessage` for it.
1354
+ pushPartialAssistantRow("conv-lost", "msg-lost", "C444");
1355
+ renderedHistoryContent = {
1356
+ text: "AlphaBeta",
1357
+ textSegments: ["Alpha", "Beta"],
1358
+ toolCalls: [],
1359
+ toolCallsBeforeText: false,
1360
+ contentOrder: ["text:0", "tool:0", "text:1"],
1361
+ surfaces: [],
1362
+ thinkingSegments: [],
1363
+ };
1364
+ nextDeliveryTs = "1700000900.000555";
1365
+ // Exhaust the initial attempt plus every `withSqliteRetry` retry, so the
1366
+ // first segment's reconciliation is genuinely swallowed.
1367
+ metadataWriteFailuresRemaining = 4;
1368
+
1369
+ await deliverReplyViaCallback(
1370
+ "conv-lost",
1371
+ "C444",
1372
+ "http://gateway/deliver/slack",
1373
+ "assistant-lost",
1374
+ );
1375
+
1376
+ // Both segments posted; the surviving write carries the second post's ts
1377
+ // rather than leaving the row without any id of its own.
1378
+ expect(deliveryCalls.length).toBe(2);
1379
+ expect(updateMessageMetadataCalls.length).toBe(1);
1380
+ const merged = updateMessageMetadataCalls[0].updates.slackMeta as string;
1381
+ const { readSlackMetadata } =
1382
+ await import("../messaging/providers/slack/message-metadata.js");
1383
+ expect(readSlackMetadata(merged)).not.toBeNull();
1384
+ });
1385
+
1386
+ it("commits the reconciliation write before posting the next segment", async () => {
1387
+ // `onMessageTs` is awaited, so the row is durable at each segment
1388
+ // boundary. Otherwise a crash between two posts of a split reply loses
1389
+ // the stamp for a message the reader can already see.
1390
+ pushPartialAssistantRow("conv-order", "msg-order", "C555");
1391
+ renderedHistoryContent = {
1392
+ text: "AlphaBeta",
1393
+ textSegments: ["Alpha", "Beta"],
1394
+ toolCalls: [],
1395
+ toolCallsBeforeText: false,
1396
+ contentOrder: ["text:0", "tool:0", "text:1"],
1397
+ surfaces: [],
1398
+ thinkingSegments: [],
1399
+ };
1400
+ nextDeliveryTs = "1700001000.000666";
1401
+
1402
+ await deliverReplyViaCallback(
1403
+ "conv-order",
1404
+ "C555",
1405
+ "http://gateway/deliver/slack",
1406
+ "assistant-order",
1407
+ );
1408
+
1409
+ // The row already parses through the strict reader by the time the
1410
+ // second POST goes out, which is what makes the second segment a no-op.
1411
+ const row = conversationMessages.find((m) => m.id === "msg-order");
1412
+ const envelope = JSON.parse(row?.metadata ?? "{}") as Record<
1413
+ string,
1414
+ unknown
1415
+ >;
1416
+ const { readSlackMetadata } =
1417
+ await import("../messaging/providers/slack/message-metadata.js");
1418
+ expect(readSlackMetadata(envelope.slackMeta as string)).not.toBeNull();
1419
+ expect(updateMessageMetadataCalls.length).toBe(1);
1420
+ });
1306
1421
  });
1307
1422
  });
@@ -1564,7 +1564,7 @@ describe("seedInferenceProfiles BYOK-mode default profiles", () => {
1564
1564
  );
1565
1565
  expect(effective.balanced?.label).toBe("Balanced");
1566
1566
  expect(effective["quality-optimized"]?.label).toBe("Quality");
1567
- expect(effective["cost-optimized"]?.label).toBe("Cost");
1567
+ expect(effective["cost-optimized"]?.label).toBe("Budget");
1568
1568
  expect("status" in (effective.balanced ?? {})).toBe(false);
1569
1569
  expect("status" in (effective["quality-optimized"] ?? {})).toBe(false);
1570
1570
  expect("status" in (effective["cost-optimized"] ?? {})).toBe(false);
@@ -1834,7 +1834,7 @@ describe("seedInferenceProfiles BYOK-mode default profiles", () => {
1834
1834
  const effective = getEffectiveProfiles(raw.llm.profiles);
1835
1835
  expect(effective.balanced?.label).toBe("Balanced");
1836
1836
  expect(effective["quality-optimized"]?.label).toBe("Quality");
1837
- expect(effective["cost-optimized"]?.label).toBe("Cost");
1837
+ expect(effective["cost-optimized"]?.label).toBe("Budget");
1838
1838
  });
1839
1839
 
1840
1840
  test("a managed key missing from profileOrder lands beside its siblings", () => {
@@ -1677,6 +1677,21 @@ describe("ConnectionResolutionError classification", () => {
1677
1677
  expect(result.userMessage).toContain("Restart the assistant");
1678
1678
  });
1679
1679
 
1680
+ it("classifies adapter_unavailable for a Vellum-hosted GPU model", () => {
1681
+ const err = new ConnectionResolutionError(
1682
+ "vellum",
1683
+ "adapter_unavailable",
1684
+ "no adapter",
1685
+ { model: "qwen/qwen3-8b", profileName: "steer" },
1686
+ );
1687
+ const result = classifyConversationError(err, errCtx);
1688
+ expect(result.code).toBe("PROVIDER_NOT_CONFIGURED");
1689
+ expect(result.userMessage).toContain("qwen/qwen3-8b");
1690
+ expect(result.userMessage).toContain("Vellum GPU route");
1691
+ expect(result.userMessage).toContain('profile "steer"');
1692
+ expect(result.userMessage).toContain("was not sent through another provider");
1693
+ });
1694
+
1680
1695
  it("classifies missing_credential naming the connection and fix", () => {
1681
1696
  const err = new ConnectionResolutionError(
1682
1697
  "anthropic-personal",
@@ -491,6 +491,91 @@ describe("handleListMessages page=latest", () => {
491
491
  });
492
492
  });
493
493
 
494
+ test("an assistant row still carrying the partial pre-send envelope projects no slackMessage", async () => {
495
+ // The row an outbound Slack reply is reserved with names no id of its own:
496
+ // `channelTs` is back-filled by the post-send reconciliation. Until that
497
+ // lands, the strict reader rejects the envelope and the row projects
498
+ // nothing, so a client cannot attribute it to Slack. This is the silent
499
+ // half of the reconciliation gap, pinned so a reader that starts
500
+ // tolerating the partial form has to justify it here.
501
+ const conv = createConversation();
502
+ const db = getDb();
503
+ db.insert(messages)
504
+ .values({
505
+ id: "msg-slack-partial",
506
+ conversationId: conv.id,
507
+ role: "assistant",
508
+ content: JSON.stringify([{ type: "text", text: "Posted to Slack" }]),
509
+ metadata: JSON.stringify({
510
+ userMessageChannel: "slack",
511
+ assistantMessageChannel: "slack",
512
+ slackMeta: JSON.stringify({
513
+ source: "slack",
514
+ eventKind: "message",
515
+ channelId: "C123ABCDEF",
516
+ threadTs: "1710000000.000100",
517
+ timestampTimezone: "America/New_York",
518
+ timestampTimezoneLabel: "ET",
519
+ }),
520
+ }),
521
+ createdAt: 1,
522
+ })
523
+ .run();
524
+
525
+ const body = await callList({ conversationId: conv.id, page: "latest" });
526
+
527
+ expect(body.messages[0].slackMessage).toBeUndefined();
528
+ });
529
+
530
+ test("the reconciled assistant row projects slackMessage with the post's own ts", async () => {
531
+ // The other half of the same chain: once reconciliation stamps the ts the
532
+ // transport returned, the identical row projects a full envelope. Built by
533
+ // running the production reconciliation merge over the partial form rather
534
+ // than hand-writing the result, so the two stay in step.
535
+ const conv = createConversation();
536
+ const partial = {
537
+ source: "slack",
538
+ eventKind: "message" as const,
539
+ channelId: "C123ABCDEF",
540
+ threadTs: "1710000000.000100",
541
+ timestampTimezone: "America/New_York",
542
+ timestampTimezoneLabel: "ET",
543
+ };
544
+ const reconciled = JSON.stringify({
545
+ ...partial,
546
+ channelTs: "1710000000.000200",
547
+ source: "slack",
548
+ });
549
+
550
+ const db = getDb();
551
+ db.insert(messages)
552
+ .values({
553
+ id: "msg-slack-reconciled",
554
+ conversationId: conv.id,
555
+ role: "assistant",
556
+ content: JSON.stringify([{ type: "text", text: "Posted to Slack" }]),
557
+ metadata: JSON.stringify({
558
+ userMessageChannel: "slack",
559
+ assistantMessageChannel: "slack",
560
+ slackMeta: reconciled,
561
+ }),
562
+ createdAt: 1,
563
+ })
564
+ .run();
565
+
566
+ const body = await callList({ conversationId: conv.id, page: "latest" });
567
+
568
+ const slackMessage = body.messages[0].slackMessage;
569
+ expect(slackMessage).toBeDefined();
570
+ expect(slackMessage?.channelId).toBe("C123ABCDEF");
571
+ expect(slackMessage?.channelTs).toBe("1710000000.000200");
572
+ expect(slackMessage?.threadTs).toBe("1710000000.000100");
573
+ expect(slackMessage?.eventKind).toBe("message");
574
+ // The deep link is what the drawer's "open the source" action needs, and
575
+ // it is derivable only from the reconciled ts.
576
+ expect(slackMessage?.messageLink).toBeDefined();
577
+ });
578
+
494
579
  test("top-level Slack messages with matching threadTs use plain permalinks", async () => {
495
580
  const conv = createConversation();
496
581
  const db = getDb();
@@ -264,7 +264,7 @@ describe("PUT /v1/config/llm/profiles/:name — managed profile guard", () => {
264
264
  });
265
265
 
266
266
  test("PUT on the code-owned latency profile is rejected, status re-enable included", async () => {
267
- // Speed fronts live voice, so it takes no writes at all: the re-enable
267
+ // Fast fronts live voice, so it takes no writes at all: the re-enable
268
268
  // escape hatch the other managed profiles keep would persist a stub that
269
269
  // never governs what the name resolves to.
270
270
  seedRawConfig({ llm: { profiles: {} } });
@@ -20,7 +20,7 @@ describe("model intents", () => {
20
20
  "claude-haiku-4-5-20251001",
21
21
  );
22
22
  expect(resolveModelIntent("anthropic", "quality-optimized")).toBe(
23
- "claude-fable-5",
23
+ "claude-fable-5-1",
24
24
  );
25
25
  expect(resolveModelIntent("anthropic", "vision-optimized")).toBe(
26
26
  "claude-opus-4-6",
@@ -47,7 +47,7 @@ describe("model intents", () => {
47
47
  "anthropic/claude-haiku-4.5",
48
48
  );
49
49
  expect(resolveModelIntent("vercel-ai-gateway", "quality-optimized")).toBe(
50
- "anthropic/claude-fable-5",
50
+ "anthropic/claude-fable-5.1",
51
51
  );
52
52
  expect(resolveModelIntent("vercel-ai-gateway", "vision-optimized")).toBe(
53
53
  "anthropic/claude-opus-4.6",
@@ -450,6 +450,19 @@ describe("resolvePricingForUsage", () => {
450
450
  expect(result.estimatedCostUsd).toBeCloseTo(57.4, 10);
451
451
  });
452
452
 
453
+ test("bills Fable 5.1 cache reads at the catalog rate", () => {
454
+ const result = resolvePricingForUsage("anthropic", "claude-fable-5-1", {
455
+ directInputTokens: 0,
456
+ outputTokens: 0,
457
+ cacheCreationInputTokens: 0,
458
+ cacheReadInputTokens: 1_000_000,
459
+ anthropicCacheCreation: null,
460
+ });
461
+
462
+ expect(result.pricingStatus).toBe("priced");
463
+ expect(result.estimatedCostUsd).toBeCloseTo(0.25, 10);
464
+ });
465
+
453
466
  test("returns unpriced with null cost for unknown provider", () => {
454
467
  const usage: PricingUsage = {
455
468
  directInputTokens: 10,
@@ -127,6 +127,12 @@ describe("skill_load tool", () => {
127
127
  );
128
128
  });
129
129
 
130
+ test("routes recurring monitoring and reminders to the schedule skill", () => {
131
+ const description = skillLoadTool.description;
132
+ expect(description).toContain('skill: "schedule"');
133
+ expect(description.toLowerCase()).toContain("recurring monitoring");
134
+ });
135
+
130
136
  test("loads a skill by exact id", async () => {
131
137
  writeSkill(
132
138
  "release-checklist",
@@ -869,6 +869,31 @@ describe("always-candidate frontmatter parsing", () => {
869
869
  expect(card).toContain("Avoid when:");
870
870
  });
871
871
 
872
+ test("the bundled schedule skill's card fits the default budget", async () => {
873
+ // Recurring-monitoring turns only reach this skill if the card still
874
+ // carries that vocabulary after the default-budget truncation. An overrun
875
+ // drops trailing hints and the whole avoid-when list.
876
+ const { DEFAULT_CARD_CHARS, buildSkillContent } =
877
+ await import("../plugins/defaults/memory/substrate/skill-content.js");
878
+ const schedule = loadSkillCatalog().find((skill) => skill.id === "schedule");
879
+ expect(schedule).toBeDefined();
880
+
881
+ const card = buildSkillContent(schedule!);
882
+ expect(card.length).toBeLessThan(DEFAULT_CARD_CHARS);
883
+ expect(card).toContain("Avoid when:");
884
+ });
885
+
886
+ test("the bundled schedule card carries its monitoring vocabulary", async () => {
887
+ const { buildSkillContent } =
888
+ await import("../plugins/defaults/memory/substrate/skill-content.js");
889
+ const schedule = loadSkillCatalog().find((skill) => skill.id === "schedule");
890
+ const card = buildSkillContent(schedule!).toLowerCase();
891
+
892
+ for (const term of ["monitor", "page", "dashboard", "status", "alert"]) {
893
+ expect(card).toContain(term);
894
+ }
895
+ });
896
+
872
897
  test("the bundled acp card carries its setup and sign-in vocabulary", async () => {
873
898
  // A "configure Claude Code" or "let's do the auth" turn only reaches this
874
899
  // skill if the card actually says it covers setup and authentication;
@@ -164,14 +164,8 @@ export const FeedItemGuardianRequestSchema = z.object({
164
164
  sourceContextLabel: z.string().optional(),
165
165
  /** Permalink to the originating channel message, when derivable. */
166
166
  sourceUrl: z.string().optional(),
167
- /** Web URL of the Slack guardian-DM approval card ("Open in Slack"). */
168
- slackCardUrl: z.string().optional(),
169
- /** slack:// deep link for the same card, preferred on devices with the app. */
170
- slackCardAppUrl: z.string().optional(),
171
167
  /** Action that resolved the request, for terminal statuses. */
172
168
  decidedAction: z.string().optional(),
173
- /** Display label of the decider, when the decision came from a person. */
174
- decidedByLabel: z.string().optional(),
175
169
  /** ISO-8601 time the request reached its terminal status. */
176
170
  decidedAt: z.string().optional(),
177
171
  /**
@@ -440,7 +440,7 @@ describe("resolveDefaultProfileForProvider", () => {
440
440
  expect(entry?.provider_connection).toBeUndefined();
441
441
  expect(entry?.source).toBe("managed");
442
442
  }
443
- // Cost and Speed both opt fully out of reasoning.
443
+ // Budget and Fast both opt fully out of reasoning.
444
444
  expect(effective["cost-optimized"]?.effort).toBe("none");
445
445
  expect(effective["latency-optimized"]?.effort).toBe("none");
446
446
  expect(effective.balanced?.thinking?.enabled).toBe(true);
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: schedule
3
- description: Recurring and one-shot scheduling - cron, RRULE, or single fire-at time
3
+ description: Reminders, automations, and recurring page, dashboard, or status monitoring (cron, RRULE, or fire-at)
4
4
  compatibility: "Designed for Vellum personal assistants"
5
5
  metadata:
6
6
  emoji: "📅"
@@ -8,17 +8,28 @@ metadata:
8
8
  display-name: "Schedule"
9
9
  category: "productivity"
10
10
  activation-hints:
11
- - "User wants to set a reminder for a future time (e.g. 'remind me at 9am tomorrow', 'remind me to take meds at 8pm')"
12
- - "User wants to schedule a recurring task or automation (e.g. 'every weekday at 9am', 'every Monday at noon')"
13
- - "User wants to schedule a one-time future action the assistant should run autonomously (e.g. 'at 5pm check my email and summarize it')"
14
- - "User wants to list, update, cancel, or inspect existing scheduled tasks or reminders"
11
+ - "User wants a reminder"
12
+ - "User wants a recurring task or nightly check"
13
+ - "User wants to monitor a page, dashboard, or status and get alerts"
14
+ - "User wants a one-time future action"
15
+ - "User wants to manage existing schedules"
15
16
  avoid-when:
16
- - "User wants to add something to their task list or queue — use task-list tools instead"
17
- - "User wants to act immediately or run a quick command that completes within the conversation — schedule is only for deferred or recurring execution"
17
+ - "User wants a task-list item"
18
+ - "User wants a one-off that finishes now. Recurring-job setup still uses this skill"
18
19
  ---
19
20
 
20
21
  Manage scheduled automations. Schedules can be **recurring** (cron or RRULE expression) or **one-shot** (a single `fire_at` timestamp). Schedules support four modes: **execute** (run a message through the assistant), **notify** (send a notification to the user), **script** (run a shell command directly without LLM involvement), and **workflow** (run a saved multi-agent workflow by name).
21
22
 
23
+ ## Recurring Monitoring
24
+
25
+ When the user wants something checked on a cadence (a status page, dashboard, site, or similar) and to be told if it is wrong, late, or missing: create a schedule. Do not author a standalone script they have to download, run, or maintain.
26
+
27
+ - Recurrence, cutoff times, escalation, and notifications are schedule and notification primitives. Do not reimplement them in a workspace file the user has to run.
28
+ - Prefer **execute** mode: the scheduled message browses or fetches the source, applies the user's rules, and notifies on exceptions. Use **script** mode only for a cheap deterministic check against a live source the assistant can already reach (curl an API, read a file in the workspace). A script-mode job is still a schedule, not a file you hand the user.
29
+ - Looking at a page, pasting HTML, or gathering a roster is setup for the schedule, not a reason to skip creating one.
30
+ - If browsing cannot reach the page, still create the schedule. Offer the desktop app (https://www.vellum.ai/download) or the Chrome extension (https://chromewebstore.google.com/detail/vellum-assistant-browser/hphbdmpffeigpcdjkckleobjmhhokpne) so a logged-in browser session can run it. Do not replace the schedule with a parser against a pasted export, and do not assign comparison-run homework before anything is scheduled.
31
+ - Watchers cover Gmail, Google Calendar, GitHub, Linear, and Outlook event polling. An arbitrary web page or status dashboard is this skill, not the watcher skill.
32
+
22
33
  ## Schedule Syntax
23
34
 
24
35
  ### Cron
@@ -213,14 +224,15 @@ When `schedule_create` returns, it includes an integration status summary. Cross
213
224
 
214
225
  - If the task involves **email** (reading, sending, OTP verification): an email integration must be connected (check the "email" category)
215
226
  - If the task involves **making calls**: Twilio must be connected
216
- - If the task involves **web browsing or form-filling**: browser automation must be available (check client type)
227
+ - If the task involves **web browsing or form-filling**: browser automation must be available (check client type). A timeout, auth wall, or missing logged-in browser is a setup gap, not a reason to skip the schedule or to write a standalone script.
217
228
  - If the task involves a **multi-step workflow** (e.g., book appointment → read confirmation email), trace the full dependency chain
218
229
 
219
230
  If any required capability is missing:
220
231
 
221
- 1. **Do NOT tell the user the schedule is ready** - instead, explain what's missing and why the schedule won't work yet
222
- 2. Offer to help set up the missing integration first
223
- 3. The schedule is still created (so timing is preserved), but make it clear it won't execute successfully until dependencies are resolved
232
+ 1. **Still create the schedule** so timing is preserved. Do not tell the user it is ready to run.
233
+ 2. Explain what is missing and why the next fire will fail until that is fixed.
234
+ 3. Offer to set up the missing integration first. For a page the assistant cannot reach, offer the desktop app (https://www.vellum.ai/download) or the Chrome extension (https://chromewebstore.google.com/detail/vellum-assistant-browser/hphbdmpffeigpcdjkckleobjmhhokpne) before asking for a screenshot or pasted export.
235
+ 4. Do not replace the schedule with a workspace script the user has to run themselves.
224
236
 
225
237
  ## Delivering Results
226
238
 
@@ -56,4 +56,6 @@ fi
56
56
 
57
57
  ## Tips
58
58
 
59
- Both patterns keep scheduled runs fast and cheap — the script exits immediately when nothing interesting happens, and only reaches for the assistant or notification system when there's something to act on. Use `quiet: true` on the schedule to suppress the per-run completion noise.
59
+ Both patterns keep scheduled runs fast and cheap. The script exits immediately when nothing interesting happens, and only reaches for the assistant or notification system when there's something to act on. Use `quiet: true` on the schedule to suppress the per-run completion noise.
60
+
61
+ A script-mode schedule is still a schedule the user can see, pause, and edit. Do not hand them a standalone file to run themselves.
@@ -133,7 +133,7 @@ export const CALL_SITE_DEFAULTS: Record<LLMCallSite, CallSiteDefaultConfig> = {
133
133
  // default-profile-catalog.ts): managed installs get the pinned latency model,
134
134
  // BYOK installs resolve their own provider's latency model through the intent
135
135
  // table rather than a model id they may hold no credential for. The profile
136
- // is user-facing ("Speed"), so a user edit to it moves this call site too.
136
+ // is user-facing ("Fast"), so a user edit to it moves this call site too.
137
137
  voiceProgressNarration: {
138
138
  profile: "latency-optimized",
139
139
  effort: "low",