@useorgx/wizard 0.1.64 → 0.1.65
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 +62 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ The wizard modifies local tool configuration only. Depending on the command, it
|
|
|
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
35
|
- `hooks install [--targets codex,claude-code]` installs bounded local capture hooks. Terminal events write compact session summaries to a durable queue, then request a detached single-flight delivery worker. 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
|
-
- `ORGX_SESSION_WORK_CONTEXT` can carry one explicit, bounded JSON annotation for intent, authority, cost, artifact references, and
|
|
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.
|
|
39
39
|
- `hooks backfill` previews compact summaries distilled from the legacy spool. It does not upload or archive anything unless you add `--post --yes`; `--truncate` also requires both flags and archives the original spool only after every upload succeeds.
|
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]="af54c3d7-9ef3-5d66-90dc-45a9ecb71d96")}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.65",
|
|
6358
6358
|
tracesSampleRate: sampleRate(process.env.ORGX_SENTRY_TRACES_SAMPLE_RATE),
|
|
6359
6359
|
enableLogs: true,
|
|
6360
6360
|
sendDefaultPii: false,
|
|
@@ -14281,7 +14281,7 @@ function workRefs(value) {
|
|
|
14281
14281
|
|
|
14282
14282
|
function workIso(value) {
|
|
14283
14283
|
var text = workString(value, 100);
|
|
14284
|
-
return text &&
|
|
14284
|
+
return text && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$/.test(text) && !Number.isNaN(Date.parse(text))
|
|
14285
14285
|
? text
|
|
14286
14286
|
: null;
|
|
14287
14287
|
}
|
|
@@ -14316,6 +14316,18 @@ export function parseExplicitWorkContext(value) {
|
|
|
14316
14316
|
var validUntil = authority.valid_until === undefined ? undefined : workIso(authority.valid_until);
|
|
14317
14317
|
var artifactRefs = workRefs(parsed.artifact_refs);
|
|
14318
14318
|
var evidenceRefs = workRefs(parsed.evidence_refs);
|
|
14319
|
+
var semantic = parsed.semantic_refs === undefined ? undefined : workObject(parsed.semantic_refs);
|
|
14320
|
+
var contextCapsuleRef = !semantic || semantic.context_capsule_ref === undefined
|
|
14321
|
+
? undefined
|
|
14322
|
+
: workRef(semantic.context_capsule_ref);
|
|
14323
|
+
var contextDeliveredAt = !semantic || semantic.context_delivered_at === undefined
|
|
14324
|
+
? undefined
|
|
14325
|
+
: workIso(semantic.context_delivered_at);
|
|
14326
|
+
var decisionRefs = !semantic ? [] : workRefs(semantic.decision_refs);
|
|
14327
|
+
var constraintRefs = !semantic ? [] : workRefs(semantic.constraint_refs);
|
|
14328
|
+
var expectationRefs = !semantic ? [] : workRefs(semantic.expectation_refs);
|
|
14329
|
+
var learningRefs = !semantic ? [] : workRefs(semantic.learning_refs);
|
|
14330
|
+
var priorReceiptRefs = !semantic ? [] : workRefs(semantic.prior_receipt_refs);
|
|
14319
14331
|
var currency = workString(cost.currency, 12);
|
|
14320
14332
|
var source = cost.source === undefined ? undefined : workString(cost.source, 120);
|
|
14321
14333
|
if (!summary || objective === null || acceptance === null || intentConstraints === null || requestRef === null) return null;
|
|
@@ -14326,6 +14338,11 @@ export function parseExplicitWorkContext(value) {
|
|
|
14326
14338
|
if (!currency || !/^[A-Z][A-Z0-9_-]{1,11}$/.test(currency) || typeof cost.total !== "number" || !Number.isFinite(cost.total) || cost.total < 0 || cost.total > 100000 || source === null) return null;
|
|
14327
14339
|
if (cost.estimated !== undefined && typeof cost.estimated !== "boolean") return null;
|
|
14328
14340
|
if (artifactRefs === null || evidenceRefs === null) return null;
|
|
14341
|
+
if (parsed.semantic_refs !== undefined && !semantic) return null;
|
|
14342
|
+
if (contextCapsuleRef === null || contextDeliveredAt === null || decisionRefs === null || constraintRefs === null || expectationRefs === null || learningRefs === null || priorReceiptRefs === null) return null;
|
|
14343
|
+
if (Boolean(contextCapsuleRef) !== Boolean(contextDeliveredAt)) return null;
|
|
14344
|
+
var semanticRefCount = decisionRefs.length + constraintRefs.length + expectationRefs.length + learningRefs.length + priorReceiptRefs.length + (contextCapsuleRef ? 1 : 0);
|
|
14345
|
+
if (semantic !== undefined && (semanticRefCount === 0 || semanticRefCount > 20)) return null;
|
|
14329
14346
|
var normalizedIntent = { summary: summary, acceptance_criteria: acceptance, constraints: intentConstraints };
|
|
14330
14347
|
if (objective) normalizedIntent.objective = objective;
|
|
14331
14348
|
if (requestRef) normalizedIntent.request_ref = requestRef;
|
|
@@ -14341,6 +14358,20 @@ export function parseExplicitWorkContext(value) {
|
|
|
14341
14358
|
if (validUntil) normalizedAuthority.valid_until = validUntil;
|
|
14342
14359
|
var normalizedCost = { currency: currency, total: cost.total, estimated: cost.estimated !== false };
|
|
14343
14360
|
if (source) normalizedCost.source = source;
|
|
14361
|
+
var normalizedSemantic;
|
|
14362
|
+
if (semantic !== undefined) {
|
|
14363
|
+
normalizedSemantic = {
|
|
14364
|
+
decision_refs: decisionRefs,
|
|
14365
|
+
constraint_refs: constraintRefs,
|
|
14366
|
+
expectation_refs: expectationRefs,
|
|
14367
|
+
learning_refs: learningRefs,
|
|
14368
|
+
prior_receipt_refs: priorReceiptRefs,
|
|
14369
|
+
};
|
|
14370
|
+
if (contextCapsuleRef) {
|
|
14371
|
+
normalizedSemantic.context_capsule_ref = contextCapsuleRef;
|
|
14372
|
+
normalizedSemantic.context_delivered_at = contextDeliveredAt;
|
|
14373
|
+
}
|
|
14374
|
+
}
|
|
14344
14375
|
return {
|
|
14345
14376
|
schema_version: "orgx-session-work-context/v1",
|
|
14346
14377
|
provenance: "producer_asserted",
|
|
@@ -14349,6 +14380,7 @@ export function parseExplicitWorkContext(value) {
|
|
|
14349
14380
|
cost: normalizedCost,
|
|
14350
14381
|
artifact_refs: artifactRefs,
|
|
14351
14382
|
evidence_refs: evidenceRefs,
|
|
14383
|
+
...(normalizedSemantic ? { semantic_refs: normalizedSemantic } : {}),
|
|
14352
14384
|
};
|
|
14353
14385
|
}
|
|
14354
14386
|
|
|
@@ -15227,6 +15259,29 @@ var referenceList = z.array(externalReferenceSchema).max(20).default([]).transfo
|
|
|
15227
15259
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
15228
15260
|
});
|
|
15229
15261
|
});
|
|
15262
|
+
var semanticReferencesSchema = z.object({
|
|
15263
|
+
context_capsule_ref: externalReferenceSchema.optional(),
|
|
15264
|
+
context_delivered_at: z.string().datetime({ offset: true }).optional(),
|
|
15265
|
+
decision_refs: referenceList,
|
|
15266
|
+
constraint_refs: referenceList,
|
|
15267
|
+
expectation_refs: referenceList,
|
|
15268
|
+
learning_refs: referenceList,
|
|
15269
|
+
prior_receipt_refs: referenceList
|
|
15270
|
+
}).superRefine((value, context) => {
|
|
15271
|
+
if (Boolean(value.context_capsule_ref) !== Boolean(value.context_delivered_at)) {
|
|
15272
|
+
context.addIssue({
|
|
15273
|
+
code: z.ZodIssueCode.custom,
|
|
15274
|
+
message: "context_capsule_ref and context_delivered_at must be supplied together"
|
|
15275
|
+
});
|
|
15276
|
+
}
|
|
15277
|
+
const totalRefs = value.decision_refs.length + value.constraint_refs.length + value.expectation_refs.length + value.learning_refs.length + value.prior_receipt_refs.length + (value.context_capsule_ref ? 1 : 0);
|
|
15278
|
+
if (totalRefs === 0 || totalRefs > 20) {
|
|
15279
|
+
context.addIssue({
|
|
15280
|
+
code: z.ZodIssueCode.custom,
|
|
15281
|
+
message: "semantic_refs must contain between 1 and 20 references"
|
|
15282
|
+
});
|
|
15283
|
+
}
|
|
15284
|
+
});
|
|
15230
15285
|
var authoritySchema = z.object({
|
|
15231
15286
|
mode: z.enum([
|
|
15232
15287
|
"explicit",
|
|
@@ -15271,7 +15326,8 @@ var sessionWorkContextInputSchema = z.object({
|
|
|
15271
15326
|
source: boundedText(120).optional()
|
|
15272
15327
|
}),
|
|
15273
15328
|
artifact_refs: referenceList,
|
|
15274
|
-
evidence_refs: referenceList
|
|
15329
|
+
evidence_refs: referenceList,
|
|
15330
|
+
semantic_refs: semanticReferencesSchema.optional()
|
|
15275
15331
|
});
|
|
15276
15332
|
function normalizeSessionWorkContext(value) {
|
|
15277
15333
|
const parsed = sessionWorkContextInputSchema.safeParse(value);
|
|
@@ -18507,7 +18563,7 @@ async function main() {
|
|
|
18507
18563
|
initializeWizardSentry();
|
|
18508
18564
|
const program = new Command();
|
|
18509
18565
|
program.name("orgx-wizard").description("Add OrgX MCP configs, skills/rules, and companion plugins to your local AI tools.").showHelpAfterError();
|
|
18510
|
-
const pkgVersion = true ? "0.1.
|
|
18566
|
+
const pkgVersion = true ? "0.1.65" : void 0;
|
|
18511
18567
|
program.version(pkgVersion ?? "unknown", "-V, --version");
|
|
18512
18568
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
18513
18569
|
if (Boolean(actionCommand.optsWithGlobals().json)) return;
|
|
@@ -19551,4 +19607,4 @@ main().catch(async (error) => {
|
|
|
19551
19607
|
process.exitCode = 1;
|
|
19552
19608
|
});
|
|
19553
19609
|
//# sourceMappingURL=cli.js.map
|
|
19554
|
-
//# debugId=
|
|
19610
|
+
//# debugId=af54c3d7-9ef3-5d66-90dc-45a9ecb71d96
|