hotsheet 0.19.0-rc.1 → 0.20.0-beta.3

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/channel.js CHANGED
@@ -10283,6 +10283,19 @@ import { z as z3 } from "zod";
10283
10283
 
10284
10284
  // src/routes/validation.ts
10285
10285
  import { z as z2 } from "zod";
10286
+
10287
+ // src/announcer/models.ts
10288
+ var APPLE_FOUNDATION_MODEL_ID = "apple-foundation";
10289
+ var LOCAL_MODEL_ID = "local";
10290
+ var ANNOUNCER_PRICING = {
10291
+ [APPLE_FOUNDATION_MODEL_ID]: { inputPerMTok: 0, outputPerMTok: 0 },
10292
+ [LOCAL_MODEL_ID]: { inputPerMTok: 0, outputPerMTok: 0 },
10293
+ "claude-haiku-4-5": { inputPerMTok: 1, outputPerMTok: 5 },
10294
+ "claude-sonnet-4-6": { inputPerMTok: 3, outputPerMTok: 15 },
10295
+ "claude-opus-4-8": { inputPerMTok: 5, outputPerMTok: 25 }
10296
+ };
10297
+
10298
+ // src/routes/validation.ts
10286
10299
  var TicketPrioritySchema = z2.enum(["highest", "high", "default", "low", "lowest"]);
10287
10300
  var TicketStatusSchema = z2.enum(["not_started", "started", "completed", "verified", "backlog", "archive", "deleted"]);
10288
10301
  var SortBySchema = z2.enum(["created", "modified", "priority", "category", "status"]);
@@ -10422,6 +10435,16 @@ var DashboardConfigSchema = z2.object({
10422
10435
  // made after HS-8406 landed could persist across relaunches.
10423
10436
  activeVisibilityGroupingIdByScope: z2.record(z2.string(), z2.string()).optional()
10424
10437
  }).strict();
10438
+ var KeyTypeSchema = z2.enum(["anthropic_api_key"]);
10439
+ var SecretKeyMetaSchema = z2.object({
10440
+ id: z2.string(),
10441
+ type: KeyTypeSchema,
10442
+ name: z2.string(),
10443
+ // HS-8760 — provenance shown in the API Keys row ("Created/Updated …").
10444
+ // Optional for back-compat with keys created before HS-8760.
10445
+ created_at: z2.string().optional(),
10446
+ updated_at: z2.string().optional()
10447
+ });
10425
10448
  var GlobalConfigSchema = z2.object({
10426
10449
  channelEnabled: z2.boolean().optional(),
10427
10450
  shareTotalSeconds: z2.number().optional(),
@@ -10434,7 +10457,29 @@ var GlobalConfigSchema = z2.object({
10434
10457
  terminalWebglOptOut: z2.boolean().optional(),
10435
10458
  // HS-8497 — billing model for telemetry cost display. See
10436
10459
  // `global-config.ts` for the contract.
10437
- telemetryCostMode: z2.enum(["api", "subscription"]).optional()
10460
+ telemetryCostMode: z2.enum(["api", "subscription"]).optional(),
10461
+ // HS-8751 — global API-key registry (metadata only; values in the keychain).
10462
+ keys: z2.array(SecretKeyMetaSchema).optional(),
10463
+ // HS-8754 — Announcer playback speed multiplier (1 = normal). Global because
10464
+ // it's a listening preference, not project-specific. Clamped 0.5×–2×.
10465
+ announcerSpeechRate: z2.number().min(0.5).max(2).optional(),
10466
+ // HS-8764 — Announcer summarization model. Global; defaults to the cheapest
10467
+ // (Haiku) when unset. See `src/announcer/models.ts`. HS-8853 — the Anthropic
10468
+ // list is now discovered dynamically from the user's key, so this accepts any
10469
+ // `claude-*` id (not just the static set) plus the two on-device pseudo-ids.
10470
+ announcerModel: z2.string().refine(
10471
+ (v) => v === APPLE_FOUNDATION_MODEL_ID || v === LOCAL_MODEL_ID || v.startsWith("claude-"),
10472
+ { message: "must be an on-device provider id or a claude-* model id" }
10473
+ ).optional(),
10474
+ // HS-8792 — local-provider config (used only when `announcerModel === 'local'`).
10475
+ // `Endpoint` is the OpenAI-compatible base URL (default `http://localhost:11434/v1`);
10476
+ // `Model` is the concrete local model name (e.g. `llama3.1`). Both global.
10477
+ announcerLocalEndpoint: z2.string().optional(),
10478
+ announcerLocalModel: z2.string().optional(),
10479
+ // HS-8781 — verbally announce permission checks (TTS only, no API cost).
10480
+ // Global; default ON, so `undefined`/unset is treated as enabled by the
10481
+ // client (`announcerSpeakPermissions !== false`).
10482
+ announcerSpeakPermissions: z2.boolean().optional()
10438
10483
  }).strict();
10439
10484
  var PluginActionSchema = z2.object({
10440
10485
  actionId: z2.string(),
@@ -10577,6 +10622,15 @@ var QueryTicketsInputSchema = z3.object({
10577
10622
  required_tag: z3.string().optional().describe("When set, only tickets carrying this tag are included"),
10578
10623
  include_archived: z3.boolean().optional()
10579
10624
  });
10625
+ var AnnounceInputSchema = z3.object({
10626
+ title: z3.string().min(1).describe('A few words naming the moment (e.g. "Fixed the data-loss bug").'),
10627
+ highlight: z3.string().min(1).describe("One or two short sentences of natural spoken English to read aloud \u2014 what happened and why it matters."),
10628
+ diff: z3.object({
10629
+ oldStr: z3.string().describe("The code BEFORE the change (the focused snippet you changed, not the whole file)."),
10630
+ newStr: z3.string().describe("The code AFTER the change."),
10631
+ filePath: z3.string().optional().describe("Optional file path shown as the diff header.")
10632
+ }).optional().describe("Optional code diff to display with this highlight \u2014 supply the before/after of the focused change you want to show off.")
10633
+ });
10580
10634
  async function dispatchUpdateTicket(args2, settings, fetchFn) {
10581
10635
  const parsed = UpdateTicketInputSchema.safeParse(args2);
10582
10636
  if (!parsed.success) {
@@ -10707,6 +10761,13 @@ async function dispatchDeleteNote(args2, settings, fetchFn) {
10707
10761
  const { ticket_id, note_id } = parsed.data;
10708
10762
  return await proxyRequest(settings, `/api/tickets/${String(ticket_id)}/notes/${encodeURIComponent(note_id)}`, { method: "DELETE" }, fetchFn);
10709
10763
  }
10764
+ async function dispatchAnnounce(args2, settings, fetchFn) {
10765
+ const parsed = AnnounceInputSchema.safeParse(args2);
10766
+ if (!parsed.success) {
10767
+ return errorResult(`hotsheet_announce \u2014 validation failed: ${parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ")}`);
10768
+ }
10769
+ return await proxyRequest(settings, "/api/announcer/announce", { method: "POST", body: parsed.data }, fetchFn);
10770
+ }
10710
10771
  async function dispatchQueryTickets(args2, settings, fetchFn) {
10711
10772
  const parsed = QueryTicketsInputSchema.safeParse(args2);
10712
10773
  if (!parsed.success) {
@@ -10799,6 +10860,13 @@ var TOOLS = [
10799
10860
  description: 'Run a custom-view-style query: combine field/operator/value conditions via AND (logic="all") or OR (logic="any"), with optional sort_by / sort_dir / required_tag / include_archived. Returns the matching tickets. For agents that need to dig deeper than the worklist provides.',
10800
10861
  inputSchema: QueryTicketsInputSchema,
10801
10862
  call: dispatchQueryTickets
10863
+ },
10864
+ // HS-8771 — hybrid Announcer generation (§80).
10865
+ {
10866
+ name: "hotsheet_announce",
10867
+ description: `Push a curated Announcer highlight for a genuinely notable moment ("fixed a data-loss bug", "shipped the export"). It pre-empts the derived narration queue with a low-latency, high-intent entry (no AI summarization). Use sparingly, only for moments worth interrupting for. No-op if the project hasn't enabled the Announcer.`,
10868
+ inputSchema: AnnounceInputSchema,
10869
+ call: dispatchAnnounce
10802
10870
  }
10803
10871
  ];
10804
10872
  function listTools() {
@@ -10964,6 +11032,16 @@ var TicketSchema = z6.object({
10964
11032
  last_read_at: z6.string().nullable()
10965
11033
  });
10966
11034
  var TagsArraySchema = z6.array(z6.string());
11035
+ var EmphasisArraySchema = z6.array(z6.string());
11036
+ var DiffVisualSchema = z6.object({
11037
+ type: z6.literal("diff"),
11038
+ oldStr: z6.string(),
11039
+ newStr: z6.string(),
11040
+ filePath: z6.string().nullable().default(null),
11041
+ replaceAll: z6.boolean().default(false)
11042
+ });
11043
+ var VisualSchema = z6.discriminatedUnion("type", [DiffVisualSchema]);
11044
+ var VisualsArraySchema = z6.array(VisualSchema);
10967
11045
  var AutoContextEntrySchema = z6.object({
10968
11046
  type: z6.enum(["category", "tag"]),
10969
11047
  key: z6.string(),
@@ -11039,6 +11117,20 @@ var PermissionResultBodySchema = z6.object({
11039
11117
  var GithubCommentsArraySchema = z6.array(z6.object({
11040
11118
  body_html: z6.string().optional()
11041
11119
  }).loose());
11120
+ var CustomViewConditionSchema = z6.object({
11121
+ field: z6.string(),
11122
+ operator: z6.string(),
11123
+ value: z6.string()
11124
+ }).loose();
11125
+ var CustomViewSchema = z6.object({
11126
+ id: z6.string(),
11127
+ name: z6.string(),
11128
+ tag: z6.string().optional(),
11129
+ includeArchived: z6.boolean().optional(),
11130
+ logic: z6.enum(["all", "any"]).default("all"),
11131
+ conditions: z6.array(CustomViewConditionSchema).default([])
11132
+ }).loose();
11133
+ var CustomViewArraySchema = z6.array(CustomViewSchema);
11042
11134
 
11043
11135
  // src/channel-config.ts
11044
11136
  var McpConfigSchema = z7.object({
@@ -11279,7 +11371,7 @@ function installStdioDisconnectHandler(opts) {
11279
11371
  }
11280
11372
 
11281
11373
  // src/channel.ts
11282
- var CHANNEL_VERSION = 9;
11374
+ var CHANNEL_VERSION = 11;
11283
11375
  var dataDir = ".hotsheet";
11284
11376
  var args = process.argv.slice(2);
11285
11377
  for (let i = 0; i < args.length; i++) {