@quantiya/codevibe-core 2.0.6 → 2.0.8

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 (233) hide show
  1. package/README.md +7 -5
  2. package/dist/agy-cli-contract.d.ts +14 -0
  3. package/dist/appsync/appsync-client.d.ts +229 -61
  4. package/dist/appsync/event-throttle.d.ts +33 -0
  5. package/dist/appsync/index.d.ts +3 -2
  6. package/dist/appsync/queries.d.ts +6 -2
  7. package/dist/auth/auth-telemetry.d.ts +26 -0
  8. package/dist/auth/keychain-cli.d.ts +6 -0
  9. package/dist/auth/vendor-key-cli.d.ts +49 -0
  10. package/dist/companion-mode/index.d.ts +50 -22
  11. package/dist/companion-mode/persist-preference.d.ts +1 -5
  12. package/dist/companion-mode/resolve-agent.d.ts +5 -4
  13. package/dist/config/config.d.ts +0 -5
  14. package/dist/credential-broker/__tests__/oauth-refresh.test.d.ts +1 -0
  15. package/dist/credential-broker/__tests__/upstream-result-helpers.d.ts +21 -0
  16. package/dist/credential-broker/broker.d.ts +196 -12
  17. package/dist/credential-broker/chatgpt-config.d.ts +40 -0
  18. package/dist/credential-broker/index.d.ts +4 -1
  19. package/dist/credential-broker/oauth-account-lock.d.ts +150 -0
  20. package/dist/credential-broker/oauth-refresh.d.ts +72 -0
  21. package/dist/credential-broker/types.d.ts +165 -17
  22. package/dist/credential-broker/upstream-client.d.ts +3 -2
  23. package/dist/credential-broker/vendor-key-store.d.ts +32 -1
  24. package/dist/crypto/__tests__/encrypt-for-emit.test.d.ts +1 -0
  25. package/dist/crypto/__tests__/open-prompt-id.test.d.ts +1 -0
  26. package/dist/crypto/encrypt-for-emit.d.ts +39 -0
  27. package/dist/crypto/index.d.ts +3 -0
  28. package/dist/crypto/open-prompt-id.d.ts +36 -0
  29. package/dist/daemon/__tests__/process-guards.test.d.ts +1 -0
  30. package/dist/daemon/index.d.ts +2 -0
  31. package/dist/daemon/process-guards.d.ts +38 -0
  32. package/dist/e1/__tests__/prompt-raise.test.d.ts +1 -0
  33. package/dist/e1/index.d.ts +2 -0
  34. package/dist/e1/prompt-raise.d.ts +65 -0
  35. package/dist/index.d.ts +20 -2
  36. package/dist/index.js +4543 -288
  37. package/dist/keychain/__tests__/keychain-manager.test.d.ts +1 -0
  38. package/dist/keychain/__tests__/keychain-migrate.test.d.ts +1 -0
  39. package/dist/keychain/keychain-backend.d.ts +105 -0
  40. package/dist/keychain/keychain-manager.d.ts +40 -5
  41. package/dist/keychain/keychain-migrate.d.ts +46 -0
  42. package/dist/local-executor/__tests__/anchored-fs.test.d.ts +1 -0
  43. package/dist/local-executor/__tests__/bounded-directory.test.d.ts +1 -0
  44. package/dist/local-executor/__tests__/bounded-output.test.d.ts +1 -0
  45. package/dist/local-executor/__tests__/durable-directory.test.d.ts +1 -0
  46. package/dist/local-executor/__tests__/hosted-class-a-sink.test.d.ts +1 -0
  47. package/dist/local-executor/__tests__/process-identity.test.d.ts +1 -0
  48. package/dist/local-executor/__tests__/process-tree.test.d.ts +1 -0
  49. package/dist/local-executor/__tests__/publication-authority-capability.test.d.ts +1 -0
  50. package/dist/local-executor/__tests__/reviewer-rationale-flag.test.d.ts +1 -0
  51. package/dist/local-executor/__tests__/snapshot-merge.test.d.ts +1 -0
  52. package/dist/local-executor/__tests__/workspace-authority-fixture.d.ts +3 -0
  53. package/dist/local-executor/__tests__/workspace-authority.test.d.ts +1 -0
  54. package/dist/local-executor/__tests__/workspace-materializer.test.d.ts +1 -0
  55. package/dist/local-executor/agentic-disposable-repo.d.ts +23 -6
  56. package/dist/local-executor/agentic-resolve.d.ts +16 -0
  57. package/dist/local-executor/anchored-fs.d.ts +243 -0
  58. package/dist/local-executor/bounded-directory.d.ts +64 -0
  59. package/dist/local-executor/bounded-helper.d.ts +22 -0
  60. package/dist/local-executor/bounded-output.d.ts +11 -0
  61. package/dist/local-executor/class-a-emit.d.ts +13 -1
  62. package/dist/local-executor/class-a-sign.d.ts +15 -0
  63. package/dist/local-executor/durable-directory.d.ts +25 -0
  64. package/dist/local-executor/durable-store.d.ts +217 -25
  65. package/dist/local-executor/group-decision-outcome.d.ts +11 -0
  66. package/dist/local-executor/hosted-class-a-sink.d.ts +27 -0
  67. package/dist/local-executor/implementor-argv.d.ts +89 -7
  68. package/dist/local-executor/index.d.ts +3 -2
  69. package/dist/local-executor/local-executor-impl.d.ts +177 -76
  70. package/dist/local-executor/merge-conflict-resolve.d.ts +19 -0
  71. package/dist/local-executor/process-identity.d.ts +16 -0
  72. package/dist/local-executor/process-tree.d.ts +123 -0
  73. package/dist/local-executor/revert-reconcile.d.ts +16 -0
  74. package/dist/local-executor/revert-runner.d.ts +14 -1
  75. package/dist/local-executor/reviewer-rationale-flag.d.ts +10 -0
  76. package/dist/local-executor/snapshot-merge.d.ts +124 -0
  77. package/dist/local-executor/task-group-types.d.ts +7 -6
  78. package/dist/local-executor/team-execution-flag.d.ts +2 -2
  79. package/dist/local-executor/track-registry.d.ts +2 -0
  80. package/dist/local-executor/types.d.ts +34 -2
  81. package/dist/local-executor/verification-gates/build.d.ts +5 -0
  82. package/dist/local-executor/verification-gates/deploy-preflight.d.ts +2 -0
  83. package/dist/local-executor/verification-gates/diff-sanity.d.ts +12 -0
  84. package/dist/local-executor/verification-gates/hostile-grep.d.ts +2 -0
  85. package/dist/local-executor/verification-gates/lint.d.ts +2 -0
  86. package/dist/local-executor/verification-gates/shell-runner.d.ts +5 -0
  87. package/dist/local-executor/verification-gates/source-traceability.d.ts +2 -0
  88. package/dist/local-executor/verification-gates/tests.d.ts +3 -0
  89. package/dist/local-executor/verification-gates/typecheck.d.ts +3 -0
  90. package/dist/local-executor/verification-runner.d.ts +6 -0
  91. package/dist/local-executor/workspace-authority.d.ts +45 -0
  92. package/dist/local-executor/workspace-materializer.d.ts +27 -0
  93. package/dist/local-executor/workspace-shadow.d.ts +378 -85
  94. package/dist/local-model/manager.d.ts +1 -1
  95. package/dist/local-model/ollama.d.ts +40 -0
  96. package/dist/orchestration/__tests__/detect-agents.test.d.ts +1 -0
  97. package/dist/orchestration/detect-agents.d.ts +10 -30
  98. package/dist/orchestration/index.d.ts +1 -2
  99. package/dist/orchestration-shell/__tests__/a1a-planner-offers.test.d.ts +1 -0
  100. package/dist/orchestration-shell/__tests__/a6-cli-surface.test.d.ts +1 -0
  101. package/dist/orchestration-shell/__tests__/advisory-attachment-journal.test.d.ts +1 -0
  102. package/dist/orchestration-shell/__tests__/advisory-attachments-dir-race.test.d.ts +1 -0
  103. package/dist/orchestration-shell/__tests__/advisory-multi-mention-panel.test.d.ts +1 -0
  104. package/dist/orchestration-shell/__tests__/advisory-panel-attachments.test.d.ts +1 -0
  105. package/dist/orchestration-shell/__tests__/advisory-quota-stdout-result.test.d.ts +1 -0
  106. package/dist/orchestration-shell/__tests__/agent-turn-context-batch.test.d.ts +1 -0
  107. package/dist/orchestration-shell/__tests__/bounded-shutdown.test.d.ts +1 -0
  108. package/dist/orchestration-shell/__tests__/brainstorm-quorum-wiring.test.d.ts +1 -0
  109. package/dist/orchestration-shell/__tests__/brainstorm-quorum.test.d.ts +1 -0
  110. package/dist/orchestration-shell/__tests__/cli-team-session-key.test.d.ts +1 -0
  111. package/dist/orchestration-shell/__tests__/command-intent.test.d.ts +1 -0
  112. package/dist/orchestration-shell/__tests__/context-compaction.test.d.ts +1 -0
  113. package/dist/orchestration-shell/__tests__/context-items-hosted-sync.test.d.ts +1 -0
  114. package/dist/orchestration-shell/__tests__/context-items-wiring.test.d.ts +1 -0
  115. package/dist/orchestration-shell/__tests__/context-items.test.d.ts +1 -0
  116. package/dist/orchestration-shell/__tests__/cp8-full-team-events.test.d.ts +1 -0
  117. package/dist/orchestration-shell/__tests__/cp8-team-decomposed-zk.test.d.ts +1 -0
  118. package/dist/orchestration-shell/__tests__/explicit-tty-exit.test.d.ts +1 -0
  119. package/dist/orchestration-shell/__tests__/mention-suggest.test.d.ts +1 -0
  120. package/dist/orchestration-shell/__tests__/planner-offer-e1.test.d.ts +1 -0
  121. package/dist/orchestration-shell/__tests__/route-browse-summarize-recovery.test.d.ts +1 -0
  122. package/dist/orchestration-shell/__tests__/workspace-shutdown.test.d.ts +1 -0
  123. package/dist/orchestration-shell/advisory-attachment-journal.d.ts +165 -0
  124. package/dist/orchestration-shell/attachments.d.ts +53 -8
  125. package/dist/orchestration-shell/bounded-shutdown.d.ts +22 -0
  126. package/dist/orchestration-shell/brainstorm-quorum.d.ts +118 -0
  127. package/dist/orchestration-shell/cli.d.ts +97 -70
  128. package/dist/orchestration-shell/cli.js +51847 -33465
  129. package/dist/orchestration-shell/command-intent.d.ts +56 -0
  130. package/dist/orchestration-shell/components/InputBar.d.ts +6 -0
  131. package/dist/orchestration-shell/components/OrchestrationApp.d.ts +2 -0
  132. package/dist/orchestration-shell/context-compaction.d.ts +264 -0
  133. package/dist/orchestration-shell/context-items-hosted-sync.d.ts +19 -0
  134. package/dist/orchestration-shell/context-items.d.ts +408 -0
  135. package/dist/orchestration-shell/context-store.d.ts +162 -0
  136. package/dist/orchestration-shell/declared-test-runner.d.ts +21 -2
  137. package/dist/orchestration-shell/emit-shell-event.d.ts +41 -13
  138. package/dist/orchestration-shell/explicit-tty-exit.d.ts +17 -0
  139. package/dist/orchestration-shell/gate-decision-submit.d.ts +11 -0
  140. package/dist/orchestration-shell/gate-prompts.d.ts +78 -3
  141. package/dist/orchestration-shell/index.d.ts +309 -37
  142. package/dist/orchestration-shell/mention-suggest.d.ts +11 -0
  143. package/dist/orchestration-shell/mode-selection.d.ts +4 -22
  144. package/dist/orchestration-shell/planner-offer-e1.d.ts +97 -0
  145. package/dist/orchestration-shell/quorum-loop.d.ts +603 -77
  146. package/dist/orchestration-shell/reducer.d.ts +9 -0
  147. package/dist/orchestration-shell/task-progress.d.ts +17 -4
  148. package/dist/orchestration-shell/team-decompose.d.ts +47 -29
  149. package/dist/orchestration-shell/types.d.ts +103 -6
  150. package/dist/orchestration-shell/workspace-shutdown.d.ts +27 -0
  151. package/dist/planner/index.d.ts +1 -1
  152. package/dist/planner/local-advisory.d.ts +12 -0
  153. package/dist/planner/local-gemma.d.ts +27 -0
  154. package/dist/planner/types.d.ts +7 -0
  155. package/dist/reviewer/index.d.ts +0 -2
  156. package/dist/reviewer/output-parser.d.ts +19 -0
  157. package/dist/reviewer/provider.d.ts +9 -6
  158. package/dist/reviewer/providers/antigravity.d.ts +2 -3
  159. package/dist/reviewer/registry.d.ts +9 -4
  160. package/dist/reviewer/token-usage.d.ts +10 -0
  161. package/dist/reviewer/types.d.ts +3 -0
  162. package/dist/reviewer/verdict-classifier.d.ts +1 -0
  163. package/dist/session/__tests__/device-registration-lease.test.d.ts +1 -0
  164. package/dist/session/__tests__/pending-session-create.test.d.ts +1 -0
  165. package/dist/session/__tests__/session-rekey-fingerprint.test.d.ts +1 -0
  166. package/dist/session/__tests__/session-resume-key-reconciliation.test.d.ts +1 -0
  167. package/dist/session/__tests__/session-resume-pending-first.test.d.ts +1 -0
  168. package/dist/session/device-key-watcher.d.ts +1 -0
  169. package/dist/session/index.d.ts +4 -2
  170. package/dist/session/pending-session-create.d.ts +61 -0
  171. package/dist/session/register-device-key.d.ts +11 -1
  172. package/dist/session/session-rekey.d.ts +8 -8
  173. package/dist/session/session-resume.d.ts +21 -1
  174. package/dist/substrate/command-runner.d.ts +2 -0
  175. package/dist/substrate/docker.d.ts +14 -32
  176. package/dist/substrate/index.d.ts +0 -1
  177. package/dist/substrate/sandbox-exec.d.ts +17 -16
  178. package/dist/substrate/types.d.ts +39 -5
  179. package/dist/substrate-launch/__tests__/reviewer-credential-preflight.test.d.ts +1 -0
  180. package/dist/substrate-launch/apikey-bootstrap.d.ts +24 -1
  181. package/dist/substrate-launch/engage-substrate.d.ts +20 -0
  182. package/dist/substrate-launch/index.d.ts +2 -0
  183. package/dist/substrate-launch/reviewer-credential-preflight.d.ts +50 -0
  184. package/dist/substrate-launch/sanitized-env.d.ts +5 -5
  185. package/dist/test-publication-authority-setup.d.ts +1 -0
  186. package/dist/tool-activity/__tests__/consolidator.test.d.ts +1 -0
  187. package/dist/tool-activity/__tests__/digest.test.d.ts +1 -0
  188. package/dist/tool-activity/__tests__/flock-rollout-lock.test.d.ts +1 -0
  189. package/dist/tool-activity/__tests__/ledger.test.d.ts +1 -0
  190. package/dist/tool-activity/__tests__/outbox.test.d.ts +1 -0
  191. package/dist/tool-activity/__tests__/replay-cursor.test.d.ts +1 -0
  192. package/dist/tool-activity/__tests__/session-map.test.d.ts +1 -0
  193. package/dist/tool-activity/__tests__/socket-rollout-lock.test.d.ts +1 -0
  194. package/dist/tool-activity/atomic-file.d.ts +27 -0
  195. package/dist/tool-activity/consolidator.d.ts +253 -0
  196. package/dist/tool-activity/digest.d.ts +4 -0
  197. package/dist/tool-activity/flock-rollout-lock.d.ts +68 -0
  198. package/dist/tool-activity/index.d.ts +9 -0
  199. package/dist/tool-activity/ledger.d.ts +274 -0
  200. package/dist/tool-activity/outbox.d.ts +60 -0
  201. package/dist/tool-activity/replay-cursor.d.ts +190 -0
  202. package/dist/tool-activity/session-map.d.ts +133 -0
  203. package/dist/tool-activity/socket-rollout-lock.d.ts +57 -0
  204. package/dist/tool-activity/types.d.ts +368 -0
  205. package/dist/types/encryption.d.ts +9 -0
  206. package/dist/types/events.d.ts +29 -4
  207. package/dist/types/session.d.ts +32 -2
  208. package/package.json +7 -6
  209. package/dist/orchestration/orchestration-cli.d.ts +0 -12
  210. package/dist/orchestration/setup-bootstrap.d.ts +0 -146
  211. package/dist/orchestration/setup-failure-recourse.d.ts +0 -23
  212. package/dist/orchestration/setup-save.d.ts +0 -47
  213. package/dist/orchestration/setup-seat-picker.d.ts +0 -72
  214. package/dist/orchestration/setup-telemetry.d.ts +0 -54
  215. package/dist/orchestration/setup-test-agents.d.ts +0 -108
  216. package/dist/orchestration/setup-types.d.ts +0 -146
  217. package/dist/orchestration/setup-wizard.d.ts +0 -57
  218. package/dist/orchestration-shell/cohort-flag.d.ts +0 -16
  219. package/dist/reviewer/providers/gemini.d.ts +0 -109
  220. package/dist/substrate/git-proxy.d.ts +0 -35
  221. /package/dist/{companion-mode/__tests__/detect-parallel.test.d.ts → appsync/__tests__/appsync-client-context-items.test.d.ts} +0 -0
  222. /package/dist/{orchestration-shell/__tests__/cli-stub-session-adapter.test.d.ts → appsync/__tests__/heartbeat-active.test.d.ts} +0 -0
  223. /package/dist/{orchestration/__tests__/setup-bootstrap.test.d.ts → appsync/__tests__/orphan-sweep-null-heartbeat.test.d.ts} +0 -0
  224. /package/dist/{orchestration/__tests__/setup-failure-recourse.test.d.ts → appsync/__tests__/refresh-open-prompt-ttl-chunk.test.d.ts} +0 -0
  225. /package/dist/{orchestration/__tests__/setup-save.test.d.ts → auth/__tests__/keychain-cli.test.d.ts} +0 -0
  226. /package/dist/{orchestration/__tests__/setup-seat-picker.test.d.ts → auth/__tests__/vendor-key-cli.test.d.ts} +0 -0
  227. /package/dist/{orchestration/__tests__/setup-telemetry.test.d.ts → companion-mode/__tests__/mode-selected-emit.test.d.ts} +0 -0
  228. /package/dist/{orchestration/__tests__/setup-test-agents.test.d.ts → companion-mode/__tests__/private-launcher-detection.test.d.ts} +0 -0
  229. /package/dist/{orchestration/__tests__/setup-types.test.d.ts → companion-mode/__tests__/private-launcher-path.test.d.ts} +0 -0
  230. /package/dist/{orchestration/__tests__/setup-wizard.test.d.ts → credential-broker/__tests__/broker-c4.test.d.ts} +0 -0
  231. /package/dist/{reviewer/providers/__tests__/gemini-live-smoke.test.d.ts → credential-broker/__tests__/broker-streaming.test.d.ts} +0 -0
  232. /package/dist/{reviewer/providers/__tests__/gemini.test.d.ts → credential-broker/__tests__/chatgpt-config.test.d.ts} +0 -0
  233. /package/dist/{substrate/__tests__/git-proxy.test.d.ts → credential-broker/__tests__/oauth-account-lock.test.d.ts} +0 -0
@@ -1,109 +0,0 @@
1
- import { type ReviewerEvaluateOptions, type ReviewerProvider, type ReviewerSpec } from '../provider.js';
2
- import { type SubprocessOutcome } from '../subprocess.js';
3
- import type { ReviewerVerdict } from '../types.js';
4
- import { type VerdictClassifier } from '../verdict-classifier.js';
5
- import type { BuiltCommand } from './claude.js';
6
- /** Construction options. */
7
- export interface GeminiReviewerProviderOptions {
8
- /** Override the `gemini` executable path. Production callers pass nothing
9
- * (PATH lookup); integration tests can stub Gemini with a shell-script
10
- * fixture. */
11
- executable?: string;
12
- }
13
- /**
14
- * JSON envelope shape emitted by `gemini --output-format json`. We only care
15
- * about `response`; the other fields (`session_id`, `stats`) are consumed by
16
- * the JSON deserializer but not surfaced on `ReviewerVerdict` directly.
17
- *
18
- * Tolerates missing or extra top-level keys for cross-version compatibility.
19
- */
20
- export interface GeminiEnvelope {
21
- response: string;
22
- /** Gemini 0.38.2 emits this; older versions may not. */
23
- session_id?: string;
24
- stats?: GeminiStats;
25
- }
26
- export interface GeminiStats {
27
- /** Map of model name → per-model stats. Token usage MUST be summed across
28
- * every entry (R2 "telemetry timebomb" lesson — picking an arbitrary one
29
- * via `Object.values()[0]` would under-report when Gemini reports
30
- * auxiliary models). */
31
- models?: Record<string, GeminiModelStats>;
32
- }
33
- export interface GeminiModelStats {
34
- tokens?: {
35
- /** Prompt + response tokens combined. Populated by Gemini's
36
- * `stats.models.<name>.tokens.total`; used for cost telemetry. */
37
- total?: number;
38
- };
39
- }
40
- /**
41
- * Real Gemini CLI reviewer provider. Wraps the `gemini` binary.
42
- */
43
- export declare class GeminiReviewerProvider implements ReviewerProvider {
44
- private readonly executable;
45
- constructor(opts?: GeminiReviewerProviderOptions);
46
- evaluate(spec: ReviewerSpec, gateId: string, opts?: ReviewerEvaluateOptions): Promise<ReviewerVerdict>;
47
- }
48
- /**
49
- * Construct the Gemini CLI invocation. Split out from `evaluate` so unit
50
- * tests can assert on the built arg list + env without actually spawning a
51
- * process.
52
- *
53
- * Locked flag set:
54
- * - `-p ''` — non-interactive mode, empty inline prompt so the full prompt
55
- * is read from stdin (consistent with Claude path).
56
- * - `--approval-mode plan` — read-only sandbox.
57
- * - `--output-format json` — structured reply envelope that survives
58
- * user-hook stdout pollution.
59
- * - `--model <hint>` — optional; omitted when `spec.model_hint` is `null`.
60
- *
61
- * `spec.tool_allowlist` is **intentionally unused** for Gemini. Plan mode
62
- * is the design-locked sandbox; mapping the Claude-style allowlist to
63
- * Gemini's (deprecated) `--allowed-tools` flag would hit the known
64
- * non-interactive bugs flagged in the module docs.
65
- *
66
- * # QUORUM_REVIEWER_SUBPROCESS env var
67
- *
68
- * Set unconditionally to `'1'` in the child's environment. The user's
69
- * Gemini plugin checks this at the top of `hooks/common.sh` and
70
- * short-circuits every hook — without this gate, reviewer spawns would
71
- * each create a new backend session and mark the user's primary Gemini
72
- * session INACTIVE (empirically observed 2026-04-21 during Phase 2c.2
73
- * local testing).
74
- */
75
- export declare function buildCommand(executable: string, spec: ReviewerSpec, sandboxed?: boolean): BuiltCommand;
76
- /**
77
- * Map the raw subprocess outcome into a `ReviewerVerdict` or throw a
78
- * structured `ReviewerErrorClass`. See `claude.ts::buildVerdict` for the
79
- * shared safety rule (non-zero exit overrides any parseable stdout).
80
- */
81
- export declare function buildVerdict(spec: ReviewerSpec, gateId: string, outcome: SubprocessOutcome, classifyVerdict?: VerdictClassifier): Promise<ReviewerVerdict>;
82
- /**
83
- * Parse the FIRST complete JSON object in `stdout`, discarding any trailing
84
- * bytes. User-level hooks (e.g., CodeVibe's own Gemini plugin hooks
85
- * installed in `~/.gemini/settings.json`) append log lines to stdout AFTER
86
- * the model's reply envelope. This walks the text byte-by-byte tracking
87
- * brace depth + string escapes to find where the first JSON object ends,
88
- * then `JSON.parse` that slice — the equivalent of Rust's
89
- * `serde_json::Deserializer::into_iter().next()` for our purposes.
90
- *
91
- * Returns `null` if stdout contains no valid JSON value at all, the
92
- * extracted slice fails strict JSON parsing, OR the parsed value isn't a
93
- * shape-conformant `GeminiEnvelope` (i.e. missing or non-string
94
- * `response`). The caller routes any of these to ParseFailure with raw
95
- * stdout — matching Rust's serde-deserialization-failure path.
96
- *
97
- * # Why runtime shape validation
98
- *
99
- * Rust's `serde_json::Deserializer` rejects `{}` or `{"response":123}`
100
- * during deserialization because `GeminiEnvelope { response: String, ... }`
101
- * makes the field required at the type-system layer. TypeScript's
102
- * `JSON.parse(slice) as GeminiEnvelope` is a compile-time-only assertion
103
- * with no runtime check, so we reproduce serde's behavior with an
104
- * explicit `validateGeminiEnvelope` step. Without this, a syntactically-
105
- * valid-but-shape-bad envelope would land an `undefined.replace()`
106
- * TypeError up the call stack instead of a structured ParseFailure
107
- * (R1 finding on Phase 2f.1.b round 1).
108
- */
109
- export declare function parseFirstJsonEnvelope(stdout: string): GeminiEnvelope | null;
@@ -1,35 +0,0 @@
1
- /**
2
- * A minimal synthetic `config` written into the proxy. Repository-format
3
- * version + bare=false ONLY — explicitly NO `[remote ...]`, NO `[credential]`,
4
- * NO `core.hooksPath`, NO `[user]` (which could carry a signing key path). This
5
- * is the credential-scrub: the real repo's config never enters the sandbox.
6
- */
7
- export declare const SCRUBBED_CONFIG: string;
8
- /**
9
- * Resolve the real parent `.git` directory for a worktree. In a worktree the
10
- * `<workdir>/.git` is a FILE: `gitdir: /abs/path/to/parent/.git/worktrees/<n>`.
11
- * The commit objects live in the parent repo's top-level `.git` (i.e. two
12
- * levels up from `worktrees/<n>`). For a NON-worktree checkout `<workdir>/.git`
13
- * is already the real dir. Returns the directory that holds `objects/` +
14
- * `refs/`.
15
- *
16
- * @returns the resolved real git-common-dir, or `null` if `<workdir>/.git` is
17
- * absent/unreadable (the caller skips proxying — a non-git workdir is fine).
18
- */
19
- export declare function resolveGitCommonDir(workdir: string): Promise<string | null>;
20
- /**
21
- * Build a read-only, credential-scrubbed `.git` proxy at `destDir` from the
22
- * resolved git-common-dir. **[W2-min]** — copies only {@link COPIED_GIT_ENTRIES}
23
- * + a synthetic stripped {@link SCRUBBED_CONFIG}; NO remotes/creds/hooks/reflog.
24
- *
25
- * The substrate bind-mounts `destDir` READ-ONLY into the sandbox at
26
- * `<workdir>/.git`. Returns the proxy path on success, or `null` if `workdir`
27
- * is not a resolvable git checkout (the substrate then mounts only the worktree
28
- * with no `.git`, and git read commands simply report "not a repository" — no
29
- * ambient exposure either way).
30
- */
31
- export declare function buildScrubbedGitProxy(workdir: string, destDir: string): Promise<string | null>;
32
- export declare const __testing: {
33
- COPIED_GIT_ENTRIES: readonly ["HEAD", "refs", "packed-refs", "objects"];
34
- SCRUBBED_CONFIG: string;
35
- };