@nforma.ai/nforma 0.2.1
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/LICENSE +22 -0
- package/README.md +1024 -0
- package/agents/qgsd-codebase-mapper.md +764 -0
- package/agents/qgsd-debugger.md +1201 -0
- package/agents/qgsd-executor.md +472 -0
- package/agents/qgsd-integration-checker.md +443 -0
- package/agents/qgsd-phase-researcher.md +502 -0
- package/agents/qgsd-plan-checker.md +643 -0
- package/agents/qgsd-planner.md +1182 -0
- package/agents/qgsd-project-researcher.md +621 -0
- package/agents/qgsd-quorum-orchestrator.md +628 -0
- package/agents/qgsd-quorum-slot-worker.md +41 -0
- package/agents/qgsd-quorum-synthesizer.md +133 -0
- package/agents/qgsd-quorum-test-worker.md +37 -0
- package/agents/qgsd-quorum-worker.md +161 -0
- package/agents/qgsd-research-synthesizer.md +239 -0
- package/agents/qgsd-roadmapper.md +660 -0
- package/agents/qgsd-verifier.md +628 -0
- package/bin/accept-debug-invariant.cjs +165 -0
- package/bin/account-manager.cjs +719 -0
- package/bin/aggregate-requirements.cjs +466 -0
- package/bin/analyze-assumptions.cjs +757 -0
- package/bin/analyze-state-space.cjs +921 -0
- package/bin/attribute-trace-divergence.cjs +150 -0
- package/bin/auth-drivers/gh-cli.cjs +93 -0
- package/bin/auth-drivers/index.cjs +46 -0
- package/bin/auth-drivers/pool.cjs +67 -0
- package/bin/auth-drivers/simple.cjs +95 -0
- package/bin/autoClosePtoF.cjs +110 -0
- package/bin/blessed-terminal.cjs +350 -0
- package/bin/build-phase-index.cjs +472 -0
- package/bin/call-quorum-slot.cjs +541 -0
- package/bin/ccr-secure-config.cjs +99 -0
- package/bin/ccr-secure-start.cjs +83 -0
- package/bin/check-bundled-sdks.cjs +177 -0
- package/bin/check-coverage-guard.cjs +112 -0
- package/bin/check-liveness-fairness.cjs +95 -0
- package/bin/check-mcp-health.cjs +123 -0
- package/bin/check-provider-health.cjs +395 -0
- package/bin/check-results-exit.cjs +24 -0
- package/bin/check-spec-sync.cjs +360 -0
- package/bin/check-trace-redaction.cjs +271 -0
- package/bin/check-trace-schema-drift.cjs +99 -0
- package/bin/compareDrift.cjs +21 -0
- package/bin/conformance-schema.cjs +12 -0
- package/bin/count-scenarios.cjs +420 -0
- package/bin/debt-dedup.cjs +144 -0
- package/bin/debt-ledger.cjs +61 -0
- package/bin/debt-retention.cjs +76 -0
- package/bin/debt-state-machine.cjs +80 -0
- package/bin/detect-coverage-gaps.cjs +204 -0
- package/bin/detect-project-intent.cjs +362 -0
- package/bin/export-prism-constants.cjs +164 -0
- package/bin/extract-annotations.cjs +633 -0
- package/bin/extractFormalExpected.cjs +104 -0
- package/bin/fingerprint-drift.cjs +24 -0
- package/bin/fingerprint-issue.cjs +46 -0
- package/bin/formal-core.cjs +519 -0
- package/bin/formal-ref-linker.cjs +141 -0
- package/bin/formal-test-sync.cjs +788 -0
- package/bin/generate-formal-specs.cjs +588 -0
- package/bin/generate-petri-net.cjs +397 -0
- package/bin/generate-phase-spec.cjs +249 -0
- package/bin/generate-proposed-changes.cjs +194 -0
- package/bin/generate-tla-cfg.cjs +122 -0
- package/bin/generate-traceability-matrix.cjs +701 -0
- package/bin/generate-triage-bundle.cjs +300 -0
- package/bin/gh-account-rotate.cjs +34 -0
- package/bin/initialize-model-registry.cjs +105 -0
- package/bin/install-formal-tools.cjs +382 -0
- package/bin/install.js +2424 -0
- package/bin/isNumericThreshold.cjs +34 -0
- package/bin/issue-classifier.cjs +151 -0
- package/bin/levenshtein.cjs +74 -0
- package/bin/lint-formal-models.cjs +580 -0
- package/bin/load-baseline-requirements.cjs +275 -0
- package/bin/manage-agents-core.cjs +815 -0
- package/bin/migrate-formal-dir.cjs +172 -0
- package/bin/migrate-planning.cjs +206 -0
- package/bin/migrate-to-slots.cjs +255 -0
- package/bin/nForma.cjs +2726 -0
- package/bin/observe-config.cjs +353 -0
- package/bin/observe-debt-writer.cjs +140 -0
- package/bin/observe-handler-grafana.cjs +128 -0
- package/bin/observe-handler-internal.cjs +301 -0
- package/bin/observe-handler-logstash.cjs +153 -0
- package/bin/observe-handler-prometheus.cjs +185 -0
- package/bin/observe-handlers.cjs +436 -0
- package/bin/observe-registry.cjs +131 -0
- package/bin/observe-render.cjs +168 -0
- package/bin/planning-paths.cjs +167 -0
- package/bin/polyrepo.cjs +560 -0
- package/bin/prism-priority.cjs +153 -0
- package/bin/probe-quorum-slots.cjs +167 -0
- package/bin/promote-model.cjs +225 -0
- package/bin/propose-debug-invariants.cjs +165 -0
- package/bin/providers.json +392 -0
- package/bin/pty-proxy.py +129 -0
- package/bin/qgsd-solve.cjs +2477 -0
- package/bin/quorum-consensus-gate.cjs +238 -0
- package/bin/quorum-formal-context.cjs +183 -0
- package/bin/quorum-slot-dispatch.cjs +934 -0
- package/bin/read-policy.cjs +60 -0
- package/bin/requirement-map.cjs +63 -0
- package/bin/requirements-core.cjs +247 -0
- package/bin/resolve-cli.cjs +101 -0
- package/bin/review-mcp-logs.cjs +294 -0
- package/bin/run-account-manager-tlc.cjs +188 -0
- package/bin/run-account-pool-alloy.cjs +158 -0
- package/bin/run-alloy.cjs +153 -0
- package/bin/run-audit-alloy.cjs +187 -0
- package/bin/run-breaker-tlc.cjs +181 -0
- package/bin/run-formal-check.cjs +395 -0
- package/bin/run-formal-verify.cjs +701 -0
- package/bin/run-installer-alloy.cjs +188 -0
- package/bin/run-oauth-rotation-prism.cjs +132 -0
- package/bin/run-oscillation-tlc.cjs +202 -0
- package/bin/run-phase-tlc.cjs +228 -0
- package/bin/run-prism.cjs +446 -0
- package/bin/run-protocol-tlc.cjs +201 -0
- package/bin/run-quorum-composition-alloy.cjs +155 -0
- package/bin/run-sensitivity-sweep.cjs +231 -0
- package/bin/run-stop-hook-tlc.cjs +188 -0
- package/bin/run-tlc.cjs +467 -0
- package/bin/run-transcript-alloy.cjs +173 -0
- package/bin/run-uppaal.cjs +264 -0
- package/bin/secrets.cjs +134 -0
- package/bin/sensitivity-report.cjs +219 -0
- package/bin/sensitivity-sweep-feedback.cjs +194 -0
- package/bin/set-secret.cjs +29 -0
- package/bin/setup-telemetry-cron.sh +36 -0
- package/bin/sweepPtoF.cjs +63 -0
- package/bin/sync-baseline-requirements.cjs +290 -0
- package/bin/task-envelope.cjs +360 -0
- package/bin/telemetry-collector.cjs +229 -0
- package/bin/unified-mcp-server.mjs +735 -0
- package/bin/update-agents.cjs +369 -0
- package/bin/update-scoreboard.cjs +1134 -0
- package/bin/validate-debt-entry.cjs +207 -0
- package/bin/validate-invariant.cjs +419 -0
- package/bin/validate-memory.cjs +389 -0
- package/bin/validate-requirements-haiku.cjs +435 -0
- package/bin/validate-traces.cjs +438 -0
- package/bin/verify-formal-results.cjs +124 -0
- package/bin/verify-quorum-health.cjs +273 -0
- package/bin/write-check-result.cjs +106 -0
- package/bin/xstate-to-tla.cjs +483 -0
- package/bin/xstate-trace-walker.cjs +205 -0
- package/commands/qgsd/add-phase.md +43 -0
- package/commands/qgsd/add-requirement.md +24 -0
- package/commands/qgsd/add-todo.md +47 -0
- package/commands/qgsd/audit-milestone.md +37 -0
- package/commands/qgsd/check-todos.md +45 -0
- package/commands/qgsd/cleanup.md +18 -0
- package/commands/qgsd/close-formal-gaps.md +33 -0
- package/commands/qgsd/complete-milestone.md +136 -0
- package/commands/qgsd/debug.md +166 -0
- package/commands/qgsd/discuss-phase.md +83 -0
- package/commands/qgsd/execute-phase.md +117 -0
- package/commands/qgsd/fix-tests.md +27 -0
- package/commands/qgsd/formal-test-sync.md +32 -0
- package/commands/qgsd/health.md +22 -0
- package/commands/qgsd/help.md +22 -0
- package/commands/qgsd/insert-phase.md +32 -0
- package/commands/qgsd/join-discord.md +18 -0
- package/commands/qgsd/list-phase-assumptions.md +46 -0
- package/commands/qgsd/map-codebase.md +71 -0
- package/commands/qgsd/map-requirements.md +20 -0
- package/commands/qgsd/mcp-restart.md +176 -0
- package/commands/qgsd/mcp-set-model.md +134 -0
- package/commands/qgsd/mcp-setup.md +1371 -0
- package/commands/qgsd/mcp-status.md +274 -0
- package/commands/qgsd/mcp-update.md +238 -0
- package/commands/qgsd/new-milestone.md +44 -0
- package/commands/qgsd/new-project.md +42 -0
- package/commands/qgsd/observe.md +260 -0
- package/commands/qgsd/pause-work.md +38 -0
- package/commands/qgsd/plan-milestone-gaps.md +34 -0
- package/commands/qgsd/plan-phase.md +44 -0
- package/commands/qgsd/polyrepo.md +50 -0
- package/commands/qgsd/progress.md +24 -0
- package/commands/qgsd/queue.md +54 -0
- package/commands/qgsd/quick.md +133 -0
- package/commands/qgsd/quorum-test.md +275 -0
- package/commands/qgsd/quorum.md +707 -0
- package/commands/qgsd/reapply-patches.md +110 -0
- package/commands/qgsd/remove-phase.md +31 -0
- package/commands/qgsd/research-phase.md +189 -0
- package/commands/qgsd/resume-work.md +40 -0
- package/commands/qgsd/set-profile.md +34 -0
- package/commands/qgsd/settings.md +39 -0
- package/commands/qgsd/solve.md +565 -0
- package/commands/qgsd/sync-baselines.md +119 -0
- package/commands/qgsd/triage.md +233 -0
- package/commands/qgsd/update.md +37 -0
- package/commands/qgsd/verify-work.md +38 -0
- package/hooks/dist/config-loader.js +297 -0
- package/hooks/dist/conformance-schema.cjs +12 -0
- package/hooks/dist/gsd-context-monitor.js +64 -0
- package/hooks/dist/qgsd-check-update.js +62 -0
- package/hooks/dist/qgsd-circuit-breaker.js +682 -0
- package/hooks/dist/qgsd-precompact.js +156 -0
- package/hooks/dist/qgsd-prompt.js +653 -0
- package/hooks/dist/qgsd-session-start.js +122 -0
- package/hooks/dist/qgsd-slot-correlator.js +58 -0
- package/hooks/dist/qgsd-spec-regen.js +86 -0
- package/hooks/dist/qgsd-statusline.js +91 -0
- package/hooks/dist/qgsd-stop.js +553 -0
- package/hooks/dist/qgsd-token-collector.js +133 -0
- package/hooks/dist/unified-mcp-server.mjs +669 -0
- package/package.json +95 -0
- package/scripts/build-hooks.js +46 -0
- package/scripts/postinstall.js +48 -0
- package/scripts/secret-audit.sh +45 -0
- package/templates/qgsd.json +49 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
{
|
|
2
|
+
"providers": [
|
|
3
|
+
{
|
|
4
|
+
"name": "codex-1",
|
|
5
|
+
"provider": "openai",
|
|
6
|
+
"type": "subprocess",
|
|
7
|
+
"has_file_access": true,
|
|
8
|
+
"description": "Execute Codex CLI agent non-interactively (slot 1)",
|
|
9
|
+
"mainTool": "codex",
|
|
10
|
+
"model": "gpt-5.3-codex",
|
|
11
|
+
"model_detect": {
|
|
12
|
+
"file": "~/.codex/config.toml",
|
|
13
|
+
"pattern": "^model = \"([^\"]+)\""
|
|
14
|
+
},
|
|
15
|
+
"health_check_args": [
|
|
16
|
+
"--version"
|
|
17
|
+
],
|
|
18
|
+
"display_provider": "OpenAI",
|
|
19
|
+
"cli": "/opt/homebrew/bin/codex",
|
|
20
|
+
"args_template": [
|
|
21
|
+
"exec",
|
|
22
|
+
"{prompt}"
|
|
23
|
+
],
|
|
24
|
+
"helpArgs": [
|
|
25
|
+
"--help"
|
|
26
|
+
],
|
|
27
|
+
"extraTools": [
|
|
28
|
+
{
|
|
29
|
+
"name": "review",
|
|
30
|
+
"description": "Run a code review against the current repository using Codex CLI",
|
|
31
|
+
"args_template": [
|
|
32
|
+
"review",
|
|
33
|
+
"{prompt}"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"timeout_ms": 300000,
|
|
38
|
+
"quorum_timeout_ms": 30000,
|
|
39
|
+
"env": {},
|
|
40
|
+
"display_type": "codex-cli"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "codex-2",
|
|
44
|
+
"provider": "openai",
|
|
45
|
+
"type": "subprocess",
|
|
46
|
+
"has_file_access": true,
|
|
47
|
+
"description": "Execute Codex CLI agent non-interactively (slot 2)",
|
|
48
|
+
"mainTool": "codex",
|
|
49
|
+
"model": "gpt-5.3-codex",
|
|
50
|
+
"model_detect": {
|
|
51
|
+
"file": "~/.codex/config.toml",
|
|
52
|
+
"pattern": "^model = \"([^\"]+)\""
|
|
53
|
+
},
|
|
54
|
+
"health_check_args": [
|
|
55
|
+
"--version"
|
|
56
|
+
],
|
|
57
|
+
"display_provider": "OpenAI",
|
|
58
|
+
"cli": "/opt/homebrew/bin/codex",
|
|
59
|
+
"args_template": [
|
|
60
|
+
"exec",
|
|
61
|
+
"{prompt}"
|
|
62
|
+
],
|
|
63
|
+
"helpArgs": [
|
|
64
|
+
"--help"
|
|
65
|
+
],
|
|
66
|
+
"extraTools": [
|
|
67
|
+
{
|
|
68
|
+
"name": "review",
|
|
69
|
+
"description": "Run a code review against the current repository using Codex CLI",
|
|
70
|
+
"args_template": [
|
|
71
|
+
"review",
|
|
72
|
+
"{prompt}"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"timeout_ms": 300000,
|
|
77
|
+
"quorum_timeout_ms": 30000,
|
|
78
|
+
"env": {}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "gemini-1",
|
|
82
|
+
"provider": "google",
|
|
83
|
+
"type": "subprocess",
|
|
84
|
+
"has_file_access": true,
|
|
85
|
+
"description": "Query Gemini CLI agent non-interactively (slot 1)",
|
|
86
|
+
"mainTool": "gemini",
|
|
87
|
+
"model": "gemini-3-pro-preview",
|
|
88
|
+
"health_check_args": [
|
|
89
|
+
"--version"
|
|
90
|
+
],
|
|
91
|
+
"display_provider": "Google",
|
|
92
|
+
"cli": "/opt/homebrew/bin/gemini",
|
|
93
|
+
"args_template": [
|
|
94
|
+
"-m",
|
|
95
|
+
"gemini-3-pro-preview",
|
|
96
|
+
"-p",
|
|
97
|
+
"{prompt}"
|
|
98
|
+
],
|
|
99
|
+
"helpArgs": [
|
|
100
|
+
"--help"
|
|
101
|
+
],
|
|
102
|
+
"extraTools": [],
|
|
103
|
+
"timeout_ms": 300000,
|
|
104
|
+
"quorum_timeout_ms": 30000,
|
|
105
|
+
"env": {},
|
|
106
|
+
"display_type": "gemini-cli"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "gemini-2",
|
|
110
|
+
"provider": "google",
|
|
111
|
+
"type": "subprocess",
|
|
112
|
+
"has_file_access": true,
|
|
113
|
+
"description": "Query Gemini CLI agent non-interactively (slot 2)",
|
|
114
|
+
"mainTool": "gemini",
|
|
115
|
+
"model": "gemini-3-pro-preview",
|
|
116
|
+
"health_check_args": [
|
|
117
|
+
"--version"
|
|
118
|
+
],
|
|
119
|
+
"display_provider": "Google",
|
|
120
|
+
"cli": "/opt/homebrew/bin/gemini",
|
|
121
|
+
"args_template": [
|
|
122
|
+
"-m",
|
|
123
|
+
"gemini-3-pro-preview",
|
|
124
|
+
"-p",
|
|
125
|
+
"{prompt}"
|
|
126
|
+
],
|
|
127
|
+
"helpArgs": [
|
|
128
|
+
"--help"
|
|
129
|
+
],
|
|
130
|
+
"extraTools": [],
|
|
131
|
+
"timeout_ms": 300000,
|
|
132
|
+
"quorum_timeout_ms": 30000,
|
|
133
|
+
"env": {}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "opencode-1",
|
|
137
|
+
"provider": "xai",
|
|
138
|
+
"type": "subprocess",
|
|
139
|
+
"has_file_access": true,
|
|
140
|
+
"description": "Run OpenCode agent non-interactively with a message",
|
|
141
|
+
"mainTool": "opencode",
|
|
142
|
+
"model": "grok-code-fast-1",
|
|
143
|
+
"model_detect": {
|
|
144
|
+
"file": "~/.local/state/opencode/model.json",
|
|
145
|
+
"pattern": "\"recent\":\\[{\"providerID\":\"[^\"]*\",\"modelID\":\"([^\"]+)\""
|
|
146
|
+
},
|
|
147
|
+
"health_check_args": [
|
|
148
|
+
"--version"
|
|
149
|
+
],
|
|
150
|
+
"display_provider": "OpenCode",
|
|
151
|
+
"cli": "/opt/homebrew/bin/opencode",
|
|
152
|
+
"args_template": [
|
|
153
|
+
"run",
|
|
154
|
+
"{prompt}"
|
|
155
|
+
],
|
|
156
|
+
"helpArgs": [
|
|
157
|
+
"--help"
|
|
158
|
+
],
|
|
159
|
+
"extraTools": [
|
|
160
|
+
{
|
|
161
|
+
"name": "opencode_check_update",
|
|
162
|
+
"description": "Check whether a newer version of OpenCode is available on npm. Returns current version, latest version, and whether an update is available.",
|
|
163
|
+
"checkUpdate": true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"timeout_ms": 300000,
|
|
167
|
+
"quorum_timeout_ms": 30000,
|
|
168
|
+
"env": {},
|
|
169
|
+
"display_type": "opencode-cli"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "copilot-1",
|
|
173
|
+
"provider": "github",
|
|
174
|
+
"type": "subprocess",
|
|
175
|
+
"has_file_access": true,
|
|
176
|
+
"description": "Execute GitHub Copilot CLI non-interactively",
|
|
177
|
+
"mainTool": "ask",
|
|
178
|
+
"model": "gpt-4.1",
|
|
179
|
+
"health_check_args": [
|
|
180
|
+
"--version"
|
|
181
|
+
],
|
|
182
|
+
"display_provider": "GitHub",
|
|
183
|
+
"cli": "/opt/homebrew/bin/copilot",
|
|
184
|
+
"args_template": [
|
|
185
|
+
"-p",
|
|
186
|
+
"{prompt}",
|
|
187
|
+
"--allow-all-tools",
|
|
188
|
+
"--no-color",
|
|
189
|
+
"-s"
|
|
190
|
+
],
|
|
191
|
+
"helpArgs": [
|
|
192
|
+
"--help"
|
|
193
|
+
],
|
|
194
|
+
"extraTools": [
|
|
195
|
+
{
|
|
196
|
+
"name": "suggest",
|
|
197
|
+
"description": "Ask GitHub Copilot to suggest a shell, git, or gh CLI command for a given task.",
|
|
198
|
+
"args_template": [
|
|
199
|
+
"-p",
|
|
200
|
+
"Suggest a shell command for the following task: {prompt}",
|
|
201
|
+
"--allow-all-tools",
|
|
202
|
+
"--no-color",
|
|
203
|
+
"-s"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "explain",
|
|
208
|
+
"description": "Ask GitHub Copilot to explain what a shell command does in plain language.",
|
|
209
|
+
"args_template": [
|
|
210
|
+
"-p",
|
|
211
|
+
"Explain what the following shell command does: {prompt}",
|
|
212
|
+
"--allow-all-tools",
|
|
213
|
+
"--no-color",
|
|
214
|
+
"-s"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"timeout_ms": 300000,
|
|
219
|
+
"quorum_timeout_ms": 30000,
|
|
220
|
+
"env": {},
|
|
221
|
+
"display_type": "copilot-cli"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "claude-1",
|
|
225
|
+
"provider": "akashml",
|
|
226
|
+
"type": "subprocess",
|
|
227
|
+
"has_file_access": true,
|
|
228
|
+
"description": "DeepSeek-V3.2 via AkashML — real Claude Code CLI via ccr",
|
|
229
|
+
"mainTool": "claude",
|
|
230
|
+
"model": "deepseek-ai/DeepSeek-V3.2",
|
|
231
|
+
"display_provider": "AkashML",
|
|
232
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
233
|
+
"args_template": [
|
|
234
|
+
"claude-1",
|
|
235
|
+
"-p",
|
|
236
|
+
"{prompt}",
|
|
237
|
+
"--dangerously-skip-permissions"
|
|
238
|
+
],
|
|
239
|
+
"health_check_args": [
|
|
240
|
+
"-v"
|
|
241
|
+
],
|
|
242
|
+
"helpArgs": [
|
|
243
|
+
"--help"
|
|
244
|
+
],
|
|
245
|
+
"extraTools": [],
|
|
246
|
+
"timeout_ms": 300000,
|
|
247
|
+
"quorum_timeout_ms": 20000,
|
|
248
|
+
"env": {},
|
|
249
|
+
"display_type": "claude-code-router"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "claude-2",
|
|
253
|
+
"provider": "akashml",
|
|
254
|
+
"type": "subprocess",
|
|
255
|
+
"has_file_access": true,
|
|
256
|
+
"description": "MiniMax-M2.5 via AkashML — real Claude Code CLI via ccr",
|
|
257
|
+
"mainTool": "claude",
|
|
258
|
+
"model": "MiniMaxAI/MiniMax-M2.5",
|
|
259
|
+
"display_provider": "AkashML",
|
|
260
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
261
|
+
"args_template": [
|
|
262
|
+
"claude-2",
|
|
263
|
+
"-p",
|
|
264
|
+
"{prompt}",
|
|
265
|
+
"--dangerously-skip-permissions"
|
|
266
|
+
],
|
|
267
|
+
"health_check_args": [
|
|
268
|
+
"-v"
|
|
269
|
+
],
|
|
270
|
+
"helpArgs": [
|
|
271
|
+
"--help"
|
|
272
|
+
],
|
|
273
|
+
"extraTools": [],
|
|
274
|
+
"timeout_ms": 300000,
|
|
275
|
+
"quorum_timeout_ms": 20000,
|
|
276
|
+
"env": {},
|
|
277
|
+
"display_type": "claude-code-router"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "claude-3",
|
|
281
|
+
"provider": "together-xyz",
|
|
282
|
+
"type": "subprocess",
|
|
283
|
+
"has_file_access": true,
|
|
284
|
+
"description": "Qwen3-Coder-480B via Together.xyz — real Claude Code CLI via ccr",
|
|
285
|
+
"mainTool": "claude",
|
|
286
|
+
"model": "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
287
|
+
"display_provider": "Together.xyz",
|
|
288
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
289
|
+
"args_template": [
|
|
290
|
+
"claude-3",
|
|
291
|
+
"-p",
|
|
292
|
+
"{prompt}",
|
|
293
|
+
"--dangerously-skip-permissions"
|
|
294
|
+
],
|
|
295
|
+
"health_check_args": [
|
|
296
|
+
"-v"
|
|
297
|
+
],
|
|
298
|
+
"helpArgs": [
|
|
299
|
+
"--help"
|
|
300
|
+
],
|
|
301
|
+
"extraTools": [],
|
|
302
|
+
"timeout_ms": 300000,
|
|
303
|
+
"quorum_timeout_ms": 30000,
|
|
304
|
+
"env": {},
|
|
305
|
+
"display_type": "claude-code-router"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "claude-4",
|
|
309
|
+
"provider": "fireworks",
|
|
310
|
+
"type": "subprocess",
|
|
311
|
+
"has_file_access": true,
|
|
312
|
+
"description": "Kimi-K2 via Fireworks — real Claude Code CLI via ccr",
|
|
313
|
+
"mainTool": "claude",
|
|
314
|
+
"model": "accounts/fireworks/models/kimi-k2p5",
|
|
315
|
+
"display_provider": "Fireworks",
|
|
316
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
317
|
+
"args_template": [
|
|
318
|
+
"claude-4",
|
|
319
|
+
"-p",
|
|
320
|
+
"{prompt}",
|
|
321
|
+
"--dangerously-skip-permissions"
|
|
322
|
+
],
|
|
323
|
+
"health_check_args": [
|
|
324
|
+
"-v"
|
|
325
|
+
],
|
|
326
|
+
"helpArgs": [
|
|
327
|
+
"--help"
|
|
328
|
+
],
|
|
329
|
+
"extraTools": [],
|
|
330
|
+
"timeout_ms": 300000,
|
|
331
|
+
"quorum_timeout_ms": 30000,
|
|
332
|
+
"env": {},
|
|
333
|
+
"display_type": "claude-code-router"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "claude-5",
|
|
337
|
+
"provider": "together-xyz",
|
|
338
|
+
"type": "subprocess",
|
|
339
|
+
"has_file_access": true,
|
|
340
|
+
"description": "Llama-4-Maverick-17B via Together.xyz — real Claude Code CLI via ccr",
|
|
341
|
+
"mainTool": "claude",
|
|
342
|
+
"model": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
|
|
343
|
+
"display_provider": "Together.xyz",
|
|
344
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
345
|
+
"args_template": [
|
|
346
|
+
"claude-5",
|
|
347
|
+
"-p",
|
|
348
|
+
"{prompt}",
|
|
349
|
+
"--dangerously-skip-permissions"
|
|
350
|
+
],
|
|
351
|
+
"health_check_args": [
|
|
352
|
+
"-v"
|
|
353
|
+
],
|
|
354
|
+
"helpArgs": [
|
|
355
|
+
"--help"
|
|
356
|
+
],
|
|
357
|
+
"extraTools": [],
|
|
358
|
+
"timeout_ms": 300000,
|
|
359
|
+
"quorum_timeout_ms": 10000,
|
|
360
|
+
"env": {},
|
|
361
|
+
"display_type": "claude-code-router"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "claude-6",
|
|
365
|
+
"provider": "fireworks",
|
|
366
|
+
"type": "subprocess",
|
|
367
|
+
"has_file_access": true,
|
|
368
|
+
"description": "GLM-5 via Fireworks — real Claude Code CLI via ccr",
|
|
369
|
+
"mainTool": "claude",
|
|
370
|
+
"model": "accounts/fireworks/models/glm-5",
|
|
371
|
+
"display_provider": "Fireworks",
|
|
372
|
+
"cli": "/opt/homebrew/bin/ccr",
|
|
373
|
+
"args_template": [
|
|
374
|
+
"claude-6",
|
|
375
|
+
"-p",
|
|
376
|
+
"{prompt}",
|
|
377
|
+
"--dangerously-skip-permissions"
|
|
378
|
+
],
|
|
379
|
+
"health_check_args": [
|
|
380
|
+
"-v"
|
|
381
|
+
],
|
|
382
|
+
"helpArgs": [
|
|
383
|
+
"--help"
|
|
384
|
+
],
|
|
385
|
+
"extraTools": [],
|
|
386
|
+
"timeout_ms": 300000,
|
|
387
|
+
"quorum_timeout_ms": 8000,
|
|
388
|
+
"env": {},
|
|
389
|
+
"display_type": "claude-code-router"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
package/bin/pty-proxy.py
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
pty-proxy.py — zero-dependency PTY allocator for nForma's embedded terminal.
|
|
4
|
+
|
|
5
|
+
Spawns a command inside a real pseudo-terminal so interactive CLIs (like claude)
|
|
6
|
+
see isTTY=true on stdin/stdout/stderr. Proxies data between the parent's piped
|
|
7
|
+
stdio and the PTY master fd.
|
|
8
|
+
|
|
9
|
+
Usage: python3 pty-proxy.py <cols> <rows> <command> [args...]
|
|
10
|
+
|
|
11
|
+
Works on macOS and Linux without any native Node.js addons.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import pty, os, sys, select, signal, struct, fcntl, termios, errno
|
|
15
|
+
|
|
16
|
+
def set_winsize(fd, rows, cols):
|
|
17
|
+
"""Set the terminal window size on a PTY fd."""
|
|
18
|
+
try:
|
|
19
|
+
winsize = struct.pack('HHHH', rows, cols, 0, 0)
|
|
20
|
+
fcntl.ioctl(fd, termios.TIOCSWINSZ, winsize)
|
|
21
|
+
except Exception:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
def main():
|
|
25
|
+
if len(sys.argv) < 4:
|
|
26
|
+
sys.stderr.write('Usage: pty-proxy.py <cols> <rows> <command> [args...]\n')
|
|
27
|
+
sys.exit(1)
|
|
28
|
+
|
|
29
|
+
cols = int(sys.argv[1])
|
|
30
|
+
rows = int(sys.argv[2])
|
|
31
|
+
cmd = sys.argv[3]
|
|
32
|
+
args = sys.argv[3:] # argv[0] for the child = cmd
|
|
33
|
+
|
|
34
|
+
# Create PTY pair
|
|
35
|
+
master_fd, slave_fd = pty.openpty()
|
|
36
|
+
set_winsize(master_fd, rows, cols)
|
|
37
|
+
|
|
38
|
+
pid = os.fork()
|
|
39
|
+
if pid == 0:
|
|
40
|
+
# ── Child process ──
|
|
41
|
+
os.close(master_fd)
|
|
42
|
+
os.setsid()
|
|
43
|
+
|
|
44
|
+
# Set slave as controlling terminal
|
|
45
|
+
fcntl.ioctl(slave_fd, termios.TIOCSCTTY, 0)
|
|
46
|
+
|
|
47
|
+
# Redirect stdio to slave PTY
|
|
48
|
+
os.dup2(slave_fd, 0)
|
|
49
|
+
os.dup2(slave_fd, 1)
|
|
50
|
+
os.dup2(slave_fd, 2)
|
|
51
|
+
if slave_fd > 2:
|
|
52
|
+
os.close(slave_fd)
|
|
53
|
+
|
|
54
|
+
os.execvp(cmd, args)
|
|
55
|
+
# If exec fails
|
|
56
|
+
os._exit(127)
|
|
57
|
+
else:
|
|
58
|
+
# ── Parent process ──
|
|
59
|
+
os.close(slave_fd)
|
|
60
|
+
|
|
61
|
+
# Forward SIGWINCH to child (nForma sends this on resize)
|
|
62
|
+
def on_winch(signum, frame):
|
|
63
|
+
try:
|
|
64
|
+
os.kill(pid, signal.SIGWINCH)
|
|
65
|
+
except Exception:
|
|
66
|
+
pass
|
|
67
|
+
signal.signal(signal.SIGWINCH, on_winch)
|
|
68
|
+
|
|
69
|
+
# Make stdin non-blocking
|
|
70
|
+
stdin_fd = sys.stdin.fileno()
|
|
71
|
+
stdout_fd = sys.stdout.fileno()
|
|
72
|
+
|
|
73
|
+
# Set stdin to non-blocking
|
|
74
|
+
old_flags = fcntl.fcntl(stdin_fd, fcntl.F_GETFL)
|
|
75
|
+
fcntl.fcntl(stdin_fd, fcntl.F_SETFL, old_flags | os.O_NONBLOCK)
|
|
76
|
+
|
|
77
|
+
# Proxy loop: stdin → master, master → stdout
|
|
78
|
+
try:
|
|
79
|
+
while True:
|
|
80
|
+
try:
|
|
81
|
+
rfds, _, _ = select.select([stdin_fd, master_fd], [], [], 0.1)
|
|
82
|
+
except select.error:
|
|
83
|
+
break
|
|
84
|
+
|
|
85
|
+
if stdin_fd in rfds:
|
|
86
|
+
try:
|
|
87
|
+
data = os.read(stdin_fd, 4096)
|
|
88
|
+
if not data:
|
|
89
|
+
# stdin closed — send EOF to child
|
|
90
|
+
os.close(master_fd)
|
|
91
|
+
break
|
|
92
|
+
os.write(master_fd, data)
|
|
93
|
+
except OSError as e:
|
|
94
|
+
if e.errno not in (errno.EAGAIN, errno.EWOULDBLOCK):
|
|
95
|
+
break
|
|
96
|
+
|
|
97
|
+
if master_fd in rfds:
|
|
98
|
+
try:
|
|
99
|
+
data = os.read(master_fd, 4096)
|
|
100
|
+
if not data:
|
|
101
|
+
break
|
|
102
|
+
os.write(stdout_fd, data)
|
|
103
|
+
sys.stdout.flush()
|
|
104
|
+
except OSError as e:
|
|
105
|
+
if e.errno == errno.EIO:
|
|
106
|
+
# Child exited — PTY closed
|
|
107
|
+
break
|
|
108
|
+
if e.errno not in (errno.EAGAIN, errno.EWOULDBLOCK):
|
|
109
|
+
break
|
|
110
|
+
except KeyboardInterrupt:
|
|
111
|
+
pass
|
|
112
|
+
finally:
|
|
113
|
+
# Restore stdin flags
|
|
114
|
+
try:
|
|
115
|
+
fcntl.fcntl(stdin_fd, fcntl.F_SETFL, old_flags)
|
|
116
|
+
except Exception:
|
|
117
|
+
pass
|
|
118
|
+
|
|
119
|
+
# Wait for child and exit with its status
|
|
120
|
+
try:
|
|
121
|
+
_, status = os.waitpid(pid, 0)
|
|
122
|
+
if os.WIFEXITED(status):
|
|
123
|
+
sys.exit(os.WEXITSTATUS(status))
|
|
124
|
+
sys.exit(1)
|
|
125
|
+
except ChildProcessError:
|
|
126
|
+
sys.exit(0)
|
|
127
|
+
|
|
128
|
+
if __name__ == '__main__':
|
|
129
|
+
main()
|