@aitne/shared 0.1.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.
Files changed (114) hide show
  1. package/LICENSE +21 -0
  2. package/dist/advisor-models.d.ts +34 -0
  3. package/dist/advisor-models.d.ts.map +1 -0
  4. package/dist/advisor-models.js +39 -0
  5. package/dist/advisor-models.js.map +1 -0
  6. package/dist/agent-identity.d.ts +11 -0
  7. package/dist/agent-identity.d.ts.map +1 -0
  8. package/dist/agent-identity.js +29 -0
  9. package/dist/agent-identity.js.map +1 -0
  10. package/dist/alerts.d.ts +44 -0
  11. package/dist/alerts.d.ts.map +1 -0
  12. package/dist/alerts.js +12 -0
  13. package/dist/alerts.js.map +1 -0
  14. package/dist/backend-api-key-config.d.ts +337 -0
  15. package/dist/backend-api-key-config.d.ts.map +1 -0
  16. package/dist/backend-api-key-config.js +682 -0
  17. package/dist/backend-api-key-config.js.map +1 -0
  18. package/dist/backend.d.ts +93 -0
  19. package/dist/backend.d.ts.map +1 -0
  20. package/dist/backend.js +22 -0
  21. package/dist/backend.js.map +1 -0
  22. package/dist/branding.d.ts +96 -0
  23. package/dist/branding.d.ts.map +1 -0
  24. package/dist/branding.js +102 -0
  25. package/dist/branding.js.map +1 -0
  26. package/dist/chat-session-scope.d.ts +14 -0
  27. package/dist/chat-session-scope.d.ts.map +1 -0
  28. package/dist/chat-session-scope.js +18 -0
  29. package/dist/chat-session-scope.js.map +1 -0
  30. package/dist/date-utils.d.ts +80 -0
  31. package/dist/date-utils.d.ts.map +1 -0
  32. package/dist/date-utils.js +187 -0
  33. package/dist/date-utils.js.map +1 -0
  34. package/dist/docs-frontmatter.d.ts +51 -0
  35. package/dist/docs-frontmatter.d.ts.map +1 -0
  36. package/dist/docs-frontmatter.js +184 -0
  37. package/dist/docs-frontmatter.js.map +1 -0
  38. package/dist/docs-schema.d.ts +79 -0
  39. package/dist/docs-schema.d.ts.map +1 -0
  40. package/dist/docs-schema.js +135 -0
  41. package/dist/docs-schema.js.map +1 -0
  42. package/dist/editable-config-keys.d.ts +14 -0
  43. package/dist/editable-config-keys.d.ts.map +1 -0
  44. package/dist/editable-config-keys.js +157 -0
  45. package/dist/editable-config-keys.js.map +1 -0
  46. package/dist/exec-with-stdin.d.ts +14 -0
  47. package/dist/exec-with-stdin.d.ts.map +1 -0
  48. package/dist/exec-with-stdin.js +35 -0
  49. package/dist/exec-with-stdin.js.map +1 -0
  50. package/dist/index.d.ts +37 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +49 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/integrations-snapshot.d.ts +183 -0
  55. package/dist/integrations-snapshot.d.ts.map +1 -0
  56. package/dist/integrations-snapshot.js +757 -0
  57. package/dist/integrations-snapshot.js.map +1 -0
  58. package/dist/integrations.d.ts +675 -0
  59. package/dist/integrations.d.ts.map +1 -0
  60. package/dist/integrations.js +1656 -0
  61. package/dist/integrations.js.map +1 -0
  62. package/dist/keychain-helper-client.d.ts +31 -0
  63. package/dist/keychain-helper-client.d.ts.map +1 -0
  64. package/dist/keychain-helper-client.js +105 -0
  65. package/dist/keychain-helper-client.js.map +1 -0
  66. package/dist/log-entry.d.ts +14 -0
  67. package/dist/log-entry.d.ts.map +1 -0
  68. package/dist/log-entry.js +2 -0
  69. package/dist/log-entry.js.map +1 -0
  70. package/dist/management-domains.d.ts +369 -0
  71. package/dist/management-domains.d.ts.map +1 -0
  72. package/dist/management-domains.js +499 -0
  73. package/dist/management-domains.js.map +1 -0
  74. package/dist/process-key.d.ts +67 -0
  75. package/dist/process-key.d.ts.map +1 -0
  76. package/dist/process-key.js +366 -0
  77. package/dist/process-key.js.map +1 -0
  78. package/dist/schemas.d.ts +267 -0
  79. package/dist/schemas.d.ts.map +1 -0
  80. package/dist/schemas.js +271 -0
  81. package/dist/schemas.js.map +1 -0
  82. package/dist/secret-client-factory.d.ts +16 -0
  83. package/dist/secret-client-factory.d.ts.map +1 -0
  84. package/dist/secret-client-factory.js +111 -0
  85. package/dist/secret-client-factory.js.map +1 -0
  86. package/dist/secret-client-file.d.ts +51 -0
  87. package/dist/secret-client-file.d.ts.map +1 -0
  88. package/dist/secret-client-file.js +160 -0
  89. package/dist/secret-client-file.js.map +1 -0
  90. package/dist/secret-client-linux.d.ts +26 -0
  91. package/dist/secret-client-linux.d.ts.map +1 -0
  92. package/dist/secret-client-linux.js +63 -0
  93. package/dist/secret-client-linux.js.map +1 -0
  94. package/dist/secret-client-windows.d.ts +37 -0
  95. package/dist/secret-client-windows.d.ts.map +1 -0
  96. package/dist/secret-client-windows.js +82 -0
  97. package/dist/secret-client-windows.js.map +1 -0
  98. package/dist/secret-redaction.d.ts +3 -0
  99. package/dist/secret-redaction.d.ts.map +1 -0
  100. package/dist/secret-redaction.js +31 -0
  101. package/dist/secret-redaction.js.map +1 -0
  102. package/dist/skill-curation/decision-language.d.ts +6 -0
  103. package/dist/skill-curation/decision-language.d.ts.map +1 -0
  104. package/dist/skill-curation/decision-language.js +38 -0
  105. package/dist/skill-curation/decision-language.js.map +1 -0
  106. package/dist/skill-curation/schemas.d.ts +461 -0
  107. package/dist/skill-curation/schemas.d.ts.map +1 -0
  108. package/dist/skill-curation/schemas.js +211 -0
  109. package/dist/skill-curation/schemas.js.map +1 -0
  110. package/dist/types.d.ts +204 -0
  111. package/dist/types.d.ts.map +1 -0
  112. package/dist/types.js +54 -0
  113. package/dist/types.js.map +1 -0
  114. package/package.json +50 -0
@@ -0,0 +1,366 @@
1
+ import { isMessageEvent } from "./types.js";
2
+ export const CONFIGURABLE_PROCESS_KEYS = [
3
+ "routine.morning_routine",
4
+ "routine.evening_review",
5
+ "routine.weekly_review",
6
+ "routine.monthly_review",
7
+ "routine.hourly_check",
8
+ "message.dm",
9
+ "message.mention",
10
+ "dashboard.chat",
11
+ "dashboard.docs_qa",
12
+ "agent.task",
13
+ // SCHEDULED-DM-IMPLEMENTATION-PLAN §5.3 — DM-tone scheduled sessions
14
+ // (morning briefing, etc.) resolve to this key so the dashboard
15
+ // /settings/models surface can target tier/budget independently of
16
+ // the non-DM `agent.task` family.
17
+ "agent.dm_task",
18
+ "calendar.change",
19
+ "gmail_classify",
20
+ "github.pull_request.review_requested",
21
+ "github.assigned",
22
+ "github.security_alert",
23
+ "github.workflow_run.failed",
24
+ "git.push.detected",
25
+ "git.local_ahead.stale",
26
+ "git.push.force_pushed",
27
+ "git.branch.created",
28
+ "git.tag.created",
29
+ "git.merge_to_default",
30
+ "git.project.init",
31
+ "git.project.update",
32
+ // Architecture section refresh — one-shot agent session that reads the
33
+ // repo and produces a deep architecture analysis to fill the
34
+ // `## Architecture` block of `git/<slug>/overview.md`. Auto-enqueued
35
+ // from the manual `POST /repositories/:id/management/init` endpoint and
36
+ // from the dashboard's "Refresh architecture" button. The agent submits
37
+ // the section markdown via the chokepoint
38
+ // `PUT /api/repositories/:id/architecture-section`; daemon performs the
39
+ // section replacement so other sections (Notable Changes, Daily Activity
40
+ // Log) cannot be overwritten by accident.
41
+ "git.project.refresh_architecture",
42
+ // P6 (git-lifecycle-and-triggers.md Decision 8) — heavy-tier one-shot
43
+ // session that re-conforms existing context/projects/<slug>.md and
44
+ // context/git-repos/<slug>.md files to the current template. Triggered
45
+ // from the dashboard's "Apply current template" button only; the daemon
46
+ // pre-backups every target file before enqueue so the agent's writes
47
+ // are reversible from `processResult` on failure.
48
+ "git.project.retemplate",
49
+ // P22 — skill self-optimization (appendix p22-skill-self-optimization.md).
50
+ // Cron-fired at the operator's chosen cadence (daily/weekly/monthly). Runs
51
+ // in an isolated workdir under ~/.personal-agent/optimizer-workdir/<run-id>/
52
+ // with allowedTools = curl(skill-curation API) + Read only — no Edit/Write.
53
+ // Operator-configurable from /settings/self-learning.
54
+ "routine.skill_curation",
55
+ // cost-reduction-structural §A — per-observation summarizer. Listed as
56
+ // configurable so `applyDefaultPresets` re-seeds it on a main-backend
57
+ // switch (the install seed pins to claude+Haiku, but a Gemini-only
58
+ // operator should land on a Gemini binding so the worker stays on
59
+ // the same backend lane). Surfaces on /settings/models per the design
60
+ // doc's "Operator can override" requirement.
61
+ "observation.summarize",
62
+ // cost-reduction-structural §B — Stage 2 lite-tier triage that decides
63
+ // log_only vs. escalate before the dispatcher spawns the full Stage 3
64
+ // hourly_check session. Same delegation rationale as
65
+ // `observation.summarize`: the operator may pin a different lite model
66
+ // per backend, and `applyDefaultPresets` re-seeds the row when the
67
+ // main-backend switch fires.
68
+ "routine.hourly_check.triage",
69
+ ];
70
+ const DEFAULT_PROCESS_KEYS = [
71
+ "git.lifecycle.poll",
72
+ "routine.morning_routine_initial",
73
+ "routine.roadmap_refresh",
74
+ "routine.today_refresh",
75
+ "routine.user_profile_sweep",
76
+ "schedule.approaching",
77
+ "integration_drift_sync",
78
+ "setup",
79
+ // KNOWLEDGE-IMPORT — owner uploads a Markdown/text file from the
80
+ // dashboard Knowledge page; a one-shot heavy session reads it and
81
+ // routes its contents into the appropriate user/*.md files. The
82
+ // owner is in the loop via the dashboard, so it is reactive — the
83
+ // session honors the dashboard's backend/model picker through the
84
+ // requestedBackendId/requestedModelId override.
85
+ "knowledge.import",
86
+ // DELEGATED-TASK-MODE-DESIGN.md §8.1 — task mode resolves the model
87
+ // tier server-side via these ProcessKeys. `delegated_task` runs at
88
+ // light tier by default; `delegated_task_heavy` is opt-in via the
89
+ // `delegatedTaskHeavyEnabled` config flag (Approve-tier, see §17).
90
+ // Neither key is selectable per-request — callers pass a task body
91
+ // and the daemon resolves the binding internally — but they ARE
92
+ // configurable: a `process_backend_config` row pinning `main_model`
93
+ // for the active backend takes precedence over the canonical-proxy
94
+ // fallback (`resolveTaskModel` → `resolveProcessKeyModel`). That lets
95
+ // an operator pin Haiku 4.5 for `delegated_task` on Claude or wire
96
+ // Opus 4.7 for `delegated_task_heavy` from the dashboard's process-
97
+ // config card.
98
+ "delegated_task",
99
+ "delegated_task_heavy",
100
+ ];
101
+ const ALL_PROCESS_KEYS = [
102
+ ...CONFIGURABLE_PROCESS_KEYS,
103
+ ...DEFAULT_PROCESS_KEYS,
104
+ ];
105
+ const processKeySet = new Set(ALL_PROCESS_KEYS);
106
+ // Per-process default tier. The three tiers map to model size in the
107
+ // backend's lineup:
108
+ //
109
+ // - `lite` — Haiku-class. Used for delegated proxy calls and short-shape
110
+ // observer-fired tasks (mail/gmail classifier, github/git event
111
+ // triage, calendar.change, integration drift sync, the
112
+ // `delegated_task` invoker family). These have a small fixed-shape
113
+ // contract and tolerate the lower instruction-following capability of
114
+ // a lite-tier model in exchange for an order-of-magnitude lower cost.
115
+ // - `medium` — Sonnet-class. Default for owner-in-the-loop main agent
116
+ // work (DMs, mentions, dashboard chat, hourly check, daily/weekly/
117
+ // monthly reviews, scheduled DM tasks, agent.task). Also the tier
118
+ // that absorbs structured routines whose output is template-driven.
119
+ // - `high` — Opus-class. Reserved for one-shot generative work whose
120
+ // output quality directly drives the agent's downstream behaviour for
121
+ // hours (morning_routine_initial), or for owner-uploaded knowledge
122
+ // imports / project retempling where mistakes corrupt curated files.
123
+ // Operators can pin any other process key to `high` per-row from
124
+ // `/settings/models` — this table only governs the install-time seed.
125
+ //
126
+ // Rationale (see docs/design/09-safety-cost.md):
127
+ // - High-tier headroom is finite (Anthropic API spend, OpenAI rate
128
+ // limits). DMs default to medium so a chat-y user cannot silently
129
+ // exhaust the high-tier budget; the dashboard chat picker and
130
+ // `agent_schedule.model` remain explicit escape hatches for high.
131
+ // - `routine.morning_routine` is **medium** in this table because Sonnet
132
+ // 4.6 handles the structured day-plan synthesis cleanly. The saved
133
+ // high-tier headroom is reserved for `routine.morning_routine_initial`
134
+ // (one-shot, generative, quality-sensitive — first-day plan generation
135
+ // feeds every downstream routine).
136
+ // - Routines that summarize / aggregate existing context (evening, weekly,
137
+ // monthly review) are template-driven; medium tier handles them.
138
+ // - `setup` is medium. The wizard is a structured Q&A flow whose outputs
139
+ // are validated server-side; medium-tier models handle it without the
140
+ // per-turn cost of high tier, and setup mode disables the dashboard
141
+ // model picker so high tier was effectively forced regardless of
142
+ // operator intent.
143
+ const DEFAULT_PROCESS_TIERS = {
144
+ "routine.morning_routine": "medium",
145
+ "routine.morning_routine_initial": "high",
146
+ "routine.evening_review": "medium",
147
+ "routine.weekly_review": "medium",
148
+ "routine.monthly_review": "medium",
149
+ "routine.hourly_check": "medium",
150
+ "routine.roadmap_refresh": "medium",
151
+ "routine.today_refresh": "medium",
152
+ // User-profile sweep is a short summarization + routing pass over the
153
+ // current agent-day's DM traffic. Medium-tier so it does not steal
154
+ // high-tier headroom from morning_routine; it also runs with a minimal
155
+ // 2-skill manifest ([context, user-profile]) to sidestep the
156
+ // selection-dilution failure mode the DM-time capture block fights.
157
+ "routine.user_profile_sweep": "medium",
158
+ "message.dm": "medium",
159
+ "message.mention": "medium",
160
+ "dashboard.chat": "medium",
161
+ // DOCS_QA_DESIGN.md §10.1 — medium tier is hard-forced regardless of
162
+ // message.dm's pinned tier; the inheritance cascade in §10.2 cascades
163
+ // backend choice but re-resolves the model at the inheritor's tier.
164
+ "dashboard.docs_qa": "medium",
165
+ "agent.task": "medium",
166
+ // Briefing composition is structured-output work that fits comfortably
167
+ // in medium tier; operators can override per-process via the dashboard.
168
+ "agent.dm_task": "medium",
169
+ "schedule.approaching": "medium",
170
+ // Integration drift / calendar / mail / github / git observer-fired
171
+ // tasks are short-shape probes — lite tier is sufficient and keeps the
172
+ // hourly-check cadence's per-call cost negligible.
173
+ "integration_drift_sync": "lite",
174
+ "calendar.change": "lite",
175
+ "setup": "medium",
176
+ "gmail_classify": "lite",
177
+ "github.pull_request.review_requested": "lite",
178
+ "github.assigned": "lite",
179
+ "github.security_alert": "lite",
180
+ "github.workflow_run.failed": "lite",
181
+ "git.push.detected": "lite",
182
+ "git.local_ahead.stale": "lite",
183
+ "git.push.force_pushed": "lite",
184
+ "git.branch.created": "lite",
185
+ "git.tag.created": "lite",
186
+ "git.merge_to_default": "lite",
187
+ // git.project.* are one-shot, generative, quality-sensitive surfaces
188
+ // (mistakes corrupt curated project narratives). Medium tier (Sonnet)
189
+ // by default across init / update / retemplate / refresh_architecture;
190
+ // operators who want Opus-grade analysis can pin per-row from
191
+ // /settings/models.
192
+ "git.project.init": "medium",
193
+ "git.project.update": "medium",
194
+ "git.project.refresh_architecture": "medium",
195
+ "git.project.retemplate": "medium",
196
+ "git.lifecycle.poll": "lite",
197
+ // P22 — short-output curation work (typed-payload submissions). Medium
198
+ // is the right default; the operator can pin high from
199
+ // /settings/self-learning if they observe systematic low-quality
200
+ // proposals.
201
+ "routine.skill_curation": "medium",
202
+ // Knowledge import is one-shot, generative, and quality-sensitive
203
+ // (mistakes here corrupt user/*.md). High tier by default; the
204
+ // dashboard upload form may override per-run via the model picker.
205
+ "knowledge.import": "high",
206
+ // DELEGATED-TASK-MODE-DESIGN.md §8.1 — task mode amortizes one
207
+ // planning turn over the actual tool calls; lite tier keeps the
208
+ // overhead from dominating the per-call cost. `delegated_task_heavy`
209
+ // is opt-in and used only when the integration's dashboard config
210
+ // flips it on (`delegatedTaskHeavyEnabled`); when enabled it runs at
211
+ // high tier for the rare destructive write that needs Opus-grade
212
+ // judgment.
213
+ "delegated_task": "lite",
214
+ "delegated_task_heavy": "high",
215
+ // cost-reduction-structural §A — small fixed-shape classification call
216
+ // per observation. Lite tier (Haiku-class) keeps per-observation cost
217
+ // negligible; the per-source prompt prefix benefits from the 5-min
218
+ // Anthropic prompt cache after the first call in each window.
219
+ "observation.summarize": "lite",
220
+ // cost-reduction-structural §B — Stage 2 triage call. Strict JSON-only
221
+ // output, ~2K input / ~50 output. Lite tier so the gate's "escalate vs
222
+ // log only" decision pays a fraction of a Stage 3 medium-tier session.
223
+ "routine.hourly_check.triage": "lite",
224
+ };
225
+ export function isProcessKey(value) {
226
+ return processKeySet.has(value);
227
+ }
228
+ export function isConfigurableProcessKey(value) {
229
+ return CONFIGURABLE_PROCESS_KEYS.includes(value);
230
+ }
231
+ /**
232
+ * B-007 §5.8 — custom routine keys use the branded form
233
+ * `routine.custom.<slug>` with a kebab-case slug that matches the vault
234
+ * file `routines/custom/<slug>.md`. The slug regex mirrors the context
235
+ * API path validator so the two stay in lock-step.
236
+ */
237
+ const CUSTOM_ROUTINE_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/;
238
+ const CUSTOM_ROUTINE_KEY_PREFIX = "routine.custom.";
239
+ export function isCustomRoutineKey(value) {
240
+ if (!value.startsWith(CUSTOM_ROUTINE_KEY_PREFIX))
241
+ return false;
242
+ const slug = value.slice(CUSTOM_ROUTINE_KEY_PREFIX.length);
243
+ if (slug.length === 0 || slug.length > 64)
244
+ return false;
245
+ return CUSTOM_ROUTINE_SLUG_PATTERN.test(slug);
246
+ }
247
+ export function customRoutineKey(slug) {
248
+ return `${CUSTOM_ROUTINE_KEY_PREFIX}${slug}`;
249
+ }
250
+ export function customRoutineSlugFromKey(key) {
251
+ if (!isCustomRoutineKey(key))
252
+ return null;
253
+ return key.slice(CUSTOM_ROUTINE_KEY_PREFIX.length);
254
+ }
255
+ /**
256
+ * Reactive ProcessKeys — the owner is currently in the loop (DMs, mentions,
257
+ * dashboard chat, setup wizard). Everything else is autonomous (routines,
258
+ * scheduled tasks, calendar / Gmail triggers, custom routines).
259
+ *
260
+ * This classifier drives:
261
+ * - B-003 Phase 3 approve-tier MCP tool stripping for autonomous sessions.
262
+ * - Any future per-session policy that differs between "owner is present"
263
+ * and "agent is running unattended".
264
+ */
265
+ const REACTIVE_PROCESS_KEYS = new Set([
266
+ "message.dm",
267
+ "message.mention",
268
+ "dashboard.chat",
269
+ "dashboard.docs_qa",
270
+ "setup",
271
+ "knowledge.import",
272
+ ]);
273
+ export function isAutonomousProcessKey(processKey) {
274
+ return !REACTIVE_PROCESS_KEYS.has(processKey);
275
+ }
276
+ /**
277
+ * Hard tier locks that supersede operator pins, requestedTier hints, and
278
+ * `process_backend_config` rows. Use sparingly: a lock here means we are
279
+ * stating that the named process must run at the listed tier even if the
280
+ * operator explicitly pinned it to something else in `/settings/models`.
281
+ *
282
+ * `dashboard.docs_qa` is locked to `medium` because the QA panel is a
283
+ * doc-lookup surface, not a free-form chat — high tier would silently
284
+ * drain the Opus quota on every "what does X do?" question. See
285
+ * DOCS_QA_DESIGN.md §10.1.
286
+ */
287
+ export const TIER_LOCKED_PROCESS_KEYS = {
288
+ "dashboard.docs_qa": "medium",
289
+ };
290
+ export function getDefaultTierForProcessKey(processKey) {
291
+ if (isProcessKey(processKey)) {
292
+ return DEFAULT_PROCESS_TIERS[processKey];
293
+ }
294
+ if (isCustomRoutineKey(processKey)) {
295
+ // Custom routines default to medium. The scheduler emits an explicit
296
+ // requestedModel sourced from the routine file's `backend_tier`
297
+ // frontmatter, so this is just a safety net.
298
+ return "medium";
299
+ }
300
+ return "medium";
301
+ }
302
+ function isDashboardChatMessage(event) {
303
+ return event.platform === "dashboard" && event.isDm;
304
+ }
305
+ /**
306
+ * DELEGATED-TASK-MODE-DESIGN.md §17 — hard caps on the `/exec` and `/run`
307
+ * task-mode endpoints. These bound a prompt-injected caller's blast radius
308
+ * regardless of the per-request fields they pass. `config.ts` holds the
309
+ * *defaults* (`delegatedTaskDefaultMaxToolCalls` etc.); the constants below
310
+ * are not user-tunable — they live here alongside the ProcessKey
311
+ * definitions because they describe the contract of the `delegated_task` /
312
+ * `delegated_task_heavy` execution shape itself, not the operator's
313
+ * preferences.
314
+ */
315
+ export const DELEGATED_TASK_HARD_CAPS = {
316
+ /** Upper bound on `maxToolCalls` request field. */
317
+ maxToolCalls: 15,
318
+ /** Upper bound on `maxBudgetUsd` request field. */
319
+ maxBudgetUsd: 0.5,
320
+ /** Upper bound on `timeoutMs` request field. */
321
+ maxTimeoutMs: 300_000,
322
+ /**
323
+ * Upper bound on the inlined `outputSchema` payload, measured as
324
+ * `Buffer.byteLength(JSON.stringify(schema), "utf-8")`. The schema
325
+ * lands in the subprocess system prompt and is paid as input tokens
326
+ * on every model turn; 4 KB ≈ 1000 tokens — empirical cap (§6.4).
327
+ */
328
+ maxSchemaBytes: 4096,
329
+ };
330
+ export function resolveProcessKey(event) {
331
+ if (isMessageEvent(event)) {
332
+ if (isDashboardChatMessage(event)) {
333
+ // The `intent` discriminator lets the QA adapter share
334
+ // platform="dashboard" + isDm=true with chat without a second
335
+ // platform string. `intent` is ignored on non-dashboard events
336
+ // (defense against a malformed event from another adapter).
337
+ return event.intent === "docs_qa" ? "dashboard.docs_qa" : "dashboard.chat";
338
+ }
339
+ if (event.isDm) {
340
+ return "message.dm";
341
+ }
342
+ if (event.isMention) {
343
+ return "message.mention";
344
+ }
345
+ }
346
+ if (event.type === "scheduled.task") {
347
+ return "agent.task";
348
+ }
349
+ if (event.type === "scheduled.dm") {
350
+ return "agent.dm_task";
351
+ }
352
+ if (event.type.startsWith("setup.")) {
353
+ return "setup";
354
+ }
355
+ if (event.type === "knowledge.import") {
356
+ return "knowledge.import";
357
+ }
358
+ if (event.type.startsWith("calendar.")) {
359
+ return "calendar.change";
360
+ }
361
+ if (isProcessKey(event.type)) {
362
+ return event.type;
363
+ }
364
+ return event.type;
365
+ }
366
+ //# sourceMappingURL=process-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-key.js","sourceRoot":"","sources":["../src/process-key.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,yBAAyB;IACzB,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,sBAAsB;IACtB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,YAAY;IACZ,qEAAqE;IACrE,gEAAgE;IAChE,mEAAmE;IACnE,kCAAkC;IAClC,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,sCAAsC;IACtC,iBAAiB;IACjB,uBAAuB;IACvB,4BAA4B;IAC5B,mBAAmB;IACnB,uBAAuB;IACvB,uBAAuB;IACvB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,kBAAkB;IAClB,oBAA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C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACtC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC"}
@@ -0,0 +1,267 @@
1
+ import { z } from "zod";
2
+ export declare const contextPutSchema: z.ZodObject<{
3
+ content: z.ZodString;
4
+ expectedMtime: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export declare const contextPatchSchema: z.ZodObject<{
7
+ section: z.ZodOptional<z.ZodString>;
8
+ mode: z.ZodEnum<{
9
+ append: "append";
10
+ replace: "replace";
11
+ clear: "clear";
12
+ clear_before: "clear_before";
13
+ append_to_file: "append_to_file";
14
+ }>;
15
+ content: z.ZodOptional<z.ZodString>;
16
+ cutoff: z.ZodOptional<z.ZodString>;
17
+ maxEntries: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>;
19
+ export declare const notifyRequestSchema: z.ZodObject<{
20
+ message: z.ZodString;
21
+ platform: z.ZodOptional<z.ZodEnum<{
22
+ slack: "slack";
23
+ telegram: "telegram";
24
+ discord: "discord";
25
+ whatsapp: "whatsapp";
26
+ }>>;
27
+ platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
28
+ slack: "slack";
29
+ telegram: "telegram";
30
+ discord: "discord";
31
+ whatsapp: "whatsapp";
32
+ }>>>;
33
+ priority: z.ZodOptional<z.ZodEnum<{
34
+ high: "high";
35
+ critical: "critical";
36
+ normal: "normal";
37
+ low: "low";
38
+ }>>;
39
+ }, z.core.$strip>;
40
+ export declare const scheduleRequestSchema: z.ZodObject<{
41
+ time: z.ZodString;
42
+ taskType: z.ZodString;
43
+ description: z.ZodString;
44
+ prompt: z.ZodOptional<z.ZodString>;
45
+ model: z.ZodOptional<z.ZodEnum<{
46
+ sonnet: "sonnet";
47
+ opus: "opus";
48
+ }>>;
49
+ taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ }, z.core.$strip>;
51
+ export declare const scheduleUpdateRequestSchema: z.ZodObject<{
52
+ time: z.ZodOptional<z.ZodString>;
53
+ description: z.ZodOptional<z.ZodString>;
54
+ prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
55
+ message: z.ZodOptional<z.ZodString>;
56
+ model: z.ZodOptional<z.ZodEnum<{
57
+ sonnet: "sonnet";
58
+ opus: "opus";
59
+ }>>;
60
+ taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
61
+ }, z.core.$strip>;
62
+ export declare const scheduleDmRequestSchema: z.ZodObject<{
63
+ time: z.ZodString;
64
+ message: z.ZodString;
65
+ platform: z.ZodOptional<z.ZodEnum<{
66
+ slack: "slack";
67
+ telegram: "telegram";
68
+ discord: "discord";
69
+ whatsapp: "whatsapp";
70
+ }>>;
71
+ platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
72
+ slack: "slack";
73
+ telegram: "telegram";
74
+ discord: "discord";
75
+ whatsapp: "whatsapp";
76
+ }>>>;
77
+ importance: z.ZodOptional<z.ZodEnum<{
78
+ normal: "normal";
79
+ transient: "transient";
80
+ strategic: "strategic";
81
+ }>>;
82
+ }, z.core.$strip>;
83
+ export declare const actionLogRequestSchema: z.ZodObject<{
84
+ actionType: z.ZodString;
85
+ detail: z.ZodString;
86
+ result: z.ZodEnum<{
87
+ success: "success";
88
+ failed: "failed";
89
+ partial: "partial";
90
+ skipped: "skipped";
91
+ }>;
92
+ }, z.core.$strip>;
93
+ /**
94
+ * Skill slug constraints — kebab-case, 1-64 chars, safe for filesystem & URLs.
95
+ * Explicitly rejects path traversal, whitespace, and uppercase to keep
96
+ * filesystem semantics consistent across macOS (case-insensitive) and Linux.
97
+ */
98
+ export declare const skillNameSchema: z.ZodString;
99
+ export declare const skillCreateSchema: z.ZodObject<{
100
+ name: z.ZodString;
101
+ description: z.ZodString;
102
+ content: z.ZodString;
103
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ }, z.core.$strip>;
105
+ export declare const skillUpdateSchema: z.ZodObject<{
106
+ description: z.ZodOptional<z.ZodString>;
107
+ content: z.ZodOptional<z.ZodString>;
108
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
109
+ }, z.core.$strip>;
110
+ declare const _skillSummarySchema: z.ZodObject<{
111
+ name: z.ZodString;
112
+ description: z.ZodString;
113
+ builtin: z.ZodBoolean;
114
+ updatedAt: z.ZodString;
115
+ }, z.core.$strip>;
116
+ declare const _skillDetailSchema: z.ZodObject<{
117
+ name: z.ZodString;
118
+ description: z.ZodString;
119
+ content: z.ZodString;
120
+ allowedTools: z.ZodArray<z.ZodString>;
121
+ builtin: z.ZodBoolean;
122
+ updatedAt: z.ZodString;
123
+ }, z.core.$strip>;
124
+ export declare const calendarCreateEventSchema: z.ZodObject<{
125
+ description: z.ZodOptional<z.ZodString>;
126
+ location: z.ZodOptional<z.ZodString>;
127
+ reminders: z.ZodOptional<z.ZodObject<{
128
+ useDefault: z.ZodBoolean;
129
+ overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ method: z.ZodEnum<{
131
+ email: "email";
132
+ popup: "popup";
133
+ }>;
134
+ minutes: z.ZodNumber;
135
+ }, z.core.$strip>>>;
136
+ }, z.core.$strip>>;
137
+ recurrence: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ attendees: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
+ email: z.ZodString;
140
+ }, z.core.$strip>>>;
141
+ visibility: z.ZodOptional<z.ZodEnum<{
142
+ default: "default";
143
+ public: "public";
144
+ private: "private";
145
+ confidential: "confidential";
146
+ }>>;
147
+ summary: z.ZodString;
148
+ start: z.ZodString;
149
+ end: z.ZodString;
150
+ }, z.core.$strip>;
151
+ export declare const calendarUpdateEventSchema: z.ZodObject<{
152
+ description: z.ZodOptional<z.ZodString>;
153
+ location: z.ZodOptional<z.ZodString>;
154
+ reminders: z.ZodOptional<z.ZodObject<{
155
+ useDefault: z.ZodBoolean;
156
+ overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
157
+ method: z.ZodEnum<{
158
+ email: "email";
159
+ popup: "popup";
160
+ }>;
161
+ minutes: z.ZodNumber;
162
+ }, z.core.$strip>>>;
163
+ }, z.core.$strip>>;
164
+ recurrence: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ attendees: z.ZodOptional<z.ZodArray<z.ZodObject<{
166
+ email: z.ZodString;
167
+ }, z.core.$strip>>>;
168
+ visibility: z.ZodOptional<z.ZodEnum<{
169
+ default: "default";
170
+ public: "public";
171
+ private: "private";
172
+ confidential: "confidential";
173
+ }>>;
174
+ summary: z.ZodOptional<z.ZodString>;
175
+ start: z.ZodOptional<z.ZodString>;
176
+ end: z.ZodOptional<z.ZodString>;
177
+ }, z.core.$strip>;
178
+ export declare const calendarFreeBusySchema: z.ZodObject<{
179
+ timeMin: z.ZodString;
180
+ timeMax: z.ZodString;
181
+ calendarIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
182
+ }, z.core.$strip>;
183
+ export declare const recurrenceRuleSchema: z.ZodObject<{
184
+ frequency: z.ZodEnum<{
185
+ daily: "daily";
186
+ weekly: "weekly";
187
+ monthly: "monthly";
188
+ }>;
189
+ time: z.ZodString;
190
+ timezone: z.ZodOptional<z.ZodString>;
191
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
192
+ daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
193
+ }, z.core.$strip>;
194
+ export declare const recurringScheduleCreateSchema: z.ZodObject<{
195
+ taskType: z.ZodString;
196
+ description: z.ZodString;
197
+ prompt: z.ZodOptional<z.ZodString>;
198
+ recurrenceRule: z.ZodObject<{
199
+ frequency: z.ZodEnum<{
200
+ daily: "daily";
201
+ weekly: "weekly";
202
+ monthly: "monthly";
203
+ }>;
204
+ time: z.ZodString;
205
+ timezone: z.ZodOptional<z.ZodString>;
206
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
207
+ daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
208
+ }, z.core.$strip>;
209
+ model: z.ZodOptional<z.ZodEnum<{
210
+ sonnet: "sonnet";
211
+ opus: "opus";
212
+ }>>;
213
+ taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
214
+ }, z.core.$strip>;
215
+ export declare const recurringScheduleUpdateSchema: z.ZodObject<{
216
+ description: z.ZodOptional<z.ZodString>;
217
+ prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
218
+ recurrenceRule: z.ZodOptional<z.ZodObject<{
219
+ frequency: z.ZodEnum<{
220
+ daily: "daily";
221
+ weekly: "weekly";
222
+ monthly: "monthly";
223
+ }>;
224
+ time: z.ZodString;
225
+ timezone: z.ZodOptional<z.ZodString>;
226
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
227
+ daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
228
+ }, z.core.$strip>>;
229
+ model: z.ZodOptional<z.ZodEnum<{
230
+ sonnet: "sonnet";
231
+ opus: "opus";
232
+ }>>;
233
+ taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
234
+ enabled: z.ZodOptional<z.ZodBoolean>;
235
+ }, z.core.$strip>;
236
+ export declare const triggerCreateSchema: z.ZodObject<{
237
+ domain: z.ZodEnum<{
238
+ git: "git";
239
+ }>;
240
+ eventType: z.ZodEnum<{
241
+ "cron.daily": "cron.daily";
242
+ "cron.weekly": "cron.weekly";
243
+ }>;
244
+ prompt: z.ZodString;
245
+ time: z.ZodString;
246
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
247
+ }, z.core.$strip>;
248
+ export declare const triggerUpdateSchema: z.ZodObject<{
249
+ prompt: z.ZodOptional<z.ZodString>;
250
+ enabled: z.ZodOptional<z.ZodBoolean>;
251
+ time: z.ZodOptional<z.ZodString>;
252
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
253
+ }, z.core.$strip>;
254
+ export type NotifyRequest = z.infer<typeof notifyRequestSchema>;
255
+ export type ScheduleRequest = z.infer<typeof scheduleRequestSchema>;
256
+ export type ScheduleUpdateRequest = z.infer<typeof scheduleUpdateRequestSchema>;
257
+ export type ScheduleDmRequest = z.infer<typeof scheduleDmRequestSchema>;
258
+ export type ActionLogRequest = z.infer<typeof actionLogRequestSchema>;
259
+ export type SkillCreateRequest = z.infer<typeof skillCreateSchema>;
260
+ export type SkillUpdateRequest = z.infer<typeof skillUpdateSchema>;
261
+ export type SkillSummary = z.infer<typeof _skillSummarySchema>;
262
+ export type SkillDetail = z.infer<typeof _skillDetailSchema>;
263
+ export type TriggerCreateRequest = z.infer<typeof triggerCreateSchema>;
264
+ export type TriggerUpdateRequest = z.infer<typeof triggerUpdateSchema>;
265
+ export type RecurrenceRule = z.infer<typeof recurrenceRuleSchema>;
266
+ export {};
267
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,gBAAgB;;;iBAS3B,CAAC;AAMH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;iBAkC9B,CAAC;AAIF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;iBAQ/B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAsBhC,CAAC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