instar 1.3.435 → 1.3.437

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 (59) hide show
  1. package/dashboard/index.html +2 -0
  2. package/dashboard/subscriptions.js +18 -8
  3. package/dist/commands/init.d.ts +17 -0
  4. package/dist/commands/init.d.ts.map +1 -1
  5. package/dist/commands/init.js +50 -0
  6. package/dist/commands/init.js.map +1 -1
  7. package/dist/commands/server.d.ts.map +1 -1
  8. package/dist/commands/server.js +6 -1
  9. package/dist/commands/server.js.map +1 -1
  10. package/dist/core/InUseAccountResolver.d.ts +77 -0
  11. package/dist/core/InUseAccountResolver.d.ts.map +1 -0
  12. package/dist/core/InUseAccountResolver.js +123 -0
  13. package/dist/core/InUseAccountResolver.js.map +1 -0
  14. package/dist/server/AgentServer.d.ts +1 -0
  15. package/dist/server/AgentServer.d.ts.map +1 -1
  16. package/dist/server/AgentServer.js +1 -0
  17. package/dist/server/AgentServer.js.map +1 -1
  18. package/dist/server/routes.d.ts +4 -0
  19. package/dist/server/routes.d.ts.map +1 -1
  20. package/dist/server/routes.js +20 -0
  21. package/dist/server/routes.js.map +1 -1
  22. package/package.json +2 -1
  23. package/skills/README.md +106 -0
  24. package/skills/agent-identity/SKILL.md +226 -0
  25. package/skills/agent-memory/SKILL.md +261 -0
  26. package/skills/agent-passport/SKILL.md +37 -0
  27. package/skills/agent-readiness/SKILL.md +55 -0
  28. package/skills/command-guard/SKILL.md +239 -0
  29. package/skills/credential-leak-detector/SKILL.md +377 -0
  30. package/skills/instar-dev/SKILL.md +223 -0
  31. package/skills/instar-dev/scripts/verify-proposal-derived-runbook.mjs +319 -0
  32. package/skills/instar-dev/scripts/write-trace.mjs +203 -0
  33. package/skills/instar-dev/templates/eli16-overview.md +43 -0
  34. package/skills/instar-dev/templates/side-effects-artifact.md +133 -0
  35. package/skills/instar-feedback/SKILL.md +285 -0
  36. package/skills/instar-identity/SKILL.md +290 -0
  37. package/skills/instar-scheduler/SKILL.md +259 -0
  38. package/skills/instar-session/SKILL.md +270 -0
  39. package/skills/instar-telegram/SKILL.md +259 -0
  40. package/skills/iterative-converging-audit/SKILL.md +96 -0
  41. package/skills/knowledge-base/SKILL.md +189 -0
  42. package/skills/smart-web-fetch/SKILL.md +241 -0
  43. package/skills/spec-converge/SKILL.md +249 -0
  44. package/skills/spec-converge/scripts/cross-model-review.mjs +155 -0
  45. package/skills/spec-converge/scripts/publish-spec-review.mjs +166 -0
  46. package/skills/spec-converge/scripts/write-convergence-tag.mjs +199 -0
  47. package/skills/spec-converge/templates/report.md +76 -0
  48. package/skills/spec-converge/templates/reviewer-adversarial.md +37 -0
  49. package/skills/spec-converge/templates/reviewer-cross-model.md +28 -0
  50. package/skills/spec-converge/templates/reviewer-integration.md +39 -0
  51. package/skills/spec-converge/templates/reviewer-lessons-aware.md +101 -0
  52. package/skills/spec-converge/templates/reviewer-scalability.md +35 -0
  53. package/skills/spec-converge/templates/reviewer-security.md +36 -0
  54. package/skills/systematic-debugging/SKILL.md +222 -0
  55. package/src/data/builtin-manifest.json +47 -47
  56. package/upgrades/1.3.436.md +19 -0
  57. package/upgrades/1.3.437.md +29 -0
  58. package/upgrades/side-effects/builtin-skill-install-single-source.md +80 -0
  59. package/upgrades/side-effects/subscription-inuse-account.md +26 -0
@@ -0,0 +1,29 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: minor -->
5
+
6
+ ## What Changed
7
+
8
+ Every Instar agent now receives the **developer-skill toolkit** — the skills Instar uses to develop itself: `spec-converge`, `instar-dev`, `systematic-debugging`, `smart-web-fetch`, `knowledge-base`, `instar-scheduler`, `agent-memory`, `agent-identity`, `instar-identity`, `credential-leak-detector`.
9
+
10
+ These skills were git-tracked under `skills/` but **no code installed them**, and the directory was not in `package.json` `files[]` — so they shipped in no package and installed for no agent, including the main dev agent. That violated **Agent Awareness** ("a capability the agent doesn't know about, it effectively doesn't have") and **Framework-Agnostic** ("one shared source of truth, never hand-maintained per engine").
11
+
12
+ The fix: an authored `BUNDLED_DEV_SKILLS` allowlist + a generic `installBundledDevSkills()` copy-loop in `init.ts` (install-if-missing, recursive for `scripts/`/`templates/` subdirs); `skills/` added to `files[]` so the sources ship; the three port-hardcoded skill files rewritten to `${INSTAR_PORT:-4040}`; and a ratchet test that locks the "tracked-but-never-shipped" class shut. Existing agents receive the skills through the existing `migrateBuiltinSkills` path on update — no new migrator. `skills/` stays the single source (it is referenced there by `SourceTreeGuard`/`crossModelReviewer`).
13
+
14
+ This is the bounded, lowest-risk slice; the full single-source consolidation (materialize the inline-dict skills, generator-validates-against-allowlist) is the documented follow-on in the spec.
15
+
16
+ ## What to Tell Your User
17
+
18
+ Internal capability — nothing to configure. Your agent now has the full set of Instar-development tools — the spec convergence cycle, the instar-dev workflow, structured debugging, and more — so it can help develop and improve Instar with the same tools Instar uses on itself.
19
+
20
+ ## Summary of New Capabilities
21
+
22
+ | Capability | How to use |
23
+ |-----------|-----------|
24
+ | The developer-skill toolkit installs to every agent | Automatic on `init` and on update; the skills appear as slash commands in `.claude/skills/` |
25
+ | Add a skill to the canonical bundled set | Add the slug to `BUNDLED_DEV_SKILLS` in `src/commands/init.ts`; the ratchet test enforces it ships + installs |
26
+
27
+ ## Evidence
28
+
29
+ Spec went through a 3-round `/spec-converge` (5 internal reviewers + a gemini cross-model pass) which caught 4 real flaws pre-code; operator-approved. Ratchet test `tests/unit/builtin-dev-skills.test.ts` — 6 assertions (source-present, ships via `files[]`, materializes-on-install, subdirs carried, no bare `localhost:<port>`, idempotent), green. `tsc --noEmit` clean. Convergence report: `docs/specs/reports/builtin-skill-install-single-source-convergence.md`.
@@ -0,0 +1,80 @@
1
+ # Side-Effects Review — Built-in Skill Install (bundled dev toolkit)
2
+
3
+ **Version / slug:** `builtin-skill-install-single-source`
4
+ **Date:** `2026-06-09`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required (3-round /spec-converge with 5 internal reviewers + gemini external already performed; see convergence report)`
7
+
8
+ ## Summary of the change
9
+
10
+ Ships the developer-skill toolkit (`spec-converge`, `instar-dev`, `systematic-debugging`,
11
+ `smart-web-fetch`, `knowledge-base`, `instar-scheduler`, `agent-memory`, `agent-identity`,
12
+ `instar-identity`, `credential-leak-detector`) to every agent. These skills lived in the
13
+ git-tracked `skills/` dir but no code installed them and the dir was not in `package.json
14
+ files[]`, so they reached no agent. The fix: an authored `BUNDLED_DEV_SKILLS` allowlist + a
15
+ generic `installBundledDevSkills()` copy-loop in `init.ts` (install-if-missing, recursive for
16
+ subdirs), `skills/` added to `files[]` so the sources ship, the 3 port-hardcoded files rewritten
17
+ to `${INSTAR_PORT:-4040}`, and a ratchet test locking the "tracked-but-never-shipped" class shut.
18
+
19
+ This is the bounded, lowest-risk slice of the converged spec; the full single-source
20
+ consolidation (materialize the 16 inline skills, generator-validates-against-allowlist, files
21
+ glob) is the documented follow-on.
22
+
23
+ ## Decision-point inventory
24
+
25
+ No new block/allow/route gate. The only decision is install-if-missing vs overwrite (chosen:
26
+ install-if-missing, preserving user customizations — verified by an idempotency test).
27
+
28
+ ## 1. Over-block
29
+
30
+ None — the change adds files; it rejects no inputs. An agent that already has a same-named
31
+ custom skill keeps it untouched (install-if-missing), verified by the idempotency test.
32
+
33
+ ## 2. Under-block
34
+
35
+ The ratchet test covers the 10 allowlisted skills (source-present, ships, materializes, no bare
36
+ port, idempotent) but does NOT yet assert `npm pack --dry-run` contents directly (it asserts
37
+ `skills` ∈ `files[]` as the ship-proxy). The full generator-validation ratchet is the documented
38
+ follow-on. No safety-relevant under-block.
39
+
40
+ ## 3. Level-of-abstraction fit
41
+
42
+ Right layer: `installBuiltinSkills` is the existing install entry point; `installBundledDevSkills`
43
+ sits beside `installBuildSkill`/`installAutonomousSkill` (same proven bundled-copy pattern).
44
+ `skills/` stays the single source (referenced by SourceTreeGuard/crossModelReviewer) — relocating
45
+ would have broken those references.
46
+
47
+ ## 4. Signal vs authority compliance
48
+
49
+ N/A — no new gate, no blocking authority, no LLM judgment. Pure deterministic file install.
50
+
51
+ ## 5. Interactions
52
+
53
+ - Reuses the existing `migrateBuiltinSkills` → `installBuiltinSkills` path (PostUpdateMigrator:1776),
54
+ so existing agents receive the skills on update with NO new migrator (Migration Parity mechanism #5).
55
+ - Preserves the `claudeEnabled` gate (codex-only agents still skip `.claude/skills/`).
56
+ - `installBundledDevSkills` resolves bundled source via `__dirname/../../skills` — correct in both
57
+ the published package (dist/ + skills/ are siblings at package root) and vitest.
58
+
59
+ ## 6. External surfaces
60
+
61
+ Adds 10 slash commands to every agent's `.claude/skills/`. `skills/` is now shipped in the npm
62
+ package (size: ~250KB of markdown). No new HTTP route, no message surface, no auth change.
63
+
64
+ ## 7. Rollback cost
65
+
66
+ Low and clean. The change is additive + install-if-missing. Back-out = revert the commit; already
67
+ installed skill dirs are inert markdown (an agent simply has extra slash commands). No state
68
+ migration, no destructive op, no irreversibility.
69
+
70
+ ## Conclusion
71
+
72
+ Low-risk, additive, fleet-wide install of the dev toolkit, behind a ratchet test, reusing the
73
+ established bundled-skill pattern and the existing migrator. Operator-approved (D6 = fleet-wide).
74
+
75
+ ## Evidence pointers
76
+
77
+ - Converged spec: `docs/specs/BUILTIN-SKILL-INSTALL-SINGLE-SOURCE.md` (review-convergence + approved).
78
+ - Convergence report (3 rounds, 4 bugs caught): `docs/specs/reports/builtin-skill-install-single-source-convergence.md`.
79
+ - Ratchet test: `tests/unit/builtin-dev-skills.test.ts` (6 assertions, green).
80
+ - `tsc --noEmit` clean; CI push suite green except 1 unrelated environmental E2E flake (LLM-unavailable in local run).
@@ -0,0 +1,26 @@
1
+ # Side-effects review — subscription-pool "in-use account" dashboard surface
2
+
3
+ ## What changed
4
+ - New `src/core/InUseAccountResolver.ts`: resolves which pool account the agent is CURRENTLY running on, by probing `claude auth status` (the authoritative active-account surface) and matching its email to a pool account. Read-only; probe + clock injected; result cached (TTL 60s) with concurrent-probe coalescing.
5
+ - `src/server/routes.ts`: new `GET /subscription-pool/in-use` → `{ enabled, activeAccountId, activeEmail }`. Registered before `/subscription-pool/:id` (literal beats param). Lazy-constructs a resolver if none on ctx; never 500s/503s.
6
+ - `src/server/AgentServer.ts` + `src/commands/server.ts`: wire a single shared resolver instance through the ctor → RouteContext (so the cache is honored).
7
+ - `dashboard/subscriptions.js`: controller fetches `/in-use` (best-effort, its failure can't blank the accounts list) and badges the in-use account card. `renderAccounts` gained an OPTIONAL trailing `inUseAccountId` param (backward compatible — existing callers/tests unaffected).
8
+ - `dashboard/index.html`: CSS for the in-use badge + card highlight.
9
+
10
+ ## Blast radius
11
+ - Purely ADDITIVE + READ-ONLY. No change to session launch, account selection, swapping, or any mutation path. A pool of zero accounts → route answers `{ enabled:false }`; single-account agents unaffected.
12
+ - The only new side effect is spawning `claude auth status` (read-only, 15s timeout, maxBuffer bounded) at most once per 60s when the dashboard `/in-use` route is hit. If `claude` is missing or errors, the resolver degrades to `activeAccountId:null` (no badge) — never throws, never blocks.
13
+
14
+ ## Framework generality
15
+ - Does NOT touch the session launch/inject abstraction (frameworkSessionLaunch / MessageDelivery). The resolver is claude-code-specific by design (it answers "which Claude account"), and `matchAccountByEmail` filters to anthropic/claude-code accounts, so a codex/gemini account can never be mis-reported as the active Claude login.
16
+
17
+ ## Honest scope note
18
+ - This is the DISPLAY half of the request ("show which account is in use"). It reflects reality: normal sessions run on the default config, which this resolves authoritatively. The DETERMINISM half (pinning sessions to an explicit pool account so the default is never ambiguous) touches the critical session-launch path and is intentionally a separate, carefully-reviewed change — not bundled here. <!-- tracked: CMT-1185 -->
19
+
20
+ ## Migration parity
21
+ - No agent-installed files change (no settings.json, config defaults, CLAUDE.md template, hooks, or skills). New route + dashboard asset ship with the package; existing agents get them on update. No `PostUpdateMigrator` entry needed.
22
+
23
+ ## Tests
24
+ - Unit: `in-use-account-resolver.test.ts` (matcher both sides, resolve, cache TTL, coalescing, failure-degradation); `subscriptions-render.test.ts` (in-use badge present/absent).
25
+ - Integration: `subscription-inuse-route.test.ts` (HTTP route: match / no-match / dark / does-not-shadow-`:id`).
26
+ - E2E: `subscription-inuse-lifecycle.test.ts` (feature-alive: 200 in dark + live).