codeam-cli 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.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.js +178 -30
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to `codeam-cli` are documented here.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.61.27] — 2026-07-24
8
+
9
+ ### Added
10
+
11
+ - **shared:** Add spec-driven-development skill + split skills into per-file modules
12
+
13
+ ### Fixed
14
+
15
+ - **shared:** Add PR_REVIEW_LAUNCH to USER_EVENTS (sync A↔B drift)
16
+
17
+ ## [2.61.26] — 2026-07-23
18
+
19
+ ### Fixed
20
+
21
+ - **cli:** Classify 'OAuth session expired … could not be refreshed' as an auth failure
22
+
7
23
  ## [2.61.25] — 2026-07-23
8
24
 
9
25
  ### Fixed
package/dist/index.js CHANGED
@@ -672,6 +672,31 @@ var INTEGRATION_REGISTRY = {
672
672
  }
673
673
  }
674
674
  },
675
+ microsoft_teams: {
676
+ id: "microsoft_teams",
677
+ name: "Microsoft Teams",
678
+ icon: "microsoft_teams",
679
+ category: "comms",
680
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
681
+ // agent will post review pings + read threads AS THE USER over Microsoft Graph
682
+ // once the provider lands. `enabled:false` renders it as a dimmed "coming
683
+ // soon" tile inside the (live) comms category.
684
+ enabled: false,
685
+ auth: { kind: "oauth_redirect" },
686
+ delivery: {}
687
+ },
688
+ google_chat: {
689
+ id: "google_chat",
690
+ name: "Google Chat",
691
+ icon: "google_chat",
692
+ category: "comms",
693
+ // COMING SOON — placeholder catalog entry (no OAuth provider / MCP yet). The
694
+ // agent will post review pings + read spaces AS THE USER over the Google Chat
695
+ // API once the provider lands. `enabled:false` → dimmed "coming soon" tile.
696
+ enabled: false,
697
+ auth: { kind: "oauth_redirect" },
698
+ delivery: {}
699
+ },
675
700
  notion: {
676
701
  id: "notion",
677
702
  name: "Notion",
@@ -806,7 +831,7 @@ function isKnownIntegrationId(id) {
806
831
  return id in INTEGRATION_REGISTRY;
807
832
  }
808
833
 
809
- // ../../packages/shared/src/skills/registry.ts
834
+ // ../../packages/shared/src/skills/code-review.ts
810
835
  var CODE_REVIEW_BODY = `Use this skill when reviewing a pull request. It defines what a high-signal
811
836
  review looks like so your inline comments are worth the author's time.
812
837
 
@@ -839,6 +864,18 @@ line, each led by a severity tag (blocker/should-fix/nit) and a concrete reason
839
864
  (the failure scenario or risk), not a restatement of the diff. If the change is
840
865
  correct and well-tested, approve and say so \u2014 finding nothing is a valid outcome.
841
866
  Review only the diff and its direct blast radius; do not demand unrelated refactors.`;
867
+ var codeReviewSkill = {
868
+ id: "code-review",
869
+ name: "Code Review",
870
+ description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
871
+ source: "curated",
872
+ delivery: {
873
+ skillFile: { body: CODE_REVIEW_BODY },
874
+ instruction: { body: CODE_REVIEW_INSTRUCTION }
875
+ }
876
+ };
877
+
878
+ // ../../packages/shared/src/skills/resolve-conflicts.ts
842
879
  var RESOLVE_CONFLICTS_BODY = `Use this skill when resolving merge conflicts on a pull request. The goal is a
843
880
  merge that preserves BOTH sides' intent, not one that just makes the file compile.
844
881
 
@@ -862,28 +899,134 @@ and prefer a union of intents; drop a side only when the two are mutually exclus
862
899
  keeping the side that matches the PR's purpose. Leave no conflict markers behind
863
900
  (grep for them). Regenerate lockfiles rather than hand-merging them. The result must
864
901
  build and pass tests \u2014 run them \u2014 before you commit and push.`;
865
- var SKILL_REGISTRY = {
866
- "code-review": {
867
- id: "code-review",
868
- name: "Code Review",
869
- description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
870
- source: "curated",
871
- delivery: {
872
- skillFile: { body: CODE_REVIEW_BODY },
873
- instruction: { body: CODE_REVIEW_INSTRUCTION }
874
- }
875
- },
876
- "resolve-conflicts": {
877
- id: "resolve-conflicts",
878
- name: "Resolve Conflicts",
879
- description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
880
- source: "curated",
881
- delivery: {
882
- skillFile: { body: RESOLVE_CONFLICTS_BODY },
883
- instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
884
- }
902
+ var resolveConflictsSkill = {
903
+ id: "resolve-conflicts",
904
+ name: "Resolve Conflicts",
905
+ description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
906
+ source: "curated",
907
+ delivery: {
908
+ skillFile: { body: RESOLVE_CONFLICTS_BODY },
909
+ instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
910
+ }
911
+ };
912
+
913
+ // ../../packages/shared/src/skills/spec-driven-development.ts
914
+ var SPEC_DRIVEN_BODY = `Use this skill for any coding task that isn't a trivial one-liner. Build the right
915
+ thing, provably, with the least ceremony the task warrants \u2014 specification before
916
+ code, but its depth scales to the work. Skipping it yields code that looks right yet
917
+ solves the wrong problem or breaks something you never checked.
918
+
919
+ ## Step 0 \u2014 Right-size the work (always first)
920
+ - **Quick** \u2014 a typo, copy tweak, one-line fix, a single file with no unknowns.
921
+ No ceremony: make the change, run the relevant test/build, confirm it. Do NOT
922
+ write a spec for a typo.
923
+ - **Standard** \u2014 a feature or fix across a few files, some unknowns, a testable
924
+ outcome. A light inline pass (a 2-3 sentence spec + a short plan), then build
925
+ test-first, then verify. No scaffolding files.
926
+ - **Deep** \u2014 large, ambiguous, risky, or touching many files / shared contracts /
927
+ data / auth. The full flow below, tracking the work in beads (\`bd\`), not scratch
928
+ files.
929
+ When unsure, start one level lighter and escalate the moment real ambiguity or risk
930
+ appears. State which level you picked in one line.
931
+
932
+ ## Step 1 \u2014 Ground in the real codebase (before specifying anything non-trivial)
933
+ You are almost never in a greenfield. Before you spec or plan, survey the real code:
934
+ the existing patterns for this kind of change, the files you'll touch, the test
935
+ setup, prior art, and the constraints (auth, data, shared types, CLAUDE.md
936
+ conventions). A spec written in a vacuum produces a plan that fights the codebase.
937
+ Read first; never assume.
938
+
939
+ ## Step 2 \u2014 Specify: the WHAT and WHY (not the HOW)
940
+ State the user-visible outcome and why it matters, then the acceptance criteria \u2014
941
+ each concrete and testable ("tapping X shows Y", "the endpoint returns 409 when Z"),
942
+ never vague ("works well"). List what is out of scope. Put NO implementation detail
943
+ here (no file names, no libraries). If a requirement is ambiguous, mark it rather
944
+ than guess.
945
+
946
+ ## Step 3 \u2014 Clarify: resolve ambiguity, but don't stall
947
+ Gather the ambiguities that would actually change what you build. Ask the
948
+ highest-leverage ones \u2014 batched, at most ~3, phrased as concrete choices. For
949
+ low-stakes unknowns, pick a sensible default and SAY so ("assuming X unless you tell
950
+ me otherwise") instead of asking. On a conversational/mobile client every round-trip
951
+ is expensive \u2014 don't pester; decide what you safely can.
952
+
953
+ ## Step 4 \u2014 Plan: the HOW, grounded and simple
954
+ Design against the real code. Apply the simplicity gates before committing:
955
+ - **Fewest moving parts** that satisfy the criteria. If you add a layer or
956
+ abstraction, justify it or drop it.
957
+ - **Use the framework/library directly** \u2014 don't wrap it for flexibility you don't
958
+ need yet.
959
+ - **Minimal blast radius** \u2014 touch what the change needs, nothing more.
960
+ State the test strategy (what proves each criterion) and name the real risks. Keep
961
+ the plan short.
962
+
963
+ ## Step 5 \u2014 Tasks: small, verifiable, ordered
964
+ Split the plan into tasks that each end in something you can run and check. Mark
965
+ independent ones as parallelizable. Each task is the smallest unit worth its own
966
+ check. Sequence by dependency.
967
+
968
+ ## Step 6 \u2014 Implement: test-first by default
969
+ For each task: write the test that would fail without the change, watch it fail, make
970
+ it pass, keep it green. Follow the patterns you found in Step 1. Commit in logical
971
+ units. Escape hatch: for a genuine spike or exploratory UI where test-first is
972
+ impractical, say so explicitly and add the test right after \u2014 never skip it silently.
973
+
974
+ ## Step 7 \u2014 Verify + self-review (what separates "done" from "looks done")
975
+ Return to the acceptance criteria and prove EACH one is met \u2014 run the tests, diff the
976
+ behavior, look at the real output. Then review your own work adversarially:
977
+ - What did I NOT test?
978
+ - What did I change that I didn't need to?
979
+ - What could this have broken (the blast radius)?
980
+ - Does anything contradict the spec?
981
+ Fix what you find before declaring done. "The tests I wrote pass" is not "it works".
982
+
983
+ ## Step 8 \u2014 Done + handoff
984
+ Done means acceptance criteria met, tests green, no known regressions. Summarize what
985
+ changed in plain terms. File any deferred work or follow-ups to beads (\`bd\`) so
986
+ nothing is lost. Never claim done on unverified work.
987
+
988
+ ## Principles (the constitution)
989
+ - Clarify before you build; verify before you call it done.
990
+ - Testable beats descriptive \u2014 a criterion you can't check isn't one.
991
+ - Grounded beats greenfield \u2014 fit the codebase that exists.
992
+ - Simple beats clever \u2014 the least structure that works.
993
+ - Scale the process to the task \u2014 ceremony on a typo is a bug.
994
+ - Real work goes to beads, not throwaway files in someone's repo.`;
995
+ var SPEC_DRIVEN_INSTRUCTION = `Follow spec-driven development, scaled to the task:
996
+ 1. Right-size first. A trivial change (typo, one file, no unknowns) \u2192 just make it
997
+ well and verify, no ceremony. A feature/ambiguous/risky change \u2192 spec \u2192 plan \u2192
998
+ build \u2192 verify.
999
+ 2. Ground in the real codebase before planning \u2014 read the existing patterns, tests,
1000
+ and constraints. Never assume; read first.
1001
+ 3. Specify the WHAT and WHY as testable acceptance criteria, not the HOW. Mark
1002
+ ambiguities instead of guessing.
1003
+ 4. Clarify only the highest-leverage unknowns (batch <=3, concrete choices); default
1004
+ the low-stakes ones and say so. Don't stall on round-trips.
1005
+ 5. Plan the simplest approach that fits the code: fewest moving parts, use libraries
1006
+ directly, minimal blast radius. State how each criterion will be tested.
1007
+ 6. Implement test-first by default; follow existing patterns; commit in logical units.
1008
+ 7. Verify EACH acceptance criterion (run tests, diff behavior), then self-review
1009
+ adversarially: what's untested? what did I change needlessly? what could I have
1010
+ broken? what contradicts the spec? Fix before declaring done.
1011
+ 8. Track deferred work in beads (bd), not scratch files. Simple beats clever; verify
1012
+ before done.`;
1013
+ var specDrivenDevelopmentSkill = {
1014
+ id: "spec-driven-development",
1015
+ name: "Spec-Driven Development",
1016
+ 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.`,
1017
+ source: "curated",
1018
+ delivery: {
1019
+ skillFile: { body: SPEC_DRIVEN_BODY },
1020
+ instruction: { body: SPEC_DRIVEN_INSTRUCTION }
885
1021
  }
886
1022
  };
1023
+
1024
+ // ../../packages/shared/src/skills/registry.ts
1025
+ var SKILL_REGISTRY = {
1026
+ "code-review": codeReviewSkill,
1027
+ "resolve-conflicts": resolveConflictsSkill,
1028
+ "spec-driven-development": specDrivenDevelopmentSkill
1029
+ };
887
1030
  function isSkillId(id) {
888
1031
  return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
889
1032
  }
@@ -1024,7 +1167,12 @@ var USER_EVENTS = {
1024
1167
  // VCS / PR Command Center — the backend publishes this after an agent finishes
1025
1168
  // reviewing a PR (verdict + comment count + findings), driving the mobile
1026
1169
  // completion screen + push. Mirrored in repo A's app-shared events.ts.
1027
- VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete"
1170
+ VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete",
1171
+ /** PR-review launch progress toast — the "Review with an agent" flow shows a
1172
+ * toast when the review runs server-side (Inngest). Mobile-only surface,
1173
+ * produced by api-v2 (the CLI neither produces nor consumes it). Mirrored in
1174
+ * repo A. */
1175
+ PR_REVIEW_LAUNCH: "pr_review_launch"
1028
1176
  };
1029
1177
 
1030
1178
  // ../../packages/shared/src/preview-prompts.ts
@@ -6117,7 +6265,7 @@ function readAnonId() {
6117
6265
  }
6118
6266
  function superProperties() {
6119
6267
  return {
6120
- cliVersion: true ? "2.61.26" : "0.0.0-dev",
6268
+ cliVersion: true ? "2.61.28" : "0.0.0-dev",
6121
6269
  nodeVersion: process.version,
6122
6270
  platform: process.platform,
6123
6271
  arch: process.arch,
@@ -6298,7 +6446,7 @@ var os4 = __toESM(require("os"));
6298
6446
  // package.json
6299
6447
  var package_default = {
6300
6448
  name: "codeam-cli",
6301
- version: "2.61.26",
6449
+ version: "2.61.28",
6302
6450
  description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
6303
6451
  type: "commonjs",
6304
6452
  main: "dist/index.js",
@@ -7469,7 +7617,7 @@ var CommandRelayService = class _CommandRelayService {
7469
7617
  // fresh + clear the "CLI update available" banner after a self-update
7470
7618
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
7471
7619
  // pair/reconnect). Older backends ignore the extra field.
7472
- ..."2.61.26" ? { ideVersion: "2.61.26" } : {}
7620
+ ..."2.61.28" ? { ideVersion: "2.61.28" } : {}
7473
7621
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
7474
7622
  }
7475
7623
  /**
@@ -18331,7 +18479,7 @@ async function autoUpgradeBeforeCriticalCommand() {
18331
18479
  if (process.env.NODE_ENV === "test") return;
18332
18480
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18333
18481
  if (process.env.CI) return;
18334
- const current = true ? "2.61.26" : null;
18482
+ const current = true ? "2.61.28" : null;
18335
18483
  if (!current) return;
18336
18484
  const cache = readCache();
18337
18485
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18348,7 +18496,7 @@ function checkForUpdates() {
18348
18496
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18349
18497
  if (process.env.CI) return;
18350
18498
  if (!process.stdout.isTTY) return;
18351
- const current = true ? "2.61.26" : null;
18499
+ const current = true ? "2.61.28" : null;
18352
18500
  if (!current) return;
18353
18501
  const cache = readCache();
18354
18502
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18368,7 +18516,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
18368
18516
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
18369
18517
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
18370
18518
  function currentCliVersion() {
18371
- return true ? "2.61.26" : null;
18519
+ return true ? "2.61.28" : null;
18372
18520
  }
18373
18521
  function runCmd(cmd, args2, timeoutMs) {
18374
18522
  return new Promise((resolve8) => {
@@ -38361,7 +38509,7 @@ function checkChokidar() {
38361
38509
  }
38362
38510
  async function doctor(args2 = []) {
38363
38511
  const json = args2.includes("--json");
38364
- const cliVersion = true ? "2.61.26" : "0.0.0-dev";
38512
+ const cliVersion = true ? "2.61.28" : "0.0.0-dev";
38365
38513
  const apiBase2 = resolveApiBaseUrl();
38366
38514
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
38367
38515
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -38872,7 +39020,7 @@ async function mcpRun(args2) {
38872
39020
  // src/commands/version.ts
38873
39021
  var import_picocolors15 = __toESM(require("picocolors"));
38874
39022
  function version2() {
38875
- const v = true ? "2.61.26" : "unknown";
39023
+ const v = true ? "2.61.28" : "unknown";
38876
39024
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
38877
39025
  }
38878
39026
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.61.26",
3
+ "version": "2.61.28",
4
4
  "description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",