instar 1.3.202 → 1.3.204
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/cli.js +4 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.d.ts +2 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +2 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/route.d.ts.map +1 -1
- package/dist/commands/route.js +2 -0
- package/dist/commands/route.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +10 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/setup-wizard/gemini-driver.d.ts +46 -0
- package/dist/commands/setup-wizard/gemini-driver.d.ts.map +1 -0
- package/dist/commands/setup-wizard/gemini-driver.js +645 -0
- package/dist/commands/setup-wizard/gemini-driver.js.map +1 -0
- package/dist/commands/setup-wizard/model-constants.d.ts +7 -0
- package/dist/commands/setup-wizard/model-constants.d.ts.map +1 -1
- package/dist/commands/setup-wizard/model-constants.js +7 -0
- package/dist/commands/setup-wizard/model-constants.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +53 -21
- package/dist/commands/setup.js.map +1 -1
- package/dist/core/Config.d.ts +12 -2
- package/dist/core/Config.d.ts.map +1 -1
- package/dist/core/Config.js +36 -10
- package/dist/core/Config.js.map +1 -1
- package/dist/core/FrameworkSessionStore.d.ts +2 -9
- package/dist/core/FrameworkSessionStore.d.ts.map +1 -1
- package/dist/core/FrameworkSessionStore.js +16 -0
- package/dist/core/FrameworkSessionStore.js.map +1 -1
- package/dist/core/GeminiCliIntelligenceProvider.d.ts +44 -0
- package/dist/core/GeminiCliIntelligenceProvider.d.ts.map +1 -0
- package/dist/core/GeminiCliIntelligenceProvider.js +65 -0
- package/dist/core/GeminiCliIntelligenceProvider.js.map +1 -0
- package/dist/core/IdentityRenderer.d.ts.map +1 -1
- package/dist/core/IdentityRenderer.js +6 -3
- package/dist/core/IdentityRenderer.js.map +1 -1
- package/dist/core/LeaseCoordinator.d.ts +22 -0
- package/dist/core/LeaseCoordinator.d.ts.map +1 -1
- package/dist/core/LeaseCoordinator.js +33 -0
- package/dist/core/LeaseCoordinator.js.map +1 -1
- package/dist/core/MultiMachineCoordinator.d.ts.map +1 -1
- package/dist/core/MultiMachineCoordinator.js +11 -1
- package/dist/core/MultiMachineCoordinator.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +7 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/PreCompactionFlush.d.ts +3 -1
- package/dist/core/PreCompactionFlush.d.ts.map +1 -1
- package/dist/core/PreCompactionFlush.js +3 -1
- package/dist/core/PreCompactionFlush.js.map +1 -1
- package/dist/core/ResumeValidator.d.ts +1 -1
- package/dist/core/ResumeValidator.d.ts.map +1 -1
- package/dist/core/TopicFrameworksStore.d.ts.map +1 -1
- package/dist/core/TopicFrameworksStore.js +1 -0
- package/dist/core/TopicFrameworksStore.js.map +1 -1
- package/dist/core/TopicResumeMap.d.ts.map +1 -1
- package/dist/core/TopicResumeMap.js +13 -0
- package/dist/core/TopicResumeMap.js.map +1 -1
- package/dist/core/frameworkSessionLaunch.d.ts.map +1 -1
- package/dist/core/frameworkSessionLaunch.js +73 -0
- package/dist/core/frameworkSessionLaunch.js.map +1 -1
- package/dist/core/intelligenceProviderFactory.d.ts +8 -1
- package/dist/core/intelligenceProviderFactory.d.ts.map +1 -1
- package/dist/core/intelligenceProviderFactory.js +13 -1
- package/dist/core/intelligenceProviderFactory.js.map +1 -1
- package/dist/core/types.d.ts +6 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/messaging/shared/telegramRelayPrompt.d.ts +1 -1
- package/dist/messaging/shared/telegramRelayPrompt.d.ts.map +1 -1
- package/dist/messaging/shared/telegramRelayPrompt.js.map +1 -1
- package/dist/monitoring/CompactionSentinel.d.ts +2 -0
- package/dist/monitoring/CompactionSentinel.d.ts.map +1 -1
- package/dist/monitoring/CompactionSentinel.js +10 -0
- package/dist/monitoring/CompactionSentinel.js.map +1 -1
- package/dist/monitoring/RateLimitSentinel.d.ts +2 -0
- package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -1
- package/dist/monitoring/RateLimitSentinel.js +15 -1
- package/dist/monitoring/RateLimitSentinel.js.map +1 -1
- package/dist/monitoring/SessionReaper.d.ts +1 -1
- package/dist/monitoring/SessionReaper.d.ts.map +1 -1
- package/dist/monitoring/SessionReaper.js +7 -0
- package/dist/monitoring/SessionReaper.js.map +1 -1
- package/dist/monitoring/frameworkActivitySignals.d.ts.map +1 -1
- package/dist/monitoring/frameworkActivitySignals.js +17 -0
- package/dist/monitoring/frameworkActivitySignals.js.map +1 -1
- package/dist/monitoring/frameworkProcessSignals.d.ts.map +1 -1
- package/dist/monitoring/frameworkProcessSignals.js +15 -0
- package/dist/monitoring/frameworkProcessSignals.js.map +1 -1
- package/dist/providers/adapters/gemini-cli/capabilities.d.ts +28 -0
- package/dist/providers/adapters/gemini-cli/capabilities.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/capabilities.js +38 -0
- package/dist/providers/adapters/gemini-cli/capabilities.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/config.d.ts +50 -0
- package/dist/providers/adapters/gemini-cli/config.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/config.js +36 -0
- package/dist/providers/adapters/gemini-cli/config.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/control/geminiHardKill.d.ts +19 -0
- package/dist/providers/adapters/gemini-cli/control/geminiHardKill.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/control/geminiHardKill.js +67 -0
- package/dist/providers/adapters/gemini-cli/control/geminiHardKill.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/credentials.d.ts +40 -0
- package/dist/providers/adapters/gemini-cli/credentials.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/credentials.js +41 -0
- package/dist/providers/adapters/gemini-cli/credentials.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/errors.d.ts +23 -0
- package/dist/providers/adapters/gemini-cli/errors.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/errors.js +41 -0
- package/dist/providers/adapters/gemini-cli/errors.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/index.d.ts +38 -0
- package/dist/providers/adapters/gemini-cli/index.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/index.js +66 -0
- package/dist/providers/adapters/gemini-cli/index.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/models.d.ts +29 -0
- package/dist/providers/adapters/gemini-cli/models.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/models.js +43 -0
- package/dist/providers/adapters/gemini-cli/models.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionId.d.ts +26 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionId.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionId.js +52 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionId.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionPaths.d.ts +72 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionPaths.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionPaths.js +202 -0
- package/dist/providers/adapters/gemini-cli/observability/sessionPaths.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/transport/geminiSpawn.d.ts +79 -0
- package/dist/providers/adapters/gemini-cli/transport/geminiSpawn.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/transport/geminiSpawn.js +221 -0
- package/dist/providers/adapters/gemini-cli/transport/geminiSpawn.js.map +1 -0
- package/dist/providers/adapters/gemini-cli/transport/oneShotCompletion.d.ts +21 -0
- package/dist/providers/adapters/gemini-cli/transport/oneShotCompletion.d.ts.map +1 -0
- package/dist/providers/adapters/gemini-cli/transport/oneShotCompletion.js +80 -0
- package/dist/providers/adapters/gemini-cli/transport/oneShotCompletion.js.map +1 -0
- package/dist/providers/parity/rules/skillParityRule.d.ts.map +1 -1
- package/dist/providers/parity/rules/skillParityRule.js +8 -0
- package/dist/providers/parity/rules/skillParityRule.js.map +1 -1
- package/dist/threadline/RelayGroundingPreamble.d.ts.map +1 -1
- package/dist/threadline/RelayGroundingPreamble.js +12 -0
- package/dist/threadline/RelayGroundingPreamble.js.map +1 -1
- package/dist/threadline/ThreadResumeMap.d.ts.map +1 -1
- package/dist/threadline/ThreadResumeMap.js +14 -0
- package/dist/threadline/ThreadResumeMap.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +48 -48
- package/upgrades/1.3.203.md +30 -0
- package/upgrades/1.3.204.md +26 -0
- package/upgrades/side-effects/APPRENTICESHIP-STEP2-GEMINI-RUNTIME-ADAPTER-SPEC.md +78 -0
- package/upgrades/side-effects/gemini-hybrid-setup-driver-eli16.md +40 -0
- package/upgrades/side-effects/gemini-hybrid-setup-driver.md +88 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Gemini Hybrid Setup Driver — Plain-English Overview
|
|
2
|
+
|
|
3
|
+
> The one-line version: Gemini setup now follows the same code-owned wizard shape as Codex, so Gemini can help with friendly wording without being asked to run a Claude-specific setup script.
|
|
4
|
+
|
|
5
|
+
## The problem in one breath
|
|
6
|
+
|
|
7
|
+
The Gemini setup path was technically selectable, but the main wizard still treated Gemini like a prose wrapper around the Claude setup skill. It asked Gemini to read a Claude-authored file and follow instructions that assumed Claude-style tools and behavior. That is exactly how we got a broken setup review: Gemini looked for a tool named like a shell runner, but that tool does not exist in Gemini's real tool set.
|
|
8
|
+
|
|
9
|
+
## What already exists
|
|
10
|
+
|
|
11
|
+
- **The shared setup state machine** — Instar already has a deterministic wizard spine for the Codex setup path. It owns the questions, answer validation, transitions, and setup actions.
|
|
12
|
+
- **The Gemini CLI adapter** — Instar already knows how to run Gemini as a one-shot command using a verified model and the normal approval mode.
|
|
13
|
+
- **The native Telegram backstop** — The wizard already has an Instar-owned manual Telegram path that validates the bot token, discovers chat IDs, and writes config without asking an LLM to perform those side effects.
|
|
14
|
+
|
|
15
|
+
## What this adds
|
|
16
|
+
|
|
17
|
+
This adds a Gemini-specific setup driver. The driver uses Gemini only for short, bounded narrative paragraphs between structured questions. Instar prints the actual questions, validates answers, runs init, writes config, starts the server, and handles Telegram setup. Gemini is no longer handed the Claude setup skill, and it is not asked to run shell commands, write files, or drive browser automation.
|
|
18
|
+
|
|
19
|
+
## The new pieces
|
|
20
|
+
|
|
21
|
+
- **Gemini setup driver** — A sibling to the Codex driver. It consumes the shared wizard state machine, calls Gemini only for narrative text, and runs setup actions in Instar code.
|
|
22
|
+
- **Gemini setup dispatch** — The setup command now routes `gemini-cli` to the Gemini driver before the Claude skill spawn path is built.
|
|
23
|
+
- **Driver boundary tests** — Unit and integration tests check that Gemini uses the state machine, initializes agents as `gemini-cli`, avoids the Claude setup skill, and avoids shell/tool expectations.
|
|
24
|
+
- **Live narrative smoke** — An end-to-end test reaches the real Gemini CLI one-shot path. When Gemini quota is exhausted, the test records that as external unavailability rather than a product regression.
|
|
25
|
+
|
|
26
|
+
## The safeguards
|
|
27
|
+
|
|
28
|
+
**Prevents Claude assumptions from leaking into Gemini setup.** The setup command no longer asks Gemini to read the Claude wizard skill. The Gemini driver has source-level tests that reject references to the setup skill, shell-runner names, Playwright MCP prompts, and dangerous sandbox-bypass language.
|
|
29
|
+
|
|
30
|
+
**Keeps side effects owned by Instar.** Gemini can produce a paragraph, but it does not decide transitions or perform actions. The code path that initializes the project, adds the user, starts the server, writes Telegram config, and sends greetings remains deterministic TypeScript.
|
|
31
|
+
|
|
32
|
+
**Keeps the live test honest about external capacity.** The E2E test uses the real Gemini CLI path, but Gemini may refuse requests when model capacity is exhausted. That condition is reported as quota unavailability, not hidden as a successful prose generation.
|
|
33
|
+
|
|
34
|
+
## What ships when
|
|
35
|
+
|
|
36
|
+
This PR ships the driver, dispatch, model constant, and tests together. It does not attempt to add Gemini browser automation or a Gemini-native Telegram automation flow. That is intentional: the current safety line is that Gemini setup narrative is model-assisted, while setup side effects stay code-owned.
|
|
37
|
+
|
|
38
|
+
## What you actually need to decide
|
|
39
|
+
|
|
40
|
+
Approve this if the right first Gemini setup milestone is a code-owned hybrid wizard that uses Gemini only for bounded narrative and leaves all setup actions inside Instar.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Side-Effects Review — Gemini hybrid setup driver
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `gemini-hybrid-setup-driver`
|
|
4
|
+
**Date:** `2026-06-02`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change adds `src/commands/setup-wizard/gemini-driver.ts` and routes `framework === 'gemini-cli'` in `src/commands/setup.ts` to that driver instead of the Claude setup skill prompt. The Gemini driver mirrors the Codex hybrid wizard shape: Instar owns the state machine, prompts, answer validation, setup actions, config writes, and Telegram fallback; Gemini is called only for bounded one-shot narrative text. Tests cover driver invariants, setup dispatch, and the live Gemini one-shot narrative path when quota is available.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `src/commands/setup.ts` wizard dispatch — modify — selects the Gemini hybrid driver for `gemini-cli` instead of the Claude skill spawn path.
|
|
15
|
+
- `src/commands/setup.ts` setup-wizard skill existence check — modify — checks for the Claude setup skill only on the Claude path, because hybrid drivers do not depend on that skill.
|
|
16
|
+
- `src/commands/setup-wizard/gemini-driver.ts` action dispatch — add — maps shared wizard action states to Instar-owned side effects for a Gemini setup.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Over-block
|
|
21
|
+
|
|
22
|
+
No block/allow surface in the security-gate sense. The main legitimate input this could reject is an environment where Gemini CLI is installed through an asdf shim but the active Node version cannot run the shim. The driver preserves `ASDF_NODEJS_VERSION` when already present and sets Gemini's documented headless trust env, but it does not guess or mutate the user's asdf configuration. In that case the wizard falls back to deterministic narrative text rather than blocking setup.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Under-block
|
|
27
|
+
|
|
28
|
+
This does not add Gemini browser automation or Gemini tool-use setup. That means it still misses a future richer flow where Gemini could safely use real read/search tools for context gathering. That is intentional for this slice: the observed failure was Gemini being asked to use nonexistent shell behavior, so the safe first fix is narrative-only Gemini plus Instar-owned side effects.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 3. Level-of-abstraction fit
|
|
33
|
+
|
|
34
|
+
The change sits at the setup-driver layer, which is the right place because the failure is a framework-specific runtime contract mismatch. The shared state machine remains the higher-level source of wizard structure. The Gemini driver only adapts the narrative call and side-effect ownership for Gemini's actual CLI behavior; it does not fork the user-facing setup graph.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 4. Signal vs authority compliance
|
|
39
|
+
|
|
40
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
41
|
+
|
|
42
|
+
- [x] No — this change has no block/allow surface.
|
|
43
|
+
|
|
44
|
+
The setup dispatch is deterministic routing based on the user-selected framework. It does not create a brittle detector with blocking authority. The only failure classification added in tests is quota-aware E2E handling, and that is a test availability distinction rather than runtime authority over user messages or agent behavior.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 5. Interactions
|
|
49
|
+
|
|
50
|
+
- **Shadowing:** The Gemini branch now returns before the Claude skill spawn path. This deliberately shadows the old Gemini one-shot skill prompt, which was the broken behavior.
|
|
51
|
+
- **Double-fire:** No double-fire expected. Only one wizard driver runs for a selected framework.
|
|
52
|
+
- **Races:** No shared mutable runtime state is introduced. Existing setup actions still perform their normal file writes and server start steps.
|
|
53
|
+
- **Feedback loops:** The Gemini narrative call can fail because of auth, trust, or quota. The driver treats that as narrative unavailable and prints fallback text, so setup progress does not depend on model availability.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 6. External surfaces
|
|
58
|
+
|
|
59
|
+
This is visible to anyone running `instar setup --framework gemini-cli`: they now get the code-owned hybrid wizard instead of a Gemini prompt to read Claude setup instructions. It changes no persistent schema. It can write the same project config that the existing setup wizard writes. It depends on Gemini CLI availability only for optional narrative; setup side effects remain available when Gemini narrative is unavailable.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 7. Rollback cost
|
|
64
|
+
|
|
65
|
+
Rollback is a hot-fix code revert: remove the Gemini dispatch branch and driver, revert the model constant and tests, and regenerate the manifest. No data migration is required. Agents created through the new path remain ordinary `gemini-cli` agents; rollback would only affect future setup runs.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Conclusion
|
|
70
|
+
|
|
71
|
+
The review supports shipping this as the Gemini setup keystone slice. It removes the Claude-skill fallthrough, keeps all side effects in Instar code, and adds tests that pin the exact boundary. The main operational concern is Gemini CLI quota/trust/asdf availability for live one-shots; the driver degrades to fallback narrative and the E2E reports quota as external unavailability.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Second-pass review (if required)
|
|
76
|
+
|
|
77
|
+
**Reviewer:** `not required`
|
|
78
|
+
**Independent read of the artifact:** `not required`
|
|
79
|
+
|
|
80
|
+
This change does not add a guard, sentinel, coherence gate, outbound-message blocker, restart path, or lifecycle killer. It modifies setup framework dispatch and adds a bounded driver.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Evidence pointers
|
|
85
|
+
|
|
86
|
+
- `npm run build`
|
|
87
|
+
- `npx vitest run tests/unit/setup-gemini-driver.test.ts tests/integration/setup-gemini-dispatch.test.ts tests/e2e/gemini-setup-narrative-lifecycle.test.ts`
|
|
88
|
+
- Live Gemini E2E reached the real CLI but reported quota exhausted for `gemini-2.5-flash` during this run.
|