@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.mjs CHANGED
@@ -645,6 +645,31 @@ var INTEGRATION_REGISTRY = {
645
645
  }
646
646
  }
647
647
  },
648
+ microsoft_teams: {
649
+ id: "microsoft_teams",
650
+ name: "Microsoft Teams",
651
+ icon: "microsoft_teams",
652
+ category: "comms",
653
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
654
+ // agent will post review pings + read threads AS THE USER over Microsoft Graph
655
+ // once the provider lands. `enabled:false` renders it as a dimmed "coming
656
+ // soon" tile inside the (live) comms category.
657
+ enabled: false,
658
+ auth: { kind: "oauth_redirect" },
659
+ delivery: {}
660
+ },
661
+ google_chat: {
662
+ id: "google_chat",
663
+ name: "Google Chat",
664
+ icon: "google_chat",
665
+ category: "comms",
666
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
667
+ // agent will post review pings + read spaces AS THE USER over the Google Chat
668
+ // API once the provider lands. `enabled:false` → dimmed "coming soon" tile.
669
+ enabled: false,
670
+ auth: { kind: "oauth_redirect" },
671
+ delivery: {}
672
+ },
648
673
  notion: {
649
674
  id: "notion",
650
675
  name: "Notion",
@@ -830,6 +855,22 @@ var INTEGRATION_BRANDING = {
830
855
  brandColor: "#E01E5A",
831
856
  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>'
832
857
  },
858
+ microsoft_teams: {
859
+ id: "microsoft_teams",
860
+ name: "Microsoft Teams",
861
+ vendor: "Microsoft",
862
+ tagline: "Team chat & collaboration",
863
+ brandColor: "#6264A7",
864
+ 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>'
865
+ },
866
+ google_chat: {
867
+ id: "google_chat",
868
+ name: "Google Chat",
869
+ vendor: "Google",
870
+ tagline: "Team messaging & spaces",
871
+ brandColor: "#00AC47",
872
+ 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>'
873
+ },
833
874
  linear: {
834
875
  id: "linear",
835
876
  name: "Linear",
@@ -1022,7 +1063,7 @@ function getIntegrationBranding(id) {
1022
1063
  return INTEGRATION_BRANDING[id] ?? null;
1023
1064
  }
1024
1065
 
1025
- // src/skills/registry.ts
1066
+ // src/skills/code-review.ts
1026
1067
  var CODE_REVIEW_BODY = `Use this skill when reviewing a pull request. It defines what a high-signal
1027
1068
  review looks like so your inline comments are worth the author's time.
1028
1069
 
@@ -1055,6 +1096,18 @@ line, each led by a severity tag (blocker/should-fix/nit) and a concrete reason
1055
1096
  (the failure scenario or risk), not a restatement of the diff. If the change is
1056
1097
  correct and well-tested, approve and say so \u2014 finding nothing is a valid outcome.
1057
1098
  Review only the diff and its direct blast radius; do not demand unrelated refactors.`;
1099
+ var codeReviewSkill = {
1100
+ id: "code-review",
1101
+ name: "Code Review",
1102
+ description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
1103
+ source: "curated",
1104
+ delivery: {
1105
+ skillFile: { body: CODE_REVIEW_BODY },
1106
+ instruction: { body: CODE_REVIEW_INSTRUCTION }
1107
+ }
1108
+ };
1109
+
1110
+ // src/skills/resolve-conflicts.ts
1058
1111
  var RESOLVE_CONFLICTS_BODY = `Use this skill when resolving merge conflicts on a pull request. The goal is a
1059
1112
  merge that preserves BOTH sides' intent, not one that just makes the file compile.
1060
1113
 
@@ -1078,28 +1131,134 @@ and prefer a union of intents; drop a side only when the two are mutually exclus
1078
1131
  keeping the side that matches the PR's purpose. Leave no conflict markers behind
1079
1132
  (grep for them). Regenerate lockfiles rather than hand-merging them. The result must
1080
1133
  build and pass tests \u2014 run them \u2014 before you commit and push.`;
1081
- var SKILL_REGISTRY = {
1082
- "code-review": {
1083
- id: "code-review",
1084
- name: "Code Review",
1085
- description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
1086
- source: "curated",
1087
- delivery: {
1088
- skillFile: { body: CODE_REVIEW_BODY },
1089
- instruction: { body: CODE_REVIEW_INSTRUCTION }
1090
- }
1091
- },
1092
- "resolve-conflicts": {
1093
- id: "resolve-conflicts",
1094
- name: "Resolve Conflicts",
1095
- description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
1096
- source: "curated",
1097
- delivery: {
1098
- skillFile: { body: RESOLVE_CONFLICTS_BODY },
1099
- instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
1100
- }
1134
+ var resolveConflictsSkill = {
1135
+ id: "resolve-conflicts",
1136
+ name: "Resolve Conflicts",
1137
+ description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
1138
+ source: "curated",
1139
+ delivery: {
1140
+ skillFile: { body: RESOLVE_CONFLICTS_BODY },
1141
+ instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
1142
+ }
1143
+ };
1144
+
1145
+ // src/skills/spec-driven-development.ts
1146
+ var SPEC_DRIVEN_BODY = `Use this skill for any coding task that isn't a trivial one-liner. Build the right
1147
+ thing, provably, with the least ceremony the task warrants \u2014 specification before
1148
+ code, but its depth scales to the work. Skipping it yields code that looks right yet
1149
+ solves the wrong problem or breaks something you never checked.
1150
+
1151
+ ## Step 0 \u2014 Right-size the work (always first)
1152
+ - **Quick** \u2014 a typo, copy tweak, one-line fix, a single file with no unknowns.
1153
+ No ceremony: make the change, run the relevant test/build, confirm it. Do NOT
1154
+ write a spec for a typo.
1155
+ - **Standard** \u2014 a feature or fix across a few files, some unknowns, a testable
1156
+ outcome. A light inline pass (a 2-3 sentence spec + a short plan), then build
1157
+ test-first, then verify. No scaffolding files.
1158
+ - **Deep** \u2014 large, ambiguous, risky, or touching many files / shared contracts /
1159
+ data / auth. The full flow below, tracking the work in beads (\`bd\`), not scratch
1160
+ files.
1161
+ When unsure, start one level lighter and escalate the moment real ambiguity or risk
1162
+ appears. State which level you picked in one line.
1163
+
1164
+ ## Step 1 \u2014 Ground in the real codebase (before specifying anything non-trivial)
1165
+ You are almost never in a greenfield. Before you spec or plan, survey the real code:
1166
+ the existing patterns for this kind of change, the files you'll touch, the test
1167
+ setup, prior art, and the constraints (auth, data, shared types, CLAUDE.md
1168
+ conventions). A spec written in a vacuum produces a plan that fights the codebase.
1169
+ Read first; never assume.
1170
+
1171
+ ## Step 2 \u2014 Specify: the WHAT and WHY (not the HOW)
1172
+ State the user-visible outcome and why it matters, then the acceptance criteria \u2014
1173
+ each concrete and testable ("tapping X shows Y", "the endpoint returns 409 when Z"),
1174
+ never vague ("works well"). List what is out of scope. Put NO implementation detail
1175
+ here (no file names, no libraries). If a requirement is ambiguous, mark it rather
1176
+ than guess.
1177
+
1178
+ ## Step 3 \u2014 Clarify: resolve ambiguity, but don't stall
1179
+ Gather the ambiguities that would actually change what you build. Ask the
1180
+ highest-leverage ones \u2014 batched, at most ~3, phrased as concrete choices. For
1181
+ low-stakes unknowns, pick a sensible default and SAY so ("assuming X unless you tell
1182
+ me otherwise") instead of asking. On a conversational/mobile client every round-trip
1183
+ is expensive \u2014 don't pester; decide what you safely can.
1184
+
1185
+ ## Step 4 \u2014 Plan: the HOW, grounded and simple
1186
+ Design against the real code. Apply the simplicity gates before committing:
1187
+ - **Fewest moving parts** that satisfy the criteria. If you add a layer or
1188
+ abstraction, justify it or drop it.
1189
+ - **Use the framework/library directly** \u2014 don't wrap it for flexibility you don't
1190
+ need yet.
1191
+ - **Minimal blast radius** \u2014 touch what the change needs, nothing more.
1192
+ State the test strategy (what proves each criterion) and name the real risks. Keep
1193
+ the plan short.
1194
+
1195
+ ## Step 5 \u2014 Tasks: small, verifiable, ordered
1196
+ Split the plan into tasks that each end in something you can run and check. Mark
1197
+ independent ones as parallelizable. Each task is the smallest unit worth its own
1198
+ check. Sequence by dependency.
1199
+
1200
+ ## Step 6 \u2014 Implement: test-first by default
1201
+ For each task: write the test that would fail without the change, watch it fail, make
1202
+ it pass, keep it green. Follow the patterns you found in Step 1. Commit in logical
1203
+ units. Escape hatch: for a genuine spike or exploratory UI where test-first is
1204
+ impractical, say so explicitly and add the test right after \u2014 never skip it silently.
1205
+
1206
+ ## Step 7 \u2014 Verify + self-review (what separates "done" from "looks done")
1207
+ Return to the acceptance criteria and prove EACH one is met \u2014 run the tests, diff the
1208
+ behavior, look at the real output. Then review your own work adversarially:
1209
+ - What did I NOT test?
1210
+ - What did I change that I didn't need to?
1211
+ - What could this have broken (the blast radius)?
1212
+ - Does anything contradict the spec?
1213
+ Fix what you find before declaring done. "The tests I wrote pass" is not "it works".
1214
+
1215
+ ## Step 8 \u2014 Done + handoff
1216
+ Done means acceptance criteria met, tests green, no known regressions. Summarize what
1217
+ changed in plain terms. File any deferred work or follow-ups to beads (\`bd\`) so
1218
+ nothing is lost. Never claim done on unverified work.
1219
+
1220
+ ## Principles (the constitution)
1221
+ - Clarify before you build; verify before you call it done.
1222
+ - Testable beats descriptive \u2014 a criterion you can't check isn't one.
1223
+ - Grounded beats greenfield \u2014 fit the codebase that exists.
1224
+ - Simple beats clever \u2014 the least structure that works.
1225
+ - Scale the process to the task \u2014 ceremony on a typo is a bug.
1226
+ - Real work goes to beads, not throwaway files in someone's repo.`;
1227
+ var SPEC_DRIVEN_INSTRUCTION = `Follow spec-driven development, scaled to the task:
1228
+ 1. Right-size first. A trivial change (typo, one file, no unknowns) \u2192 just make it
1229
+ well and verify, no ceremony. A feature/ambiguous/risky change \u2192 spec \u2192 plan \u2192
1230
+ build \u2192 verify.
1231
+ 2. Ground in the real codebase before planning \u2014 read the existing patterns, tests,
1232
+ and constraints. Never assume; read first.
1233
+ 3. Specify the WHAT and WHY as testable acceptance criteria, not the HOW. Mark
1234
+ ambiguities instead of guessing.
1235
+ 4. Clarify only the highest-leverage unknowns (batch <=3, concrete choices); default
1236
+ the low-stakes ones and say so. Don't stall on round-trips.
1237
+ 5. Plan the simplest approach that fits the code: fewest moving parts, use libraries
1238
+ directly, minimal blast radius. State how each criterion will be tested.
1239
+ 6. Implement test-first by default; follow existing patterns; commit in logical units.
1240
+ 7. Verify EACH acceptance criterion (run tests, diff behavior), then self-review
1241
+ adversarially: what's untested? what did I change needlessly? what could I have
1242
+ broken? what contradicts the spec? Fix before declaring done.
1243
+ 8. Track deferred work in beads (bd), not scratch files. Simple beats clever; verify
1244
+ before done.`;
1245
+ var specDrivenDevelopmentSkill = {
1246
+ id: "spec-driven-development",
1247
+ name: "Spec-Driven Development",
1248
+ 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.`,
1249
+ source: "curated",
1250
+ delivery: {
1251
+ skillFile: { body: SPEC_DRIVEN_BODY },
1252
+ instruction: { body: SPEC_DRIVEN_INSTRUCTION }
1101
1253
  }
1102
1254
  };
1255
+
1256
+ // src/skills/registry.ts
1257
+ var SKILL_REGISTRY = {
1258
+ "code-review": codeReviewSkill,
1259
+ "resolve-conflicts": resolveConflictsSkill,
1260
+ "spec-driven-development": specDrivenDevelopmentSkill
1261
+ };
1103
1262
  function isSkillId(id) {
1104
1263
  return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
1105
1264
  }
@@ -1247,7 +1406,12 @@ var USER_EVENTS = {
1247
1406
  // VCS / PR Command Center — the backend publishes this after an agent finishes
1248
1407
  // reviewing a PR (verdict + comment count + findings), driving the mobile
1249
1408
  // completion screen + push. Mirrored in repo A's app-shared events.ts.
1250
- VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete"
1409
+ VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete",
1410
+ /** PR-review launch progress toast — the "Review with an agent" flow shows a
1411
+ * toast when the review runs server-side (Inngest). Mobile-only surface,
1412
+ * produced by api-v2 (the CLI neither produces nor consumes it). Mirrored in
1413
+ * repo A. */
1414
+ PR_REVIEW_LAUNCH: "pr_review_launch"
1251
1415
  };
1252
1416
 
1253
1417
  // src/preview-prompts.ts