@useorgx/wizard 0.1.65 → 0.1.66
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/README.md +1 -1
- package/dist/cli.js +27 -12
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ The wizard modifies local tool configuration only. Depending on the command, it
|
|
|
32
32
|
- Every profile or preview writes both the full evidence report and a compact, machine-safe `work-graph-agent-brief-*.md` with provenance, the growth edge, and a ready prompt for the smallest verifiable repair.
|
|
33
33
|
- `work-graph preview --from all` shows the same profile story locally without publishing.
|
|
34
34
|
- `work-graph runtime-event --source codex|claude --summary "..."` lets an agent write public-safe runtime evidence that the next AQ profile can collect.
|
|
35
|
-
- `hooks install [--targets codex,claude-code]` installs bounded local capture hooks. Terminal events write compact
|
|
35
|
+
- `hooks install [--targets codex,claude-code]` installs bounded local capture hooks. Terminal session events and adapter-supplied `RunEnd` events write compact summaries to a durable queue, then request a detached single-flight delivery worker. `RunEnd` represents one completed agent run inside a conversation that may continue. The hook does not read credentials or perform network I/O. Set `ORGX_SESSION_SUMMARY_AUTO_FLUSH=off` for local-only capture and manual delivery. The legacy transcript-derived execution-graph emit remains off unless `ORGX_EMIT_EXECUTION_GRAPH=1` is set.
|
|
36
36
|
- `ORGX_SESSION_WORK_CONTEXT` can carry one explicit, bounded JSON annotation for intent, authority, cost, artifact and evidence references, plus exact Context Capsule, decision, constraint, expectation, applied-learning, and prior-receipt references. Capsule delivery requires both the capsule reference and delivery timestamp. The Wizard does not infer this context from prompts; invalid or oversized annotations are omitted, and unknown fields are removed before cloud delivery.
|
|
37
37
|
- `hooks flush [--limit 100]` is the manual delivery and recovery path. It uses the same queue lease as automatic delivery and removes each valid file only after a successful server acknowledgement. Failed captures stay queued for retry; malformed captures move to the owner-only `session-summary-captures/quarantine/` directory and make a manual flush fail visibly without being deleted.
|
|
38
38
|
- `hooks doctor` shows hook wiring, automatic-delivery configuration, active and quarantined capture counts, and the legacy spool count without changing local configuration.
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
|
|
5
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
5
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="783f771d-d176-55f3-b036-2be49833854e")}catch(e){}}();
|
|
6
6
|
import * as clack from "@clack/prompts";
|
|
7
7
|
import { spawnSync as spawnSync5 } from "child_process";
|
|
8
8
|
import { readFileSync as readFileSync10 } from "fs";
|
|
@@ -6354,7 +6354,7 @@ function initializeWizardSentry() {
|
|
|
6354
6354
|
Sentry.init({
|
|
6355
6355
|
dsn,
|
|
6356
6356
|
environment: process.env.ORGX_SENTRY_ENVIRONMENT || "production",
|
|
6357
|
-
release: "useorgx-wizard@0.1.
|
|
6357
|
+
release: "useorgx-wizard@0.1.66",
|
|
6358
6358
|
tracesSampleRate: sampleRate(process.env.ORGX_SENTRY_TRACES_SAMPLE_RATE),
|
|
6359
6359
|
enableLogs: true,
|
|
6360
6360
|
sendDefaultPii: false,
|
|
@@ -13969,7 +13969,9 @@ function actionResult(event, sourceClient) {
|
|
|
13969
13969
|
// Claude's PostToolUse contract fires only after success. Codex documents
|
|
13970
13970
|
// PostToolUse for completed tools, including non-zero Bash exits, so its
|
|
13971
13971
|
// outcome must remain explicitly unclassified without reading tool output.
|
|
13972
|
-
return sourceClient === "claude-code"
|
|
13972
|
+
return sourceClient === "claude-code" || sourceClient === "cursor" || sourceClient === "opencode"
|
|
13973
|
+
? "succeeded"
|
|
13974
|
+
: "completed_unknown";
|
|
13973
13975
|
}
|
|
13974
13976
|
|
|
13975
13977
|
function pendingIndex(state, toolUseId) {
|
|
@@ -14135,7 +14137,7 @@ function buildExecutionObservation(state, captureKind) {
|
|
|
14135
14137
|
return {
|
|
14136
14138
|
schema_version: "orgx-session-execution-observation/v1",
|
|
14137
14139
|
boundary: captureKind || "legacy_unspecified",
|
|
14138
|
-
terminal_observed: captureKind === "session_end",
|
|
14140
|
+
terminal_observed: captureKind === "run_end" || captureKind === "session_end",
|
|
14139
14141
|
actions: actions,
|
|
14140
14142
|
actions_completed_observed: state.tool_calls,
|
|
14141
14143
|
actions_omitted: omitted,
|
|
@@ -14443,7 +14445,15 @@ export async function main(options) {
|
|
|
14443
14445
|
var explicitWorkContext = parseExplicitWorkContext(env.ORGX_SESSION_WORK_CONTEXT);
|
|
14444
14446
|
|
|
14445
14447
|
var event = pickString(args.event, payload.hook_event_name, payload.hookEventName, "unknown");
|
|
14446
|
-
var sessionId = pickString(
|
|
14448
|
+
var sessionId = pickString(
|
|
14449
|
+
payload.session_id,
|
|
14450
|
+
payload.sessionId,
|
|
14451
|
+
payload.conversation_id,
|
|
14452
|
+
payload.conversationId,
|
|
14453
|
+
payload.thread_id,
|
|
14454
|
+
payload.threadId,
|
|
14455
|
+
args.session_id
|
|
14456
|
+
);
|
|
14447
14457
|
if (!sessionId) return { ok: true, skipped: "missing_session_id" };
|
|
14448
14458
|
|
|
14449
14459
|
var sourceClient = pickString(args.source_client, env.ORGX_SOURCE_CLIENT, "claude-code");
|
|
@@ -14451,7 +14461,7 @@ export async function main(options) {
|
|
|
14451
14461
|
var stateDir = dir ? dir : pickString(args.state_dir, env.ORGX_SESSION_STATE_DIR);
|
|
14452
14462
|
var path = statePath(sessionId, stateDir);
|
|
14453
14463
|
|
|
14454
|
-
var terminal = event === "Stop" || event === "SessionEnd";
|
|
14464
|
+
var terminal = event === "Stop" || event === "RunEnd" || event === "SessionEnd";
|
|
14455
14465
|
|
|
14456
14466
|
if (!terminal) {
|
|
14457
14467
|
// Hot path: one small file read + write. Never a network call.
|
|
@@ -14487,13 +14497,17 @@ export async function main(options) {
|
|
|
14487
14497
|
if (explicitWorkContext) finalState.work_context = explicitWorkContext;
|
|
14488
14498
|
var initiativeId = pickString(env.ORGX_INITIATIVE_ID, args.initiative);
|
|
14489
14499
|
var queueDir = pickString(args.queue_dir, env.ORGX_SESSION_SUMMARY_QUEUE_DIR) || defaultQueueDir();
|
|
14490
|
-
var captureKind = event === "SessionEnd"
|
|
14500
|
+
var captureKind = event === "SessionEnd"
|
|
14501
|
+
? "session_end"
|
|
14502
|
+
: event === "RunEnd"
|
|
14503
|
+
? "run_end"
|
|
14504
|
+
: "turn_boundary";
|
|
14491
14505
|
var summary = buildSummary(finalState, nowIso, captureKind);
|
|
14492
14506
|
var queued = enqueueSummaryCapture(queueDir, summary, initiativeId, nowIso, captureKind);
|
|
14493
14507
|
if (!queued) return { ok: true, skipped: "queue_write_failed", summary: summary };
|
|
14494
14508
|
var deliveryTriggered = triggerQueueDelivery(args, env, queueDir, spawnImpl);
|
|
14495
14509
|
|
|
14496
|
-
if (event === "SessionEnd") {
|
|
14510
|
+
if (event === "RunEnd" || event === "SessionEnd") {
|
|
14497
14511
|
try {
|
|
14498
14512
|
rmSync(path, { force: true });
|
|
14499
14513
|
} catch (e) {
|
|
@@ -14506,7 +14520,7 @@ export async function main(options) {
|
|
|
14506
14520
|
queued: true,
|
|
14507
14521
|
queue_path: queued.path,
|
|
14508
14522
|
delivery_triggered: deliveryTriggered,
|
|
14509
|
-
final: event === "SessionEnd",
|
|
14523
|
+
final: event === "RunEnd" || event === "SessionEnd",
|
|
14510
14524
|
summary: summary,
|
|
14511
14525
|
};
|
|
14512
14526
|
}
|
|
@@ -15397,6 +15411,7 @@ function normalizeSessionExecutionObservation(value) {
|
|
|
15397
15411
|
const boundary = boundedString(value.boundary, 40);
|
|
15398
15412
|
if (!boundary || ![
|
|
15399
15413
|
"turn_boundary",
|
|
15414
|
+
"run_end",
|
|
15400
15415
|
"session_end",
|
|
15401
15416
|
"historical_backfill",
|
|
15402
15417
|
"legacy_unspecified"
|
|
@@ -15710,7 +15725,7 @@ function parseSessionSummaryCapture(raw) {
|
|
|
15710
15725
|
// Captures created by wizard 0.1.56 before this field existed must remain
|
|
15711
15726
|
// deliverable. Preserve the uncertainty instead of guessing that an old
|
|
15712
15727
|
// snapshot represented a real SessionEnd.
|
|
15713
|
-
capture_kind: value.capture_kind === "turn_boundary" || value.capture_kind === "session_end" ? value.capture_kind : "legacy_unspecified",
|
|
15728
|
+
capture_kind: value.capture_kind === "turn_boundary" || value.capture_kind === "run_end" || value.capture_kind === "session_end" ? value.capture_kind : "legacy_unspecified",
|
|
15714
15729
|
queued_at: value.queued_at,
|
|
15715
15730
|
session: value.session,
|
|
15716
15731
|
...typeof value.initiative_id === "string" ? { initiative_id: value.initiative_id } : {}
|
|
@@ -18563,7 +18578,7 @@ async function main() {
|
|
|
18563
18578
|
initializeWizardSentry();
|
|
18564
18579
|
const program = new Command();
|
|
18565
18580
|
program.name("orgx-wizard").description("Add OrgX MCP configs, skills/rules, and companion plugins to your local AI tools.").showHelpAfterError();
|
|
18566
|
-
const pkgVersion = true ? "0.1.
|
|
18581
|
+
const pkgVersion = true ? "0.1.66" : void 0;
|
|
18567
18582
|
program.version(pkgVersion ?? "unknown", "-V, --version");
|
|
18568
18583
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
18569
18584
|
if (Boolean(actionCommand.optsWithGlobals().json)) return;
|
|
@@ -19607,4 +19622,4 @@ main().catch(async (error) => {
|
|
|
19607
19622
|
process.exitCode = 1;
|
|
19608
19623
|
});
|
|
19609
19624
|
//# sourceMappingURL=cli.js.map
|
|
19610
|
-
//# debugId=
|
|
19625
|
+
//# debugId=783f771d-d176-55f3-b036-2be49833854e
|