wotann 0.5.44 → 0.5.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/orphan-wires/redteam-scan-cmd.d.ts +21 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.d.ts.map +1 -1
- package/dist/cli/orphan-wires/redteam-scan-cmd.js +104 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.js.map +1 -1
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/dist/intelligence/action-item-extractor.d.ts +1 -1
- package/dist/intelligence/action-item-extractor.d.ts.map +1 -1
- package/dist/intelligence/action-item-extractor.js +19 -0
- package/dist/intelligence/action-item-extractor.js.map +1 -1
- package/dist/intelligence/agent-patterns/catalog.d.ts +20 -0
- package/dist/intelligence/agent-patterns/catalog.d.ts.map +1 -1
- package/dist/intelligence/agent-patterns/catalog.js +25 -0
- package/dist/intelligence/agent-patterns/catalog.js.map +1 -1
- package/dist/intelligence/agent-patterns/patterns-extended.d.ts +12 -0
- package/dist/intelligence/agent-patterns/patterns-extended.d.ts.map +1 -1
- package/dist/intelligence/agent-patterns/patterns-extended.js +102 -1
- package/dist/intelligence/agent-patterns/patterns-extended.js.map +1 -1
- package/dist/intelligence/quant/time-series.d.ts +49 -0
- package/dist/intelligence/quant/time-series.d.ts.map +1 -1
- package/dist/intelligence/quant/time-series.js +51 -0
- package/dist/intelligence/quant/time-series.js.map +1 -1
- package/dist/marketplace/registry.d.ts +6 -0
- package/dist/marketplace/registry.d.ts.map +1 -1
- package/dist/marketplace/registry.js +35 -7
- package/dist/marketplace/registry.js.map +1 -1
- package/dist/middleware/pipeline.d.ts +17 -1
- package/dist/middleware/pipeline.d.ts.map +1 -1
- package/dist/middleware/pipeline.js +74 -1
- package/dist/middleware/pipeline.js.map +1 -1
- package/dist/orchestration/architect-implement.d.ts +31 -0
- package/dist/orchestration/architect-implement.d.ts.map +1 -1
- package/dist/orchestration/architect-implement.js +43 -8
- package/dist/orchestration/architect-implement.js.map +1 -1
- package/dist/orchestration/autonomous.d.ts +75 -0
- package/dist/orchestration/autonomous.d.ts.map +1 -1
- package/dist/orchestration/autonomous.js +69 -0
- package/dist/orchestration/autonomous.js.map +1 -1
- package/dist/skills/anthropic-imports/pptx-writer.d.ts +12 -0
- package/dist/skills/anthropic-imports/pptx-writer.d.ts.map +1 -1
- package/dist/skills/anthropic-imports/pptx-writer.js +17 -0
- package/dist/skills/anthropic-imports/pptx-writer.js.map +1 -1
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +28 -9
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/terminal-blocks/block.d.ts +51 -0
- package/dist/ui/terminal-blocks/block.d.ts.map +1 -1
- package/dist/ui/terminal-blocks/block.js +61 -0
- package/dist/ui/terminal-blocks/block.js.map +1 -1
- package/dist/utils/platform.d.ts +31 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +63 -0
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/wotann-home.d.ts +41 -0
- package/dist/utils/wotann-home.d.ts.map +1 -1
- package/dist/utils/wotann-home.js +48 -0
- package/dist/utils/wotann-home.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,5 +24,26 @@
|
|
|
24
24
|
* fresh install.
|
|
25
25
|
*/
|
|
26
26
|
import type { Command } from "commander";
|
|
27
|
+
import { type TauriAuditInput, type TauriFinding } from "../../intelligence/everything-cc/tauri-pattern-checks.js";
|
|
28
|
+
interface TauriAuditOpts {
|
|
29
|
+
readonly spec?: string;
|
|
30
|
+
readonly json?: boolean;
|
|
31
|
+
readonly out?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Round 64 wire (zombie #20): structural audit of a Tauri app. The
|
|
35
|
+
* caller passes a JSON spec matching `TauriAuditInput` (defined cmds,
|
|
36
|
+
* registered cmds, invoked cmds, sidecars, IPC keys). We hand the spec
|
|
37
|
+
* to `auditTauriApp` and emit the findings as Markdown or JSON.
|
|
38
|
+
*
|
|
39
|
+
* This is deliberately I/O-thin — extraction of the spec from a real
|
|
40
|
+
* Tauri repo is the caller's job; the runtime check is what we provide.
|
|
41
|
+
*/
|
|
42
|
+
declare function isTauriAuditInput(v: unknown): v is TauriAuditInput;
|
|
43
|
+
declare function renderTauriFindingsMd(findings: readonly TauriFinding[]): string;
|
|
44
|
+
declare function runTauriAudit(opts: TauriAuditOpts): Promise<void>;
|
|
27
45
|
export declare function registerRedteamScanWire(parent: Command): void;
|
|
46
|
+
export { runTauriAudit as _runTauriAuditForTesting };
|
|
47
|
+
export { renderTauriFindingsMd as _renderTauriFindingsMdForTesting };
|
|
48
|
+
export { isTauriAuditInput as _isTauriAuditInputForTesting };
|
|
28
49
|
//# sourceMappingURL=redteam-scan-cmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redteam-scan-cmd.d.ts","sourceRoot":"","sources":["../../../src/cli/orphan-wires/redteam-scan-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"redteam-scan-cmd.d.ts","sourceRoot":"","sources":["../../../src/cli/orphan-wires/redteam-scan-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,0DAA0D,CAAC;AA0JlE,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,iBAAS,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,eAAe,CAc3D;AAED,iBAAS,qBAAqB,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAiBxE;AAED,iBAAe,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ChE;AAID,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAkD7D;AAGD,OAAO,EAAE,aAAa,IAAI,wBAAwB,EAAE,CAAC;AACrD,OAAO,EAAE,qBAAqB,IAAI,gCAAgC,EAAE,CAAC;AACrE,OAAO,EAAE,iBAAiB,IAAI,4BAA4B,EAAE,CAAC"}
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { promises as fs } from "node:fs";
|
|
27
27
|
import { REDTEAM_PLUGIN_CATALOG, pluginsByCategory, pluginsBySeverity, renderMarkdownReport, runCatalogScan, } from "../../intelligence/eval-frameworks/redteam-plugin-catalog.js";
|
|
28
|
+
// Round 64 wire (zombie #20): expose the everything-cc Tauri structural
|
|
29
|
+
// auditor as a sibling verb. The pattern checks consume a caller-supplied
|
|
30
|
+
// `TauriAuditInput` JSON (no filesystem scanning here — the CLI surface
|
|
31
|
+
// stays I/O-thin, in line with the rest of the redteam-scan command).
|
|
32
|
+
import { auditTauriApp, } from "../../intelligence/everything-cc/tauri-pattern-checks.js";
|
|
28
33
|
// ── Helpers ──────────────────────────────────────────────────────────
|
|
29
34
|
function printPluginRow(p) {
|
|
30
35
|
process.stdout.write(` ${p.severity.padEnd(8)} ${p.id.padEnd(28)} ${p.description}\n`);
|
|
@@ -135,6 +140,85 @@ async function emitReports(reports, opts) {
|
|
|
135
140
|
process.stderr.write(`Wrote report to ${opts.out}\n`);
|
|
136
141
|
}
|
|
137
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Round 64 wire (zombie #20): structural audit of a Tauri app. The
|
|
145
|
+
* caller passes a JSON spec matching `TauriAuditInput` (defined cmds,
|
|
146
|
+
* registered cmds, invoked cmds, sidecars, IPC keys). We hand the spec
|
|
147
|
+
* to `auditTauriApp` and emit the findings as Markdown or JSON.
|
|
148
|
+
*
|
|
149
|
+
* This is deliberately I/O-thin — extraction of the spec from a real
|
|
150
|
+
* Tauri repo is the caller's job; the runtime check is what we provide.
|
|
151
|
+
*/
|
|
152
|
+
function isTauriAuditInput(v) {
|
|
153
|
+
if (!v || typeof v !== "object")
|
|
154
|
+
return false;
|
|
155
|
+
const o = v;
|
|
156
|
+
const strArr = (x) => Array.isArray(x) && x.every((s) => typeof s === "string");
|
|
157
|
+
return (strArr(o["definedCmds"]) &&
|
|
158
|
+
strArr(o["registeredCmds"]) &&
|
|
159
|
+
strArr(o["invokedCmds"]) &&
|
|
160
|
+
strArr(o["declaredSidecars"]) &&
|
|
161
|
+
strArr(o["shippedSidecars"]) &&
|
|
162
|
+
strArr(o["tsIpcKeys"]) &&
|
|
163
|
+
strArr(o["rustIpcKeys"]));
|
|
164
|
+
}
|
|
165
|
+
function renderTauriFindingsMd(findings) {
|
|
166
|
+
if (findings.length === 0)
|
|
167
|
+
return "# Tauri audit\n\nNo findings. Clean structure.\n";
|
|
168
|
+
const lines = ["# Tauri audit", ""];
|
|
169
|
+
const by = {};
|
|
170
|
+
for (const f of findings) {
|
|
171
|
+
const k = f.area;
|
|
172
|
+
if (!by[k])
|
|
173
|
+
by[k] = [];
|
|
174
|
+
by[k].push(f);
|
|
175
|
+
}
|
|
176
|
+
for (const area of Object.keys(by).sort()) {
|
|
177
|
+
lines.push(`## ${area}`);
|
|
178
|
+
for (const f of by[area]) {
|
|
179
|
+
lines.push(`- **${f.severity}**: ${f.message}`);
|
|
180
|
+
}
|
|
181
|
+
lines.push("");
|
|
182
|
+
}
|
|
183
|
+
return lines.join("\n");
|
|
184
|
+
}
|
|
185
|
+
async function runTauriAudit(opts) {
|
|
186
|
+
if (!opts.spec) {
|
|
187
|
+
process.stderr.write("error: --spec <path> is required (JSON matching TauriAuditInput shape)\n");
|
|
188
|
+
process.exit(2);
|
|
189
|
+
}
|
|
190
|
+
let raw;
|
|
191
|
+
try {
|
|
192
|
+
raw = await fs.readFile(opts.spec, "utf8");
|
|
193
|
+
}
|
|
194
|
+
catch (err) {
|
|
195
|
+
process.stderr.write(`error: failed to read spec: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
196
|
+
process.exit(2);
|
|
197
|
+
}
|
|
198
|
+
let parsed;
|
|
199
|
+
try {
|
|
200
|
+
parsed = JSON.parse(raw);
|
|
201
|
+
}
|
|
202
|
+
catch (err) {
|
|
203
|
+
process.stderr.write(`error: spec is not valid JSON: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
204
|
+
process.exit(2);
|
|
205
|
+
}
|
|
206
|
+
if (!isTauriAuditInput(parsed)) {
|
|
207
|
+
process.stderr.write("error: spec does not match TauriAuditInput shape (need definedCmds, registeredCmds, invokedCmds, declaredSidecars, shippedSidecars, tsIpcKeys, rustIpcKeys — all string[])\n");
|
|
208
|
+
process.exit(2);
|
|
209
|
+
}
|
|
210
|
+
const findings = auditTauriApp(parsed);
|
|
211
|
+
const body = opts.json ? JSON.stringify(findings, null, 2) : renderTauriFindingsMd(findings);
|
|
212
|
+
process.stdout.write(`${body}\n`);
|
|
213
|
+
if (opts.out) {
|
|
214
|
+
await fs.writeFile(opts.out, body, "utf8");
|
|
215
|
+
process.stderr.write(`Wrote audit to ${opts.out}\n`);
|
|
216
|
+
}
|
|
217
|
+
// Exit non-zero if any error-severity finding showed up — same
|
|
218
|
+
// convention as the redteam scan verb.
|
|
219
|
+
const errs = findings.filter((f) => f.severity === "error").length;
|
|
220
|
+
process.exit(errs > 0 ? 1 : 0);
|
|
221
|
+
}
|
|
138
222
|
// ── Registration ─────────────────────────────────────────────────────
|
|
139
223
|
export function registerRedteamScanWire(parent) {
|
|
140
224
|
const cmd = parent
|
|
@@ -165,5 +249,25 @@ export function registerRedteamScanWire(parent) {
|
|
|
165
249
|
process.exit(1);
|
|
166
250
|
}
|
|
167
251
|
});
|
|
252
|
+
// Round 64 wire (zombie #20) — structural audit of a Tauri app.
|
|
253
|
+
cmd
|
|
254
|
+
.command("tauri-audit")
|
|
255
|
+
.description("Structural audit of a Tauri app (cmd registration, sidecars, IPC drift)")
|
|
256
|
+
.requiredOption("--spec <path>", "Path to JSON spec matching TauriAuditInput shape")
|
|
257
|
+
.option("--json", "Emit JSON findings instead of Markdown", false)
|
|
258
|
+
.option("--out <path>", "Also write the audit to a file")
|
|
259
|
+
.action(async (opts) => {
|
|
260
|
+
try {
|
|
261
|
+
await runTauriAudit(opts);
|
|
262
|
+
}
|
|
263
|
+
catch (err) {
|
|
264
|
+
process.stderr.write(`tauri-audit failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
265
|
+
process.exit(1);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
168
268
|
}
|
|
269
|
+
// Round 64 wire — exported for unit tests; the CLI layer doesn't need it.
|
|
270
|
+
export { runTauriAudit as _runTauriAuditForTesting };
|
|
271
|
+
export { renderTauriFindingsMd as _renderTauriFindingsMdForTesting };
|
|
272
|
+
export { isTauriAuditInput as _isTauriAuditInputForTesting };
|
|
169
273
|
//# sourceMappingURL=redteam-scan-cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redteam-scan-cmd.js","sourceRoot":"","sources":["../../../src/cli/orphan-wires/redteam-scan-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,GAIf,MAAM,8DAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"redteam-scan-cmd.js","sourceRoot":"","sources":["../../../src/cli/orphan-wires/redteam-scan-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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,IAAI,CAAC,CAAC;QACtB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wBAAwB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC7E,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,gEAAgE;IAChE,GAAG;SACA,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,yEAAyE,CAAC;SACtF,cAAc,CAAC,eAAe,EAAE,kDAAkD,CAAC;SACnF,MAAM,CAAC,QAAQ,EAAE,wCAAwC,EAAE,KAAK,CAAC;SACjE,MAAM,CAAC,cAAc,EAAE,gCAAgC,CAAC;SACxD,MAAM,CAAC,KAAK,EAAE,IAAoB,EAAE,EAAE;QACrC,IAAI,CAAC;YACH,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,uBAAuB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC5E,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,0EAA0E;AAC1E,OAAO,EAAE,aAAa,IAAI,wBAAwB,EAAE,CAAC;AACrD,OAAO,EAAE,qBAAqB,IAAI,gCAAgC,EAAE,CAAC;AACrE,OAAO,EAAE,iBAAiB,IAAI,4BAA4B,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -189,13 +189,27 @@ program
|
|
|
189
189
|
// needsOnboarding) but the explicit wizard hand-holds the user
|
|
190
190
|
// through provider auth + a smoke-test message. Skip when an
|
|
191
191
|
// explicit --provider/--model was supplied (user knows what they
|
|
192
|
-
// want), or when WOTANN_SKIP_WIZARD=1 (CI / power users)
|
|
192
|
+
// want), or when WOTANN_SKIP_WIZARD=1 (CI / power users), OR when
|
|
193
|
+
// stdin/stdout isn't a real TTY — the Ink wizard uses useInput()
|
|
194
|
+
// which BLOCKS forever waiting for keypresses that never arrive
|
|
195
|
+
// when no controlling TTY is attached. This was the "npx wotann
|
|
196
|
+
// hangs" failure: certain npx exec wrappers and shells run the
|
|
197
|
+
// child with a degraded TTY, the wizard mounts to a void, and
|
|
198
|
+
// every keystroke is dropped. Matching the `wotann init` guard
|
|
199
|
+
// at the corresponding code path below ensures parity.
|
|
193
200
|
const detected = interactive.providers.filter((p) => p.available).length;
|
|
201
|
+
const isInteractiveTTY = Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY);
|
|
194
202
|
const skipWizard = process.env["WOTANN_SKIP_WIZARD"] === "1" ||
|
|
195
203
|
Boolean(options.provider) ||
|
|
196
|
-
Boolean(options.model)
|
|
204
|
+
Boolean(options.model) ||
|
|
205
|
+
!isInteractiveTTY;
|
|
197
206
|
if (detected === 0 && !skipWizard) {
|
|
198
207
|
try {
|
|
208
|
+
// Give the user immediate feedback so they know the wizard is
|
|
209
|
+
// about to mount — the Ink render itself can take 1-2s on
|
|
210
|
+
// cold start while react + ink load. Without this, the user
|
|
211
|
+
// sees a black screen and assumes it's hung.
|
|
212
|
+
process.stderr.write("[wotann] No providers detected — launching onboarding wizard…\n");
|
|
199
213
|
const { runOnboardingWizard } = await import("./cli/run-onboarding-wizard.js");
|
|
200
214
|
await runOnboardingWizard();
|
|
201
215
|
// After the wizard completes, re-bootstrap so the TUI sees the
|
|
@@ -210,6 +224,15 @@ program
|
|
|
210
224
|
process.stderr.write(`[wotann] onboarding wizard unavailable: ${msg}\n`);
|
|
211
225
|
}
|
|
212
226
|
}
|
|
227
|
+
else if (detected === 0 && !isInteractiveTTY) {
|
|
228
|
+
// Non-TTY caller with no providers: surface a plain-text hint
|
|
229
|
+
// so the user knows WHY the wizard didn't run. Then fall through
|
|
230
|
+
// to App.tsx's static banner (also TTY-safe).
|
|
231
|
+
process.stderr.write("[wotann] No providers detected and stdin is not a TTY. " +
|
|
232
|
+
"Run `wotann init` in an interactive terminal, or set " +
|
|
233
|
+
"ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY etc. " +
|
|
234
|
+
"in your environment. Continuing to TUI in static mode.\n");
|
|
235
|
+
}
|
|
213
236
|
// Switch to the alternate screen buffer before Ink takes over
|
|
214
237
|
// so the TUI gets the entire viewport and the user's scrollback
|
|
215
238
|
// is preserved untouched. Crash-safe — alt-buffer.ts wires
|