@codeam/shared 2.61.26 → 2.61.28

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/index.d.mts CHANGED
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
351
351
  * ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
352
352
  * declare both.
353
353
  */
354
- type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma';
354
+ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat';
355
355
  type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key';
356
356
  /** Grouping used by category-driven surfaces (Start-from-Work-Item picker,
357
357
  * catalog sections). A future tracker integration joins those features with
@@ -615,7 +615,7 @@ interface AgentReviewReport {
615
615
  }
616
616
 
617
617
  /** Curated skills shipped with the client. Grows over time. */
618
- type SkillId = 'code-review' | 'resolve-conflicts';
618
+ type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development';
619
619
  /** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
620
620
  type SkillRail = 'skillFile' | 'instruction';
621
621
  /** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
@@ -1469,6 +1469,11 @@ declare const USER_EVENTS: {
1469
1469
  readonly CODERABBIT_STATUS: "coderabbit_status";
1470
1470
  readonly CODERABBIT_REVIEW: "coderabbit_review";
1471
1471
  readonly VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete";
1472
+ /** PR-review launch progress toast — the "Review with an agent" flow shows a
1473
+ * toast when the review runs server-side (Inngest). Mobile-only surface,
1474
+ * produced by api-v2 (the CLI neither produces nor consumes it). Mirrored in
1475
+ * repo A. */
1476
+ readonly PR_REVIEW_LAUNCH: "pr_review_launch";
1472
1477
  };
1473
1478
  type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
1474
1479
 
package/dist/index.d.ts CHANGED
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
351
351
  * ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
352
352
  * declare both.
353
353
  */
354
- type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma';
354
+ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat';
355
355
  type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key';
356
356
  /** Grouping used by category-driven surfaces (Start-from-Work-Item picker,
357
357
  * catalog sections). A future tracker integration joins those features with
@@ -615,7 +615,7 @@ interface AgentReviewReport {
615
615
  }
616
616
 
617
617
  /** Curated skills shipped with the client. Grows over time. */
618
- type SkillId = 'code-review' | 'resolve-conflicts';
618
+ type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development';
619
619
  /** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
620
620
  type SkillRail = 'skillFile' | 'instruction';
621
621
  /** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
@@ -1469,6 +1469,11 @@ declare const USER_EVENTS: {
1469
1469
  readonly CODERABBIT_STATUS: "coderabbit_status";
1470
1470
  readonly CODERABBIT_REVIEW: "coderabbit_review";
1471
1471
  readonly VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete";
1472
+ /** PR-review launch progress toast — the "Review with an agent" flow shows a
1473
+ * toast when the review runs server-side (Inngest). Mobile-only surface,
1474
+ * produced by api-v2 (the CLI neither produces nor consumes it). Mirrored in
1475
+ * repo A. */
1476
+ readonly PR_REVIEW_LAUNCH: "pr_review_launch";
1472
1477
  };
1473
1478
  type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
1474
1479
 
package/dist/index.js CHANGED
@@ -727,6 +727,31 @@ var INTEGRATION_REGISTRY = {
727
727
  }
728
728
  }
729
729
  },
730
+ microsoft_teams: {
731
+ id: "microsoft_teams",
732
+ name: "Microsoft Teams",
733
+ icon: "microsoft_teams",
734
+ category: "comms",
735
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
736
+ // agent will post review pings + read threads AS THE USER over Microsoft Graph
737
+ // once the provider lands. `enabled:false` renders it as a dimmed "coming
738
+ // soon" tile inside the (live) comms category.
739
+ enabled: false,
740
+ auth: { kind: "oauth_redirect" },
741
+ delivery: {}
742
+ },
743
+ google_chat: {
744
+ id: "google_chat",
745
+ name: "Google Chat",
746
+ icon: "google_chat",
747
+ category: "comms",
748
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
749
+ // agent will post review pings + read spaces AS THE USER over the Google Chat
750
+ // API once the provider lands. `enabled:false` → dimmed "coming soon" tile.
751
+ enabled: false,
752
+ auth: { kind: "oauth_redirect" },
753
+ delivery: {}
754
+ },
730
755
  notion: {
731
756
  id: "notion",
732
757
  name: "Notion",
@@ -912,6 +937,22 @@ var INTEGRATION_BRANDING = {
912
937
  brandColor: "#E01E5A",
913
938
  logoSvg: '<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4127_70105)"><path d="M11.379 33.9993C11.379 37.1358 8.84512 39.6507 5.7276 39.6507C2.61008 39.6507 0.0572205 37.1168 0.0572205 33.9993C0.0572205 30.8817 2.5911 28.3479 5.70862 28.3479H11.36V33.9993H11.379Z" fill="#E01E5A"/><path d="M14.1962 33.9997C14.1962 30.8632 16.7301 28.3483 19.8476 28.3483C22.9651 28.3483 25.499 30.8822 25.499 33.9997V48.1353C25.499 51.2718 22.9651 53.7867 19.8476 53.7867C16.7301 53.7867 14.1962 51.2718 14.1962 48.1353V33.9997Z" fill="#E01E5A"/><path d="M19.8662 11.2673C16.7296 11.2673 14.2148 8.73347 14.2148 5.61594C14.2148 2.49842 16.7486 -0.0354538 19.8662 -0.0354538C22.9837 -0.0354538 25.5175 2.49842 25.5175 5.61594V11.2673H19.8662Z" fill="#36C5F0"/><path d="M19.8682 14.1334C23.0047 14.1334 25.5196 16.6673 25.5196 19.7848C25.5196 22.9023 22.9857 25.4362 19.8682 25.4362H5.67566C2.53916 25.4362 0.0242615 22.9023 0.0242615 19.7848C0.0242615 16.6673 2.55814 14.1334 5.67566 14.1334H19.8682Z" fill="#36C5F0"/><path d="M42.5323 19.7853C42.5323 16.6488 45.0662 14.1339 48.1837 14.1339C51.3012 14.1339 53.8351 16.6678 53.8351 19.7853C53.8351 22.9028 51.3012 25.4367 48.1837 25.4367H42.5323V19.7853Z" fill="#2EB67D"/><path d="M39.7126 19.7934C39.7126 22.9299 37.1787 25.4448 34.0612 25.4448C30.9436 25.4448 28.4098 22.911 28.4098 19.7934V5.61986C28.4098 2.48336 30.9436 -0.0315399 34.0612 -0.0315399C37.1787 -0.0315399 39.7126 2.48336 39.7126 5.61986V19.7934Z" fill="#2EB67D"/><path d="M34.0376 42.482C37.1741 42.482 39.689 45.0158 39.689 48.1334C39.689 51.2509 37.1552 53.7848 34.0376 53.7848C30.9201 53.7848 28.3862 51.2509 28.3862 48.1334V42.482H34.0376Z" fill="#ECB22E"/><path d="M34.0381 39.6507C30.9016 39.6507 28.3867 37.1168 28.3867 33.9993C28.3867 30.8818 30.9206 28.3479 34.0381 28.3479H48.2306C51.3671 28.3479 53.882 30.8818 53.882 33.9993C53.882 37.1168 51.3482 39.6507 48.2306 39.6507H34.0381Z" fill="#ECB22E"/></g><defs><clipPath id="clip0_4127_70105"><rect width="54" height="54" fill="white"/></clipPath></defs></svg>'
914
939
  },
940
+ microsoft_teams: {
941
+ id: "microsoft_teams",
942
+ name: "Microsoft Teams",
943
+ vendor: "Microsoft",
944
+ tagline: "Team chat & collaboration",
945
+ brandColor: "#6264A7",
946
+ logoSvg: '<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M36.6 22h12.3c1 0 1.8.8 1.8 1.8v10.4a7.2 7.2 0 0 1-7.2 7.2 7.2 7.2 0 0 1-7.2-7.2V22z" fill="#5059C9"/><circle cx="44" cy="14.4" r="4.6" fill="#5059C9"/><circle cx="27.2" cy="12" r="6.6" fill="#7B83EB"/><path d="M35.4 22H16.9c-1 .02-1.8.86-1.78 1.86v11.9A12 12 0 0 0 26.9 47.6a12 12 0 0 0 10.28-11.84V23.86c.02-1-.78-1.84-1.78-1.86z" fill="#7B83EB"/><path opacity=".12" d="M28 22v18.4a1.86 1.86 0 0 1-1.72 1.84H15.72A12.7 12.7 0 0 1 15.12 38V23.86c-.02-1 .78-1.84 1.78-1.86H28z" fill="#000"/><rect x="2.5" y="15" width="23.5" height="23.5" rx="2.2" fill="#4B53BC"/><path d="M19.8 21.4H8.7v3.05h4v11.1h3.1v-11.1h4V21.4z" fill="#fff"/></svg>'
947
+ },
948
+ google_chat: {
949
+ id: "google_chat",
950
+ name: "Google Chat",
951
+ vendor: "Google",
952
+ tagline: "Team messaging & spaces",
953
+ brandColor: "#00AC47",
954
+ logoSvg: '<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M46 6H8a3.5 3.5 0 0 0-3.5 3.5v26A3.5 3.5 0 0 0 8 39h4.5v8.2a1.3 1.3 0 0 0 2.15 1L26 39h20a3.5 3.5 0 0 0 3.5-3.5v-26A3.5 3.5 0 0 0 46 6z" fill="#00AC47"/><circle cx="19.5" cy="22.5" r="3.1" fill="#fff"/><circle cx="34.5" cy="22.5" r="3.1" fill="#fff"/></svg>'
955
+ },
915
956
  linear: {
916
957
  id: "linear",
917
958
  name: "Linear",
@@ -1104,7 +1145,7 @@ function getIntegrationBranding(id) {
1104
1145
  return INTEGRATION_BRANDING[id] ?? null;
1105
1146
  }
1106
1147
 
1107
- // src/skills/registry.ts
1148
+ // src/skills/code-review.ts
1108
1149
  var CODE_REVIEW_BODY = `Use this skill when reviewing a pull request. It defines what a high-signal
1109
1150
  review looks like so your inline comments are worth the author's time.
1110
1151
 
@@ -1137,6 +1178,18 @@ line, each led by a severity tag (blocker/should-fix/nit) and a concrete reason
1137
1178
  (the failure scenario or risk), not a restatement of the diff. If the change is
1138
1179
  correct and well-tested, approve and say so \u2014 finding nothing is a valid outcome.
1139
1180
  Review only the diff and its direct blast radius; do not demand unrelated refactors.`;
1181
+ var codeReviewSkill = {
1182
+ id: "code-review",
1183
+ name: "Code Review",
1184
+ description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
1185
+ source: "curated",
1186
+ delivery: {
1187
+ skillFile: { body: CODE_REVIEW_BODY },
1188
+ instruction: { body: CODE_REVIEW_INSTRUCTION }
1189
+ }
1190
+ };
1191
+
1192
+ // src/skills/resolve-conflicts.ts
1140
1193
  var RESOLVE_CONFLICTS_BODY = `Use this skill when resolving merge conflicts on a pull request. The goal is a
1141
1194
  merge that preserves BOTH sides' intent, not one that just makes the file compile.
1142
1195
 
@@ -1160,28 +1213,134 @@ and prefer a union of intents; drop a side only when the two are mutually exclus
1160
1213
  keeping the side that matches the PR's purpose. Leave no conflict markers behind
1161
1214
  (grep for them). Regenerate lockfiles rather than hand-merging them. The result must
1162
1215
  build and pass tests \u2014 run them \u2014 before you commit and push.`;
1163
- var SKILL_REGISTRY = {
1164
- "code-review": {
1165
- id: "code-review",
1166
- name: "Code Review",
1167
- description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
1168
- source: "curated",
1169
- delivery: {
1170
- skillFile: { body: CODE_REVIEW_BODY },
1171
- instruction: { body: CODE_REVIEW_INSTRUCTION }
1172
- }
1173
- },
1174
- "resolve-conflicts": {
1175
- id: "resolve-conflicts",
1176
- name: "Resolve Conflicts",
1177
- description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
1178
- source: "curated",
1179
- delivery: {
1180
- skillFile: { body: RESOLVE_CONFLICTS_BODY },
1181
- instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
1182
- }
1216
+ var resolveConflictsSkill = {
1217
+ id: "resolve-conflicts",
1218
+ name: "Resolve Conflicts",
1219
+ description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
1220
+ source: "curated",
1221
+ delivery: {
1222
+ skillFile: { body: RESOLVE_CONFLICTS_BODY },
1223
+ instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
1224
+ }
1225
+ };
1226
+
1227
+ // src/skills/spec-driven-development.ts
1228
+ var SPEC_DRIVEN_BODY = `Use this skill for any coding task that isn't a trivial one-liner. Build the right
1229
+ thing, provably, with the least ceremony the task warrants \u2014 specification before
1230
+ code, but its depth scales to the work. Skipping it yields code that looks right yet
1231
+ solves the wrong problem or breaks something you never checked.
1232
+
1233
+ ## Step 0 \u2014 Right-size the work (always first)
1234
+ - **Quick** \u2014 a typo, copy tweak, one-line fix, a single file with no unknowns.
1235
+ No ceremony: make the change, run the relevant test/build, confirm it. Do NOT
1236
+ write a spec for a typo.
1237
+ - **Standard** \u2014 a feature or fix across a few files, some unknowns, a testable
1238
+ outcome. A light inline pass (a 2-3 sentence spec + a short plan), then build
1239
+ test-first, then verify. No scaffolding files.
1240
+ - **Deep** \u2014 large, ambiguous, risky, or touching many files / shared contracts /
1241
+ data / auth. The full flow below, tracking the work in beads (\`bd\`), not scratch
1242
+ files.
1243
+ When unsure, start one level lighter and escalate the moment real ambiguity or risk
1244
+ appears. State which level you picked in one line.
1245
+
1246
+ ## Step 1 \u2014 Ground in the real codebase (before specifying anything non-trivial)
1247
+ You are almost never in a greenfield. Before you spec or plan, survey the real code:
1248
+ the existing patterns for this kind of change, the files you'll touch, the test
1249
+ setup, prior art, and the constraints (auth, data, shared types, CLAUDE.md
1250
+ conventions). A spec written in a vacuum produces a plan that fights the codebase.
1251
+ Read first; never assume.
1252
+
1253
+ ## Step 2 \u2014 Specify: the WHAT and WHY (not the HOW)
1254
+ State the user-visible outcome and why it matters, then the acceptance criteria \u2014
1255
+ each concrete and testable ("tapping X shows Y", "the endpoint returns 409 when Z"),
1256
+ never vague ("works well"). List what is out of scope. Put NO implementation detail
1257
+ here (no file names, no libraries). If a requirement is ambiguous, mark it rather
1258
+ than guess.
1259
+
1260
+ ## Step 3 \u2014 Clarify: resolve ambiguity, but don't stall
1261
+ Gather the ambiguities that would actually change what you build. Ask the
1262
+ highest-leverage ones \u2014 batched, at most ~3, phrased as concrete choices. For
1263
+ low-stakes unknowns, pick a sensible default and SAY so ("assuming X unless you tell
1264
+ me otherwise") instead of asking. On a conversational/mobile client every round-trip
1265
+ is expensive \u2014 don't pester; decide what you safely can.
1266
+
1267
+ ## Step 4 \u2014 Plan: the HOW, grounded and simple
1268
+ Design against the real code. Apply the simplicity gates before committing:
1269
+ - **Fewest moving parts** that satisfy the criteria. If you add a layer or
1270
+ abstraction, justify it or drop it.
1271
+ - **Use the framework/library directly** \u2014 don't wrap it for flexibility you don't
1272
+ need yet.
1273
+ - **Minimal blast radius** \u2014 touch what the change needs, nothing more.
1274
+ State the test strategy (what proves each criterion) and name the real risks. Keep
1275
+ the plan short.
1276
+
1277
+ ## Step 5 \u2014 Tasks: small, verifiable, ordered
1278
+ Split the plan into tasks that each end in something you can run and check. Mark
1279
+ independent ones as parallelizable. Each task is the smallest unit worth its own
1280
+ check. Sequence by dependency.
1281
+
1282
+ ## Step 6 \u2014 Implement: test-first by default
1283
+ For each task: write the test that would fail without the change, watch it fail, make
1284
+ it pass, keep it green. Follow the patterns you found in Step 1. Commit in logical
1285
+ units. Escape hatch: for a genuine spike or exploratory UI where test-first is
1286
+ impractical, say so explicitly and add the test right after \u2014 never skip it silently.
1287
+
1288
+ ## Step 7 \u2014 Verify + self-review (what separates "done" from "looks done")
1289
+ Return to the acceptance criteria and prove EACH one is met \u2014 run the tests, diff the
1290
+ behavior, look at the real output. Then review your own work adversarially:
1291
+ - What did I NOT test?
1292
+ - What did I change that I didn't need to?
1293
+ - What could this have broken (the blast radius)?
1294
+ - Does anything contradict the spec?
1295
+ Fix what you find before declaring done. "The tests I wrote pass" is not "it works".
1296
+
1297
+ ## Step 8 \u2014 Done + handoff
1298
+ Done means acceptance criteria met, tests green, no known regressions. Summarize what
1299
+ changed in plain terms. File any deferred work or follow-ups to beads (\`bd\`) so
1300
+ nothing is lost. Never claim done on unverified work.
1301
+
1302
+ ## Principles (the constitution)
1303
+ - Clarify before you build; verify before you call it done.
1304
+ - Testable beats descriptive \u2014 a criterion you can't check isn't one.
1305
+ - Grounded beats greenfield \u2014 fit the codebase that exists.
1306
+ - Simple beats clever \u2014 the least structure that works.
1307
+ - Scale the process to the task \u2014 ceremony on a typo is a bug.
1308
+ - Real work goes to beads, not throwaway files in someone's repo.`;
1309
+ var SPEC_DRIVEN_INSTRUCTION = `Follow spec-driven development, scaled to the task:
1310
+ 1. Right-size first. A trivial change (typo, one file, no unknowns) \u2192 just make it
1311
+ well and verify, no ceremony. A feature/ambiguous/risky change \u2192 spec \u2192 plan \u2192
1312
+ build \u2192 verify.
1313
+ 2. Ground in the real codebase before planning \u2014 read the existing patterns, tests,
1314
+ and constraints. Never assume; read first.
1315
+ 3. Specify the WHAT and WHY as testable acceptance criteria, not the HOW. Mark
1316
+ ambiguities instead of guessing.
1317
+ 4. Clarify only the highest-leverage unknowns (batch <=3, concrete choices); default
1318
+ the low-stakes ones and say so. Don't stall on round-trips.
1319
+ 5. Plan the simplest approach that fits the code: fewest moving parts, use libraries
1320
+ directly, minimal blast radius. State how each criterion will be tested.
1321
+ 6. Implement test-first by default; follow existing patterns; commit in logical units.
1322
+ 7. Verify EACH acceptance criterion (run tests, diff behavior), then self-review
1323
+ adversarially: what's untested? what did I change needlessly? what could I have
1324
+ broken? what contradicts the spec? Fix before declaring done.
1325
+ 8. Track deferred work in beads (bd), not scratch files. Simple beats clever; verify
1326
+ before done.`;
1327
+ var specDrivenDevelopmentSkill = {
1328
+ id: "spec-driven-development",
1329
+ name: "Spec-Driven Development",
1330
+ description: `Spec-driven development scaled to the task: right-size, ground in the code, write testable acceptance criteria, plan simply, build test-first, and verify every criterion before done.`,
1331
+ source: "curated",
1332
+ delivery: {
1333
+ skillFile: { body: SPEC_DRIVEN_BODY },
1334
+ instruction: { body: SPEC_DRIVEN_INSTRUCTION }
1183
1335
  }
1184
1336
  };
1337
+
1338
+ // src/skills/registry.ts
1339
+ var SKILL_REGISTRY = {
1340
+ "code-review": codeReviewSkill,
1341
+ "resolve-conflicts": resolveConflictsSkill,
1342
+ "spec-driven-development": specDrivenDevelopmentSkill
1343
+ };
1185
1344
  function isSkillId(id) {
1186
1345
  return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
1187
1346
  }
@@ -1329,7 +1488,12 @@ var USER_EVENTS = {
1329
1488
  // VCS / PR Command Center — the backend publishes this after an agent finishes
1330
1489
  // reviewing a PR (verdict + comment count + findings), driving the mobile
1331
1490
  // completion screen + push. Mirrored in repo A's app-shared events.ts.
1332
- VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete"
1491
+ VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete",
1492
+ /** PR-review launch progress toast — the "Review with an agent" flow shows a
1493
+ * toast when the review runs server-side (Inngest). Mobile-only surface,
1494
+ * produced by api-v2 (the CLI neither produces nor consumes it). Mirrored in
1495
+ * repo A. */
1496
+ PR_REVIEW_LAUNCH: "pr_review_launch"
1333
1497
  };
1334
1498
 
1335
1499
  // src/preview-prompts.ts