@quantiya/codevibe-claude-plugin 1.0.37 → 1.0.39
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/.claude-plugin/plugin.json +1 -1
- package/bin/codevibe-claude +17 -3
- package/dist/server.js +8 -7
- package/hooks/stop.sh +30 -10
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +1 -139
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +0 -5
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +64 -29
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +0 -4
- package/node_modules/@quantiya/codevibe-core/dist/index.js +33 -194
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +16 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +0 -16
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/body-parser/README.md +18 -18
- package/node_modules/body-parser/index.js +6 -15
- package/node_modules/body-parser/lib/read.js +17 -20
- package/node_modules/body-parser/lib/types/json.js +8 -16
- package/node_modules/body-parser/lib/types/raw.js +3 -4
- package/node_modules/body-parser/lib/types/text.js +3 -4
- package/node_modules/body-parser/lib/types/urlencoded.js +8 -8
- package/node_modules/body-parser/lib/utils.js +11 -9
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/content-disposition/README.md +7 -8
- package/node_modules/content-disposition/index.js +118 -40
- package/node_modules/content-disposition/package.json +8 -11
- package/node_modules/express/Readme.md +39 -29
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +5 -6
- package/node_modules/express/lib/response.js +14 -0
- package/node_modules/express/lib/utils.js +3 -1
- package/node_modules/express/package.json +6 -5
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/README.md +26 -23
- package/node_modules/finalhandler/package.json +13 -9
- package/node_modules/graphql/execution/execute.d.ts +14 -1
- package/node_modules/graphql/execution/execute.js +63 -13
- package/node_modules/graphql/execution/execute.mjs +63 -13
- package/node_modules/graphql/execution/subscribe.js +1 -0
- package/node_modules/graphql/execution/subscribe.mjs +2 -0
- package/node_modules/graphql/execution/values.js +4 -4
- package/node_modules/graphql/execution/values.mjs +4 -4
- package/node_modules/graphql/index.d.ts +1 -0
- package/node_modules/graphql/language/ast.d.ts +10 -1
- package/node_modules/graphql/language/ast.js +8 -1
- package/node_modules/graphql/language/ast.mjs +8 -1
- package/node_modules/graphql/language/directiveLocation.d.ts +1 -0
- package/node_modules/graphql/language/directiveLocation.js +1 -0
- package/node_modules/graphql/language/directiveLocation.mjs +1 -0
- package/node_modules/graphql/language/index.d.ts +1 -0
- package/node_modules/graphql/language/kinds.d.ts +1 -0
- package/node_modules/graphql/language/kinds.js +1 -0
- package/node_modules/graphql/language/kinds.mjs +1 -0
- package/node_modules/graphql/language/parser.d.ts +14 -0
- package/node_modules/graphql/language/parser.js +33 -0
- package/node_modules/graphql/language/parser.mjs +33 -0
- package/node_modules/graphql/language/predicates.js +3 -1
- package/node_modules/graphql/language/predicates.mjs +5 -1
- package/node_modules/graphql/language/printer.js +13 -1
- package/node_modules/graphql/language/printer.mjs +13 -1
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/type/directives.d.ts +9 -1
- package/node_modules/graphql/type/directives.js +10 -1
- package/node_modules/graphql/type/directives.mjs +10 -1
- package/node_modules/graphql/type/introspection.js +24 -1
- package/node_modules/graphql/type/introspection.mjs +24 -1
- package/node_modules/graphql/utilities/buildASTSchema.js +4 -0
- package/node_modules/graphql/utilities/buildASTSchema.mjs +4 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +1 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +1 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +2 -2
- package/node_modules/graphql/utilities/coerceInputValue.mjs +2 -2
- package/node_modules/graphql/utilities/extendSchema.js +58 -3
- package/node_modules/graphql/utilities/extendSchema.mjs +58 -3
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +16 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +31 -38
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +31 -38
- package/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +1 -0
- package/node_modules/graphql/utilities/printSchema.js +1 -0
- package/node_modules/graphql/utilities/printSchema.mjs +1 -0
- package/node_modules/graphql/utilities/valueFromAST.js +12 -2
- package/node_modules/graphql/utilities/valueFromAST.mjs +12 -2
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +4 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +4 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +12 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +12 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +5 -11
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -11
- package/node_modules/graphql/validation/validate.js +12 -0
- package/node_modules/graphql/validation/validate.mjs +13 -2
- package/node_modules/graphql/version.js +2 -2
- package/node_modules/graphql/version.mjs +2 -2
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/iconv-lite/lib/index.d.ts +114 -26
- package/node_modules/iconv-lite/lib/index.js +39 -40
- package/node_modules/iconv-lite/package.json +13 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/node_modules/node-abi/abi_registry.json +10 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/README.md +19 -4
- package/node_modules/{semver → node-abi/node_modules/semver}/bin/semver.js +14 -10
- package/node_modules/node-abi/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/index.js +2 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/internal/re.js +1 -1
- package/node_modules/{semver → node-abi/node_modules/semver}/package.json +3 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +5 -4
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.d.ts +3 -0
- package/node_modules/path-to-regexp/dist/index.js +215 -193
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +190 -0
- package/node_modules/qs/README.md +29 -4
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +94 -49
- package/node_modules/qs/lib/utils.js +85 -11
- package/node_modules/qs/package.json +10 -9
- package/node_modules/qs/test/parse.js +391 -13
- package/node_modules/qs/test/stringify.js +16 -3
- package/node_modules/qs/test/utils.js +173 -3
- package/node_modules/send/package.json +11 -8
- package/node_modules/serve-static/README.md +23 -23
- package/node_modules/serve-static/package.json +6 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/node_modules/uuid/dist/v35.js +3 -0
- package/node_modules/uuid/dist/v6.js +3 -0
- package/node_modules/uuid/dist-node/v35.js +3 -0
- package/node_modules/uuid/dist-node/v6.js +3 -0
- package/node_modules/uuid/package.json +1 -1
- package/node_modules/ws/index.js +15 -6
- package/node_modules/ws/lib/constants.js +1 -0
- package/node_modules/ws/lib/permessage-deflate.js +6 -6
- package/node_modules/ws/lib/websocket-server.js +10 -6
- package/node_modules/ws/lib/websocket.js +19 -14
- package/node_modules/ws/package.json +4 -3
- package/node_modules/ws/wrapper.mjs +14 -1
- package/package.json +2 -2
- package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/appsync-client.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/audit-keys/__tests__/audit-keys-parity.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/audit-keys/index.d.ts +0 -41
- package/node_modules/@quantiya/codevibe-core/dist/auth/__tests__/auth-telemetry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-bootstrap.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-failure-recourse.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-save.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-seat-picker.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-telemetry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-test-agents.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-types.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-wizard.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/v1-options.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/detect-agents.d.ts +0 -56
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/index.d.ts +0 -3
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/orchestration-cli.d.ts +0 -12
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-bootstrap.d.ts +0 -146
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-failure-recourse.d.ts +0 -23
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-save.d.ts +0 -47
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-seat-picker.d.ts +0 -72
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-telemetry.d.ts +0 -54
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-test-agents.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-types.d.ts +0 -140
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-wizard.d.ts +0 -57
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/v1-options.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/integration.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/mocks.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/output-parser.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/registry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/subprocess.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/index.d.ts +0 -15
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/mocks.d.ts +0 -80
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/output-parser.d.ts +0 -95
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/provider.d.ts +0 -153
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/claude.d.ts +0 -59
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/codex.d.ts +0 -67
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/common.d.ts +0 -25
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/gemini.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/registry.d.ts +0 -87
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/subprocess.d.ts +0 -117
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +0 -101
- package/node_modules/@quantiya/codevibe-core/dist/types/orchestration.d.ts +0 -57
- package/node_modules/@quantiya/codevibe-core/dist/types/reviewer.d.ts +0 -67
- package/node_modules/content-disposition/HISTORY.md +0 -72
- package/node_modules/express/History.md +0 -3858
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/iconv-lite/Changelog.md +0 -236
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/send/HISTORY.md +0 -580
- package/node_modules/serve-static/HISTORY.md +0 -516
- /package/node_modules/{semver → node-abi/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/comparator.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/range.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/semver.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/coerce.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/diff.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/inc.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/parse.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/constants.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/lrucache.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/parse-options.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/intersects.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/subset.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/valid.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/index.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/license +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/package.json +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/readme.md +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as readline from 'readline';
|
|
2
|
-
import { WizardSeatPick, WizardRole } from './setup-types.js';
|
|
3
|
-
import type { AgentKind } from '../reviewer/types.js';
|
|
4
|
-
/**
|
|
5
|
-
* One entry in the optional `savedSeats` array — the user's previously
|
|
6
|
-
* persisted reviewer policy, threaded in by the wizard on a re-run so
|
|
7
|
-
* the picker pre-fills per-seat agent + role defaults. Stage 2 round-1
|
|
8
|
-
* Codex M2.
|
|
9
|
-
*
|
|
10
|
-
* Stale entries (agent no longer installed, role not in
|
|
11
|
-
* `WIZARD_ROLES`, role already taken by a previous seat) are silently
|
|
12
|
-
* ignored — the picker falls back to the canonical priority defaults
|
|
13
|
-
* for that seat.
|
|
14
|
-
*/
|
|
15
|
-
export interface SavedSeatHint {
|
|
16
|
-
seatId: number;
|
|
17
|
-
agent: AgentKind;
|
|
18
|
-
role: WizardRole;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Reader/writer abstraction so tests can drive the picker with
|
|
22
|
-
* scripted answers instead of an interactive readline. Production
|
|
23
|
-
* passes a Node readline.Interface; tests pass a fake.
|
|
24
|
-
*/
|
|
25
|
-
export interface PickerIO {
|
|
26
|
-
/** Render a line to the user. No newline appended; pass '\n' if needed. */
|
|
27
|
-
write: (line: string) => void;
|
|
28
|
-
/** Prompt the user and return the trimmed answer (without trailing newline). */
|
|
29
|
-
ask: (prompt: string) => Promise<string>;
|
|
30
|
-
}
|
|
31
|
-
export interface SeatPickerDeps {
|
|
32
|
-
wizardRunId: string;
|
|
33
|
-
installedAgents: AgentKind[];
|
|
34
|
-
seatBudget: number;
|
|
35
|
-
io: PickerIO;
|
|
36
|
-
/**
|
|
37
|
-
* Optional per-seat hints from the user's saved reviewer policy
|
|
38
|
-
* (Stage 2 round-1 Codex M2). When present and valid (agent
|
|
39
|
-
* installed; role still available for that seat), the picker uses
|
|
40
|
-
* the hint as the default instead of the canonical
|
|
41
|
-
* AGENT_PRIORITY / DEFAULT_ROLE_BY_SEAT priority.
|
|
42
|
-
*
|
|
43
|
-
* Indexed by `seatId` (NOT array position) — the implementation
|
|
44
|
-
* looks up `savedSeats.find(s => s.seatId === seatId)` so absent /
|
|
45
|
-
* out-of-order entries are fine.
|
|
46
|
-
*/
|
|
47
|
-
savedSeats?: ReadonlyArray<SavedSeatHint>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Run Step 1. Returns the user's per-seat picks. Caller is
|
|
51
|
-
* responsible for closing the readline interface.
|
|
52
|
-
*/
|
|
53
|
-
export declare function runSeatPicker(deps: SeatPickerDeps): Promise<WizardSeatPick[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Default-role-fallback rule (PHASE-3-A-DESIGN.md §1). Seat 0 wants
|
|
56
|
-
* `architecture`, Seat 1 wants `correctness`, Seat 2 wants `security`.
|
|
57
|
-
* If the canonical pick is gone (taken by a previous seat), fall
|
|
58
|
-
* back to the first remaining role in canonical order.
|
|
59
|
-
*
|
|
60
|
-
* Stage 2 round-1 Codex M2: when `savedRole` is provided AND that
|
|
61
|
-
* role is in `WIZARD_ROLES` AND it's still in `availableRoles` (not
|
|
62
|
-
* taken by a previous seat), use it as the default instead of the
|
|
63
|
-
* canonical-default-by-seat priority. Stale saved values (role
|
|
64
|
-
* already taken, or a non-3-role value from a 2.0.x custom-roles
|
|
65
|
-
* future expansion) are silently ignored.
|
|
66
|
-
*/
|
|
67
|
-
export declare function pickDefaultRole(seatId: number, availableRoles: ReadonlyArray<WizardRole>, savedRole?: WizardRole): WizardRole;
|
|
68
|
-
/**
|
|
69
|
-
* Build a `PickerIO` from a Node readline interface. Production
|
|
70
|
-
* callers use this; tests construct their own `PickerIO` directly.
|
|
71
|
-
*/
|
|
72
|
-
export declare function readlinePickerIO(rl: readline.Interface): PickerIO;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { WizardStep, WizardStepFailureReason, WizardAbortReason, WizardEntry, WizardTier, CountBucket, LatencyBucket } from './setup-types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Generate a fresh `wizard_run_id` for one wizard invocation. Returned
|
|
4
|
-
* by `runSetupWizard()` entry and threaded into every emit call.
|
|
5
|
-
*
|
|
6
|
-
* v4 UUID — uses Node's crypto.randomUUID when available (Node 14.17+);
|
|
7
|
-
* otherwise falls back to a manual v4 derivation. Either path produces
|
|
8
|
-
* a 36-char hex-with-dashes string suitable for the GA4 custom-dimension
|
|
9
|
-
* `wizard_run_id` registered in `register-custom-dimensions.py`.
|
|
10
|
-
*/
|
|
11
|
-
export declare function newWizardRunId(): string;
|
|
12
|
-
export declare function emitWizardStarted(args: {
|
|
13
|
-
wizardRunId: string;
|
|
14
|
-
tier: WizardTier;
|
|
15
|
-
entry: WizardEntry;
|
|
16
|
-
installedAgentsBucket: CountBucket;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
export declare function emitWizardStepStarted(args: {
|
|
19
|
-
wizardRunId: string;
|
|
20
|
-
step: WizardStep;
|
|
21
|
-
}): Promise<void>;
|
|
22
|
-
export declare function emitWizardStepCompleted(args: {
|
|
23
|
-
wizardRunId: string;
|
|
24
|
-
step: WizardStep;
|
|
25
|
-
latencyBucket: LatencyBucket;
|
|
26
|
-
}): Promise<void>;
|
|
27
|
-
export declare function emitWizardStepFailed(args: {
|
|
28
|
-
wizardRunId: string;
|
|
29
|
-
step: WizardStep;
|
|
30
|
-
reason: WizardStepFailureReason;
|
|
31
|
-
latencyBucket: LatencyBucket;
|
|
32
|
-
}): Promise<void>;
|
|
33
|
-
export declare function emitWizardCompleted(args: {
|
|
34
|
-
wizardRunId: string;
|
|
35
|
-
outcome: 'ok' | 'saved_after_test_warning';
|
|
36
|
-
tier: WizardTier;
|
|
37
|
-
seatsBucket: CountBucket;
|
|
38
|
-
agentsDistinctBucket: CountBucket;
|
|
39
|
-
rolesDistinctBucket: CountBucket;
|
|
40
|
-
totalLatencyBucket: LatencyBucket;
|
|
41
|
-
}): Promise<void>;
|
|
42
|
-
export declare function emitWizardAborted(args: {
|
|
43
|
-
wizardRunId: string;
|
|
44
|
-
reason: WizardAbortReason;
|
|
45
|
-
lastStep: WizardStep;
|
|
46
|
-
}): Promise<void>;
|
|
47
|
-
type BeaconRecord = {
|
|
48
|
-
name: string;
|
|
49
|
-
params: Record<string, string | number>;
|
|
50
|
-
};
|
|
51
|
-
type BeaconSink = (record: BeaconRecord) => void;
|
|
52
|
-
export declare function __setBeaconSink(sink: BeaconSink): void;
|
|
53
|
-
export declare function __resetBeaconSink(): void;
|
|
54
|
-
export {};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { WizardSeatPick, WizardStepFailureReason } from './setup-types.js';
|
|
2
|
-
import type { ReviewerSpec, ReviewerVerdict } from '../reviewer/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Canned proposal — byte-identical across all installations. Locked
|
|
5
|
-
* 2026-05-03 per PHASE-3-A-DESIGN.md §3. Do NOT edit without going
|
|
6
|
-
* through a re-review of the entire Test My Agents protocol; the
|
|
7
|
-
* prose is part of the wizard's contract test surface (the new-contract
|
|
8
|
-
* row at PHASE-3-A-DESIGN.md:495 asserts byte-identicality).
|
|
9
|
-
*
|
|
10
|
-
* The proposal is intentionally trivial + read-only. The wizard does
|
|
11
|
-
* NOT actually create /tmp/quorum_test_hello.py — APPROVE is the
|
|
12
|
-
* expected outcome from a working reviewer.
|
|
13
|
-
*/
|
|
14
|
-
export declare const CANNED_PROPOSAL = "## Problem\nAdd a one-line Python \"Hello, World\" script to a new file.\n\n## Proposal\nCreate a single Python file at /tmp/quorum_test_hello.py containing the\nsingle line: print(\"hello world\")\n\n## Implementation Plan\n1. Create the file at /tmp/quorum_test_hello.py\n2. Write print(\"hello world\") on line 1 followed by a trailing newline\n3. Make no other changes\n\n## Expected Outputs\n- /tmp/quorum_test_hello.py \u2014 exists, contains the single-line script\n";
|
|
15
|
-
/**
|
|
16
|
-
* Per-seat timeout. PHASE-3-A-DESIGN.md §6 "Timeout (60s/seat)".
|
|
17
|
-
* Conservative — gives a slow CLI room to start + respond on a
|
|
18
|
-
* cold-spawned reviewer process. Shorter would pollute the failure
|
|
19
|
-
* recourse menu with false positives on first-run latency.
|
|
20
|
-
*/
|
|
21
|
-
export declare const PER_SEAT_TIMEOUT_MS = 60000;
|
|
22
|
-
/**
|
|
23
|
-
* Per-seat outcome rendered by the wizard. Returned by
|
|
24
|
-
* `runTestMyAgents` in the `seatOutcomes` array so the recourse menu
|
|
25
|
-
* can display each seat's status individually (per §3 "per-seat
|
|
26
|
-
* outputs ... are tagged with the seat ID and rendered together").
|
|
27
|
-
*/
|
|
28
|
-
export interface SeatOutcome {
|
|
29
|
-
seatId: number;
|
|
30
|
-
agent: WizardSeatPick['agent'];
|
|
31
|
-
role: WizardSeatPick['role'];
|
|
32
|
-
/** Wall-clock seconds elapsed for this seat's evaluate() call. */
|
|
33
|
-
elapsedSeconds: number;
|
|
34
|
-
/** Discriminated outcome — APPROVE plus the 6 failure shapes. */
|
|
35
|
-
result: {
|
|
36
|
-
kind: 'approve';
|
|
37
|
-
} | {
|
|
38
|
-
kind: 'revise';
|
|
39
|
-
} | {
|
|
40
|
-
kind: 'reject';
|
|
41
|
-
} | {
|
|
42
|
-
kind: 'escalate';
|
|
43
|
-
} | {
|
|
44
|
-
kind: 'parse_failure';
|
|
45
|
-
} | {
|
|
46
|
-
kind: 'spawn_failure';
|
|
47
|
-
reason: string;
|
|
48
|
-
} | {
|
|
49
|
-
kind: 'timeout';
|
|
50
|
-
elapsedMs: number;
|
|
51
|
-
} | {
|
|
52
|
-
kind: 'unknown_error';
|
|
53
|
-
message: string;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export type TestMyAgentsResult = {
|
|
57
|
-
ok: true;
|
|
58
|
-
seatOutcomes: SeatOutcome[];
|
|
59
|
-
} | {
|
|
60
|
-
ok: false;
|
|
61
|
-
reason: WizardStepFailureReason;
|
|
62
|
-
canSaveAnyway: boolean;
|
|
63
|
-
seatOutcomes: SeatOutcome[];
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Inputs for `runTestMyAgents`. The registry factory is injected so
|
|
67
|
-
* tests can swap in a mock; production passes
|
|
68
|
-
* `createSubprocessReviewerRegistry`.
|
|
69
|
-
*/
|
|
70
|
-
export interface TestMyAgentsDeps {
|
|
71
|
-
wizardRunId: string;
|
|
72
|
-
seats: WizardSeatPick[];
|
|
73
|
-
registryFactory?: () => {
|
|
74
|
-
evaluate: (spec: ReviewerSpec, gateId: string) => Promise<ReviewerVerdict>;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Status renderer. Tests pass a buffer; production passes a function
|
|
78
|
-
* that writes to process.stdout. Each call gets one line (no
|
|
79
|
-
* trailing newline added — caller controls).
|
|
80
|
-
*/
|
|
81
|
-
write?: (line: string) => void;
|
|
82
|
-
/**
|
|
83
|
-
* Test seam: a synthetic gateId. Phase 3.a's wizard is wholly
|
|
84
|
-
* client-side (PHASE-3-A-DESIGN.md §5 "Wizard never spawns through
|
|
85
|
-
* OrchestrationClient.connect()"), so the gateId is a local
|
|
86
|
-
* synthetic UUID — providers echo it back on the verdict but the
|
|
87
|
-
* wizard does not persist it. Tests can pin a known value.
|
|
88
|
-
*/
|
|
89
|
-
gateId?: string;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Run Step 2. Emits `wizard_step_started`, dispatches all seats in
|
|
93
|
-
* parallel via Promise.allSettled, classifies each outcome, emits
|
|
94
|
-
* `wizard_step_completed` (all APPROVE) or `wizard_step_failed` with
|
|
95
|
-
* the worst-blocker reason. Returns per-seat outcomes for the
|
|
96
|
-
* wizard's recourse renderer.
|
|
97
|
-
*/
|
|
98
|
-
export declare function runTestMyAgents(deps: TestMyAgentsDeps): Promise<TestMyAgentsResult>;
|
|
99
|
-
/**
|
|
100
|
-
* Render a per-failure-kind explanatory sentence per the §6 outcome
|
|
101
|
-
* table + §1 line 140 "Display the structured error describing what
|
|
102
|
-
* failed" requirement. The wizard prints this before the recourse
|
|
103
|
-
* menu so users see WHY each non-APPROVE seat failed, not just a
|
|
104
|
-
* status line.
|
|
105
|
-
*
|
|
106
|
-
* R1 round-1 M3 (resolved 2026-05-08).
|
|
107
|
-
*/
|
|
108
|
-
export declare function humanizeStep2Failures(outcomes: SeatOutcome[]): string[];
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import type { ReviewerRole as PolicyReviewerRole } from '../reviewer/types.js';
|
|
2
|
-
import type { AgentKind } from '../reviewer/types.js';
|
|
3
|
-
import { AgentType } from '../types/session.js';
|
|
4
|
-
import { ReviewerRole as SchemaReviewerRole } from '../types/reviewer.js';
|
|
5
|
-
/**
|
|
6
|
-
* Tier returned by `getSubscriptionStatus`. Drives seat budget +
|
|
7
|
-
* tier-gate at bootstrap.
|
|
8
|
-
*
|
|
9
|
-
* UPPERCASE wire format matches `codevibe-backend/graphql/schema.graphql:209`
|
|
10
|
-
* (`enum SubscriptionTier { FREE PRO MAX }`).
|
|
11
|
-
*/
|
|
12
|
-
export type WizardTier = 'FREE' | 'PRO' | 'MAX';
|
|
13
|
-
/**
|
|
14
|
-
* Tier-aware seat budget. Mirrors
|
|
15
|
-
* `codevibe-backend/lambda/user-management/index.ts:184-188`'s
|
|
16
|
-
* `REVIEWER_SEAT_COUNT` map. Free has no seats — orchestration is not
|
|
17
|
-
* permitted at that tier; the wizard short-circuits at bootstrap with
|
|
18
|
-
* the §6 upgrade interstitial.
|
|
19
|
-
*/
|
|
20
|
-
export declare const SEAT_BUDGET: Record<WizardTier, number | null>;
|
|
21
|
-
/**
|
|
22
|
-
* The 3-role lock from PHASE-3-A-DESIGN.md: the wizard offers ONLY
|
|
23
|
-
* `architecture` / `correctness` / `security`. The schema's
|
|
24
|
-
* `ReviewerRole` enum at `codevibe-backend/graphql/schema.graphql:167-177`
|
|
25
|
-
* still has 9 variants for backward compat / 2.0.x custom-roles
|
|
26
|
-
* (#80) — but the wizard NEVER sends a non-3-role seat to
|
|
27
|
-
* `updateReviewerPolicy`.
|
|
28
|
-
*
|
|
29
|
-
* snake_case matches `codevibe-core/src/reviewer/types.ts:52-61` (the
|
|
30
|
-
* reviewer-module wire). The wizard converts to AppSync UPPERCASE at
|
|
31
|
-
* the save boundary via `roleToAppSync()`.
|
|
32
|
-
*/
|
|
33
|
-
export declare const WIZARD_ROLES: readonly ["architecture", "correctness", "security"];
|
|
34
|
-
export type WizardRole = (typeof WIZARD_ROLES)[number];
|
|
35
|
-
/**
|
|
36
|
-
* Tier-aware default role for each seat (§1 "Default-role fallback").
|
|
37
|
-
* Seat 0 = architecture, Seat 1 = correctness, Seat 2 = security.
|
|
38
|
-
* When the canonical default is already taken by a previous seat, the
|
|
39
|
-
* wizard falls back to the first remaining role in canonical order.
|
|
40
|
-
*/
|
|
41
|
-
export declare const DEFAULT_ROLE_BY_SEAT: WizardRole[];
|
|
42
|
-
/**
|
|
43
|
-
* Canonical agent ordering used for wizard defaults. The first
|
|
44
|
-
* installed agent in this order is the default for each seat unless
|
|
45
|
-
* the user picks otherwise.
|
|
46
|
-
*/
|
|
47
|
-
export declare const AGENT_PRIORITY: AgentKind[];
|
|
48
|
-
/**
|
|
49
|
-
* The wizard's terminal outcomes. Drives `wizard_completed` /
|
|
50
|
-
* `wizard_aborted` GA4 events and the exit code.
|
|
51
|
-
*/
|
|
52
|
-
export type WizardOutcome = {
|
|
53
|
-
kind: 'ok';
|
|
54
|
-
saved: true;
|
|
55
|
-
seats: ReadonlyArray<WizardSeatPick>;
|
|
56
|
-
} | {
|
|
57
|
-
kind: 'saved_after_test_warning';
|
|
58
|
-
saved: true;
|
|
59
|
-
seats: ReadonlyArray<WizardSeatPick>;
|
|
60
|
-
} | {
|
|
61
|
-
kind: 'aborted';
|
|
62
|
-
reason: WizardAbortReason;
|
|
63
|
-
lastStep: WizardStep;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Reasons the wizard exited without saving. Mirror the
|
|
67
|
-
* `wizard_aborted.reason` taxonomy in PHASE-3-A-DESIGN.md §7.
|
|
68
|
-
*/
|
|
69
|
-
export type WizardAbortReason = 'ctrl_c' | 'tier_gate_free' | 'no_clis' | 'step_user_exit' | 'step_save_failed_exit' | 'auth_expired' | 'bootstrap_failure';
|
|
70
|
-
/**
|
|
71
|
-
* Wizard step taxonomy — used for `wizard_step_started`/`completed`/
|
|
72
|
-
* `failed` and `wizard_aborted.last_step`.
|
|
73
|
-
*/
|
|
74
|
-
export type WizardStep = 'bootstrap' | 'seat_assignment' | 'test_my_agents' | 'save';
|
|
75
|
-
/**
|
|
76
|
-
* Per-step `wizard_step_failed.reason` codes. Mirror the table in
|
|
77
|
-
* PHASE-3-A-DESIGN.md §7. Each step has its own bounded reason set;
|
|
78
|
-
* `seat_assignment` has no failure modes (the picker filters out
|
|
79
|
-
* invalid choices UI-side).
|
|
80
|
-
*/
|
|
81
|
-
export type WizardStepFailureReason = 'tier_gate_free' | 'not_signed_in' | 'subscription_status_network' | 'no_clis_installed' | 'test_revise' | 'test_reject' | 'test_escalate' | 'test_parse_failure' | 'test_spawn_failure' | 'test_timeout' | 'update_policy_network' | 'update_policy_5xx' | 'update_policy_throttle' | 'auth_token_expired';
|
|
82
|
-
/**
|
|
83
|
-
* One seat the user picked in Step 1. The wizard converts these to
|
|
84
|
-
* `ReviewerAgentSpecInput[]` at save time by uppercase-mapping role +
|
|
85
|
-
* agent (the schema's wire form).
|
|
86
|
-
*/
|
|
87
|
-
export interface WizardSeatPick {
|
|
88
|
-
seatId: number;
|
|
89
|
-
agent: AgentKind;
|
|
90
|
-
role: WizardRole;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Latency bucket for GA4 `latency_bucket_s` / `total_latency_bucket_s`
|
|
94
|
-
* dimensions. Bounded set — keeps GA4 cardinality tractable per R2
|
|
95
|
-
* round-1 MEDIUM (PHASE-3-A-DESIGN.md §7).
|
|
96
|
-
*/
|
|
97
|
-
export type LatencyBucket = '<2' | '2-5' | '5-10' | '10-30' | '30+';
|
|
98
|
-
/**
|
|
99
|
-
* Categorical bucket for "how many agents are installed" /
|
|
100
|
-
* "how many seats". Locked at "1" / "2" / "3" — there is no "4+"
|
|
101
|
-
* because Max is the ceiling.
|
|
102
|
-
*/
|
|
103
|
-
export type CountBucket = '1' | '2' | '3';
|
|
104
|
-
/**
|
|
105
|
-
* Entry point identifier — distinguishes meta CLI invocation from
|
|
106
|
-
* each plugin's alias (`codevibe-{claude,gemini,codex} orchestration setup`).
|
|
107
|
-
*/
|
|
108
|
-
export type WizardEntry = 'meta_cli' | 'claude_alias' | 'gemini_alias' | 'codex_alias';
|
|
109
|
-
/**
|
|
110
|
-
* Bucket a wall-clock duration into one of the 5 latency-bucket values.
|
|
111
|
-
* Used by telemetry for per-step + total-wizard timing dimensions.
|
|
112
|
-
*/
|
|
113
|
-
export declare function bucketLatencySeconds(seconds: number): LatencyBucket;
|
|
114
|
-
/**
|
|
115
|
-
* Bucket an integer count into "1" / "2" / "3", clamping anything
|
|
116
|
-
* higher to "3". Used for `seats_bucket`, `agents_distinct_bucket`,
|
|
117
|
-
* `roles_distinct_bucket`, `installed_agents_bucket`.
|
|
118
|
-
*/
|
|
119
|
-
export declare function bucketCount(n: number): CountBucket;
|
|
120
|
-
/**
|
|
121
|
-
* Map a wizard role (snake_case) to the reviewer-module's snake_case
|
|
122
|
-
* `ReviewerRole` literal type — used when building a `ReviewerSpec`
|
|
123
|
-
* for `createSubprocessReviewerRegistry().evaluate()`. Pass-through
|
|
124
|
-
* because `WizardRole` is a strict subset of `PolicyReviewerRole`.
|
|
125
|
-
*/
|
|
126
|
-
export declare function roleToReviewerSpec(role: WizardRole): PolicyReviewerRole;
|
|
127
|
-
/**
|
|
128
|
-
* Map a wizard role (snake_case) to the AppSync schema's UPPERCASE
|
|
129
|
-
* `ReviewerRole` enum — used when building a `ReviewerAgentSpecInput`
|
|
130
|
-
* for the `updateReviewerPolicy` mutation. The wizard locks to 3
|
|
131
|
-
* roles, so this mapping is exhaustive over `WizardRole` and never
|
|
132
|
-
* produces one of the 6 non-3-role variants.
|
|
133
|
-
*/
|
|
134
|
-
export declare function roleToAppSync(role: WizardRole): SchemaReviewerRole;
|
|
135
|
-
/**
|
|
136
|
-
* Map AgentKind (lowercase reviewer-module wire) to the AppSync
|
|
137
|
-
* `AgentType` enum (UPPERCASE). Used at save time when building the
|
|
138
|
-
* `ReviewerAgentSpecInput[]` for `updateReviewerPolicy`.
|
|
139
|
-
*/
|
|
140
|
-
export declare function agentToAppSync(agent: AgentKind): AgentType;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { DetectableAgent } from './detect-agents.js';
|
|
2
|
-
import { WizardEntry } from './setup-types.js';
|
|
3
|
-
import { PickerIO } from './setup-seat-picker.js';
|
|
4
|
-
import { AppSyncClient } from '../appsync/appsync-client.js';
|
|
5
|
-
import type { ReviewerSpec, ReviewerVerdict } from '../reviewer/index.js';
|
|
6
|
-
/**
|
|
7
|
-
* Parse `--entry=<value>` from argv. Defaults to `meta_cli` if absent
|
|
8
|
-
* or invalid. Plugin wrappers pass `--entry=claude_alias` /
|
|
9
|
-
* `gemini_alias` / `codex_alias` per the §4 alias contract.
|
|
10
|
-
*/
|
|
11
|
-
export declare function parseEntry(argv: string[]): WizardEntry;
|
|
12
|
-
/**
|
|
13
|
-
* Injectable dependencies for `runSetupWizardWithDeps`. Factored out
|
|
14
|
-
* so unit tests can drive the whole state machine deterministically
|
|
15
|
-
* (no real readline, no real subprocess spawn, no real network).
|
|
16
|
-
*
|
|
17
|
-
* Production callers use `runSetupWizard`, which wires the production
|
|
18
|
-
* deps + calls `process.exit(result.exitCode)`.
|
|
19
|
-
*/
|
|
20
|
-
export interface SetupWizardDeps {
|
|
21
|
-
/** Builds an authenticated AppSyncClient or returns null if unauthenticated. */
|
|
22
|
-
clientFactory: () => Promise<AppSyncClient | null>;
|
|
23
|
-
/** Returns the subset of agents present on PATH. */
|
|
24
|
-
agentDetector: () => DetectableAgent[];
|
|
25
|
-
/** Optional reviewer registry (Step 2). Default: real subprocess registry. */
|
|
26
|
-
registryFactory?: () => {
|
|
27
|
-
evaluate: (spec: ReviewerSpec, gateId: string) => Promise<ReviewerVerdict>;
|
|
28
|
-
};
|
|
29
|
-
/** Output writer — writes the line as-is (caller controls newlines). */
|
|
30
|
-
write: (line: string) => void;
|
|
31
|
-
/** Build a fresh PickerIO + close handle for the next interactive prompt. */
|
|
32
|
-
createPickerIO: () => {
|
|
33
|
-
io: PickerIO;
|
|
34
|
-
close: () => void;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Result of the wizard's state machine. The public `runSetupWizard`
|
|
39
|
-
* wrapper translates this to a `process.exit(exitCode)`.
|
|
40
|
-
*/
|
|
41
|
-
export interface SetupWizardResult {
|
|
42
|
-
exitCode: number;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Production entry point. Called from `runOrchestrationCli` when
|
|
46
|
-
* `argv[3] === 'setup'`. Builds production deps + calls process.exit
|
|
47
|
-
* with the wizard's exit code. Drives the full state machine via
|
|
48
|
-
* `runSetupWizardWithDeps`.
|
|
49
|
-
*/
|
|
50
|
-
export declare function runSetupWizard(argv: string[]): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Testable wizard core. Exits with code 0 on success or any user-
|
|
53
|
-
* initiated abort; exit 1 on a failure the user couldn't recover
|
|
54
|
-
* from in the recourse loop. SIGINT is registered + cleaned up
|
|
55
|
-
* around the call (no-op for tests when SIGINT is never fired).
|
|
56
|
-
*/
|
|
57
|
-
export declare function runSetupWizardWithDeps(argv: string[], deps: SetupWizardDeps): Promise<SetupWizardResult>;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Discriminator value emitted by the engine on
|
|
3
|
-
* `metadata.prompt_kind` for orchestration-escalated gate prompts.
|
|
4
|
-
*
|
|
5
|
-
* Sources of truth (any drift breaks the V1 bridge):
|
|
6
|
-
* - Engine emit: codevibe-core-rs `appsync_emit.rs:847-862`
|
|
7
|
-
* (`build_metadata_json` — emits exactly 5 keys: `tool_name`,
|
|
8
|
-
* `payload`, `prompt_kind`, `summary`, `timeline`).
|
|
9
|
-
* - iOS branch: MessageBubble.swift `extractInteractivePromptOptions`.
|
|
10
|
-
* - Android branch: MessageBubble.kt `extractOptions`.
|
|
11
|
-
*/
|
|
12
|
-
export declare const V1_ORCHESTRATION_PROMPT_KIND: "orchestration_escalated_gate";
|
|
13
|
-
/**
|
|
14
|
-
* V1 user-decision kind (3-position subset of the 5-kind enum).
|
|
15
|
-
*
|
|
16
|
-
* Lowercase snake_case matches `@quantiya/quorum-core`'s `UserDecisionKind`
|
|
17
|
-
* caller-facing type at `codevibe-core-rs/packages/quorum-core/src/types.ts:232-238`.
|
|
18
|
-
* The quorum-core SDK's `applyUserDecision` mutator accepts this lowercase
|
|
19
|
-
* form and internally uppercases via `toWireEnum` before AppSync wire-send
|
|
20
|
-
* (`client.ts:244-246` + line 474). Plugins pass lowercase; the SDK is the
|
|
21
|
-
* conversion layer.
|
|
22
|
-
*
|
|
23
|
-
* iOS + Android pin UPPERCASE in their own enums because they call AppSync
|
|
24
|
-
* GraphQL directly via Amplify (no SDK conversion layer in their path).
|
|
25
|
-
* Both are correct at their respective layers.
|
|
26
|
-
*
|
|
27
|
-
* The two `_WITH_NOTES` variants from the full 5-kind enum are V2 — they
|
|
28
|
-
* require a `notes: EncryptedPayloadInput` value alongside the kind, and
|
|
29
|
-
* V1's "type a number" UX has no notes-input surface. They are deliberately
|
|
30
|
-
* EXCLUDED from this union; `mapOptionNumberToUserDecisionKind` cannot
|
|
31
|
-
* return them.
|
|
32
|
-
*/
|
|
33
|
-
export type V1UserDecisionKind = 'accept' | 'reject_restart' | 'abort_task';
|
|
34
|
-
/**
|
|
35
|
-
* One row of the V1 orchestration option table.
|
|
36
|
-
*
|
|
37
|
-
* `number` is a string (`"1"` / `"2"` / `"3"`) to match iOS' tuple shape
|
|
38
|
-
* `(number: String, text: String)` and the existing
|
|
39
|
-
* `InteractivePromptOption` shape elsewhere in the mobile renderers.
|
|
40
|
-
*/
|
|
41
|
-
export interface V1OrchestrationOption {
|
|
42
|
-
readonly number: string;
|
|
43
|
-
readonly label: string;
|
|
44
|
-
readonly kind: V1UserDecisionKind;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The V1 hardcoded 3-position option table.
|
|
48
|
-
*
|
|
49
|
-
* Order is LOAD-BEARING — `V1_ORCHESTRATION_OPTIONS[i].kind` is the kind
|
|
50
|
-
* sent to the server when the user types option-number `i+1`. Drift from
|
|
51
|
-
* iOS / Android = wrong `UserDecisionKind` on the wire (engine has no
|
|
52
|
-
* server-side validation).
|
|
53
|
-
*
|
|
54
|
-
* position 1 -> accept -> "Accept"
|
|
55
|
-
* position 2 -> reject_restart -> "Reject (restart proposal)"
|
|
56
|
-
* position 3 -> abort_task -> "Abort task"
|
|
57
|
-
*
|
|
58
|
-
* (Kind values are lowercase to match the SDK caller-facing type — see
|
|
59
|
-
* the header comment on the SDK conversion layer. iOS + Android pin
|
|
60
|
-
* UPPERCASE in their own constant tables because they hit AppSync
|
|
61
|
-
* directly without the SDK.)
|
|
62
|
-
*
|
|
63
|
-
* Frozen with `as const` so callers cannot mutate the array nor swap
|
|
64
|
-
* entries in place at runtime.
|
|
65
|
-
*/
|
|
66
|
-
export declare const V1_ORCHESTRATION_OPTIONS: readonly [
|
|
67
|
-
V1OrchestrationOption,
|
|
68
|
-
V1OrchestrationOption,
|
|
69
|
-
V1OrchestrationOption
|
|
70
|
-
];
|
|
71
|
-
/**
|
|
72
|
-
* Map a 1-based option number typed by the user to the matching V1
|
|
73
|
-
* `UserDecisionKind`. Returns `null` for ANY number outside 1..3 —
|
|
74
|
-
* callers MUST surface an error and abort the submit on null (the
|
|
75
|
-
* engine would reject `_WITH_NOTES` kinds without a notes payload in
|
|
76
|
-
* V1, and ANY out-of-range number means the user hit a typo, an
|
|
77
|
-
* accidental keystroke, or a malformed prompt).
|
|
78
|
-
*
|
|
79
|
-
* Out-of-range MUST return null — NOT fall back to `ACCEPT` or any
|
|
80
|
-
* default. A silent fallback would silently destroy or accept the
|
|
81
|
-
* user's work without their consent. Pinned by the
|
|
82
|
-
* `out-of-range returns null` test.
|
|
83
|
-
*
|
|
84
|
-
* @param optionNumber 1-based option position as typed by the user.
|
|
85
|
-
* @returns The matching `V1UserDecisionKind`, or `null` when out of range.
|
|
86
|
-
*/
|
|
87
|
-
export declare function mapOptionNumberToUserDecisionKind(optionNumber: number): V1UserDecisionKind | null;
|
|
88
|
-
/**
|
|
89
|
-
* Shorter alias of `mapOptionNumberToUserDecisionKind`. Matches the helper
|
|
90
|
-
* name used in `PHASE-3-B-MOBILE-V1-BRIDGE-DESIGN.md` §3.1 + §6 Test 9 +
|
|
91
|
-
* §8 source-map row (`mapOptionToUserDecisionKind`). Both names point at
|
|
92
|
-
* the same function — pick whichever reads cleaner at the call site.
|
|
93
|
-
*
|
|
94
|
-
* Plugins can `import { mapOptionToUserDecisionKind }` per the design
|
|
95
|
-
* doc's call-site example at §3.1.
|
|
96
|
-
*/
|
|
97
|
-
export declare const mapOptionToUserDecisionKind: typeof mapOptionNumberToUserDecisionKind;
|
|
98
|
-
/**
|
|
99
|
-
* Lowercase-to-uppercase conversion: `V1UserDecisionKind` (caller-facing,
|
|
100
|
-
* matches `@quantiya/quorum-core` SDK) → `UserDecisionKind` wire enum
|
|
101
|
-
* (matches AppSync schema). Plugins that call `AppSyncClient.applyUserDecision`
|
|
102
|
-
* directly (no SDK in path) use this helper to bridge the V1 option table's
|
|
103
|
-
* lowercase kind to the wire form.
|
|
104
|
-
*
|
|
105
|
-
* Total over the 3 V1 kinds — never returns null for a valid
|
|
106
|
-
* `V1UserDecisionKind` input.
|
|
107
|
-
*/
|
|
108
|
-
export declare function mapV1KindToWire(kind: V1UserDecisionKind): 'ACCEPT' | 'REJECT_RESTART' | 'ABORT_TASK';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/output-parser.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type { AgentKind, ReviewerRole, ReviewerVerdict, VerdictId, VerdictKind, } from './types.js';
|
|
2
|
-
export type { ReviewerError, ReviewerProvider, ReviewerSpec, } from './provider.js';
|
|
3
|
-
export { ReviewerErrorClass } from './provider.js';
|
|
4
|
-
export type { ParseResult, ParsedVerdict, VerdictParseError, } from './output-parser.js';
|
|
5
|
-
export { parseVerdictOutput, VerdictParseErrorClass } from './output-parser.js';
|
|
6
|
-
export type { RunReviewerOptions, SubprocessError, SubprocessOutcome, } from './subprocess.js';
|
|
7
|
-
export { runReviewer, SubprocessErrorClass } from './subprocess.js';
|
|
8
|
-
export type { ClaudeReviewerProviderOptions } from './providers/claude.js';
|
|
9
|
-
export { ClaudeReviewerProvider } from './providers/claude.js';
|
|
10
|
-
export type { GeminiEnvelope, GeminiModelStats, GeminiReviewerProviderOptions, GeminiStats, } from './providers/gemini.js';
|
|
11
|
-
export { GeminiReviewerProvider } from './providers/gemini.js';
|
|
12
|
-
export type { CodexReviewerProviderOptions } from './providers/codex.js';
|
|
13
|
-
export { CodexReviewerProvider } from './providers/codex.js';
|
|
14
|
-
export { ReviewerRegistry, createSubprocessReviewerRegistry, } from './registry.js';
|
|
15
|
-
export { MockReviewerSpawner, StaticReviewerMock } from './mocks.js';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { type ReviewerProvider, type ReviewerSpec } from './provider.js';
|
|
2
|
-
import type { AgentKind, ReviewerVerdict, VerdictKind } from './types.js';
|
|
3
|
-
import { type ReviewerError } from './provider.js';
|
|
4
|
-
/**
|
|
5
|
-
* Scripted `ReviewerProvider` for tests. Each `evaluate(spec, gateId)`
|
|
6
|
-
* pops the next response from the FIFO queue keyed by
|
|
7
|
-
* `(spec.agent, gateId)`. If no script remains, returns a SpawnFailed
|
|
8
|
-
* error with a diagnostic so test setup bugs surface loudly.
|
|
9
|
-
*
|
|
10
|
-
* Use the `script_*` methods to queue responses before tests call
|
|
11
|
-
* `evaluate`.
|
|
12
|
-
*/
|
|
13
|
-
export declare class MockReviewerSpawner implements ReviewerProvider {
|
|
14
|
-
private readonly scripts;
|
|
15
|
-
private static key;
|
|
16
|
-
/**
|
|
17
|
-
* Script a verdict (with empty `suggested_changes`) for the next
|
|
18
|
-
* `evaluate(agent, gateId)` call. Use `scriptVerdictWithChanges`
|
|
19
|
-
* when `kind === 'REVISE'` (the parser-locked invariant requires
|
|
20
|
-
* non-empty changes for REVISE).
|
|
21
|
-
*/
|
|
22
|
-
scriptVerdict(agent: AgentKind, gateId: string, kind: VerdictKind, reasoning: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Script a verdict with explicit `suggested_changes`. Required when
|
|
25
|
-
* `kind === 'REVISE'`.
|
|
26
|
-
*/
|
|
27
|
-
scriptVerdictWithChanges(agent: AgentKind, gateId: string, kind: VerdictKind, reasoning: string, suggested_changes: string[]): void;
|
|
28
|
-
/** Script an error to return on the next `evaluate(agent, gateId)` call. */
|
|
29
|
-
scriptError(agent: AgentKind, gateId: string, error: ReviewerError): void;
|
|
30
|
-
/**
|
|
31
|
-
* How many scripted responses remain for the given key. Useful for
|
|
32
|
-
* test post-conditions ("all scripts were consumed").
|
|
33
|
-
*/
|
|
34
|
-
remaining(agent: AgentKind, gateId: string): number;
|
|
35
|
-
evaluate(spec: ReviewerSpec, gateId: string): Promise<ReviewerVerdict>;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Stateless `ReviewerProvider` for engine-level integration tests and
|
|
39
|
-
* smoke tests. Ignores `gateId`; returns a fixed verdict per agent
|
|
40
|
-
* (or a global default).
|
|
41
|
-
*
|
|
42
|
-
* Construct via static factories:
|
|
43
|
-
* - `StaticReviewerMock.allApprove()` / `.allReject()` / `.allRevise(changes)`
|
|
44
|
-
* / `.allEscalate()` — global default, every agent returns the same.
|
|
45
|
-
* - `StaticReviewerMock.allError(err)` — every agent returns the same error.
|
|
46
|
-
*
|
|
47
|
-
* Stack per-agent overrides on top:
|
|
48
|
-
* - `.withAgentVerdict(agent, kind)` — override one agent's verdict.
|
|
49
|
-
* - `.withAgentError(agent, err)` — override one agent's error.
|
|
50
|
-
*
|
|
51
|
-
* Stacking models mixed-verdict scenarios: e.g.
|
|
52
|
-
* `StaticReviewerMock.allApprove().withAgentVerdict('gemini', 'REJECT')`
|
|
53
|
-
* → Claude approves + Gemini rejects + Codex approves → engine escalates.
|
|
54
|
-
*/
|
|
55
|
-
export declare class StaticReviewerMock implements ReviewerProvider {
|
|
56
|
-
private defaultResponse;
|
|
57
|
-
private readonly perAgent;
|
|
58
|
-
/** Empty mock. Returns SpawnFailed with a diagnostic on every
|
|
59
|
-
* `evaluate` call until a default or per-agent override is set. */
|
|
60
|
-
static new(): StaticReviewerMock;
|
|
61
|
-
/** All reviewers return APPROVE. */
|
|
62
|
-
static allApprove(): StaticReviewerMock;
|
|
63
|
-
/** All reviewers return REJECT. */
|
|
64
|
-
static allReject(): StaticReviewerMock;
|
|
65
|
-
/** All reviewers return REVISE with the given suggested changes.
|
|
66
|
-
* Empty `changes` falls back to a placeholder. */
|
|
67
|
-
static allRevise(changes: string[]): StaticReviewerMock;
|
|
68
|
-
/** All reviewers return ESCALATE. */
|
|
69
|
-
static allEscalate(): StaticReviewerMock;
|
|
70
|
-
/** All reviewers return the given error. */
|
|
71
|
-
static allError(err: ReviewerError): StaticReviewerMock;
|
|
72
|
-
/**
|
|
73
|
-
* Override the response for one agent. Stacks on top of whatever
|
|
74
|
-
* default was configured. Returns `this` for fluent chaining.
|
|
75
|
-
*/
|
|
76
|
-
withAgentVerdict(agent: AgentKind, kind: VerdictKind): this;
|
|
77
|
-
/** Override to return an error for one specific agent. */
|
|
78
|
-
withAgentError(agent: AgentKind, err: ReviewerError): this;
|
|
79
|
-
evaluate(spec: ReviewerSpec, gateId: string): Promise<ReviewerVerdict>;
|
|
80
|
-
}
|