@workit-dev/codex 1.1.3 → 1.1.6
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/launch-mcp.js
CHANGED
|
@@ -12708,7 +12708,7 @@ var scopeSchema = object({
|
|
|
12708
12708
|
paths: array(pathValue),
|
|
12709
12709
|
exclusions: array(pathValue)
|
|
12710
12710
|
}).strict();
|
|
12711
|
-
var
|
|
12711
|
+
var scopeGap = (outer, inner) => {
|
|
12712
12712
|
const strip = (value) => value.length > 1 ? value.replace(/\/+$/, "") : value;
|
|
12713
12713
|
const normOuter = {
|
|
12714
12714
|
...outer,
|
|
@@ -12720,8 +12720,17 @@ var scopeCovers = (outer, inner) => {
|
|
|
12720
12720
|
const excluded = (path, scope) => scope.exclusions.some((excludedPath) => excludedPath === path || path.startsWith(`${excludedPath}/`));
|
|
12721
12721
|
const covers = (path) => normOuter.paths.some((base) => scopePathCovers(base, path)) && !excluded(path, normOuter);
|
|
12722
12722
|
const innerExcludes = (path) => innerExclusions.some((excludedPath) => excludedPath === path || path.startsWith(`${excludedPath}/`));
|
|
12723
|
-
|
|
12723
|
+
const uncovered = innerPaths.find((path) => !covers(path));
|
|
12724
|
+
if (uncovered !== undefined)
|
|
12725
|
+
return { path: uncovered, exclusion: null };
|
|
12726
|
+
for (const excludedPath of normOuter.exclusions) {
|
|
12727
|
+
const base = innerPaths.find((path) => (path === "." || excludedPath === path || excludedPath.startsWith(`${path}/`)) && !innerExcludes(excludedPath));
|
|
12728
|
+
if (base !== undefined)
|
|
12729
|
+
return { path: base, exclusion: excludedPath };
|
|
12730
|
+
}
|
|
12731
|
+
return null;
|
|
12724
12732
|
};
|
|
12733
|
+
var scopeCovers = (outer, inner) => scopeGap(outer, inner) === null;
|
|
12725
12734
|
var refSchema = discriminatedUnion("kind", [
|
|
12726
12735
|
object({ kind: literal("file"), path: pathValue, digest: nullableDigest }).strict(),
|
|
12727
12736
|
object({
|
|
@@ -13018,7 +13027,8 @@ var findingSchema = object({
|
|
|
13018
13027
|
candidateId: nullableDigest,
|
|
13019
13028
|
refs: array(refSchema),
|
|
13020
13029
|
disposition: _enum(["open", "fixed", "dismissed", "deferred"]),
|
|
13021
|
-
resolution: object({ reason: text, evidenceIds: array(id), decisionIds: array(id) }).strict().nullable()
|
|
13030
|
+
resolution: object({ reason: text, evidenceIds: array(id), decisionIds: array(id) }).strict().nullable(),
|
|
13031
|
+
leadOwned: literal(true).optional()
|
|
13022
13032
|
}).strict();
|
|
13023
13033
|
var assignmentSchema = object({
|
|
13024
13034
|
role: _enum(["investigator", "reviewer", "implementer"]),
|
|
@@ -13917,6 +13927,9 @@ function actionKeys(family, action) {
|
|
|
13917
13927
|
walk(defOf(option).shape, false);
|
|
13918
13928
|
return out;
|
|
13919
13929
|
}
|
|
13930
|
+
var EXAMPLE_FIELDS = {
|
|
13931
|
+
"finding.resolve": { disposition: "fixed", evidenceIds: ["<evidenceId>"] }
|
|
13932
|
+
};
|
|
13920
13933
|
function exampleOperation(family, action) {
|
|
13921
13934
|
const keys = actionKeys(family, action);
|
|
13922
13935
|
const example = { action };
|
|
@@ -13924,7 +13937,7 @@ function exampleOperation(family, action) {
|
|
|
13924
13937
|
example[name] = FLAT[family].fields[name]?.enum?.[0] ?? `<${name}>`;
|
|
13925
13938
|
if (family === "policy" && !keys?.required.length && action !== "explain")
|
|
13926
13939
|
example.riskTier = "normal";
|
|
13927
|
-
return example;
|
|
13940
|
+
return { ...example, ...EXAMPLE_FIELDS[`${family}.${action}`] };
|
|
13928
13941
|
}
|
|
13929
13942
|
var oneOf = (values) => values.join(" | ");
|
|
13930
13943
|
function invalidOperation(family, input, error) {
|
|
@@ -13939,13 +13952,18 @@ function invalidOperation(family, input, error) {
|
|
|
13939
13952
|
const own = actionKeys(family, action);
|
|
13940
13953
|
const fields = [];
|
|
13941
13954
|
const sentence = [];
|
|
13955
|
+
const foreign = [];
|
|
13956
|
+
const takes = `it takes ${[...own.accepted].join(", ")}`;
|
|
13942
13957
|
for (const issue of error.issues) {
|
|
13943
13958
|
if (issue.code === "unrecognized_keys") {
|
|
13944
13959
|
for (const key of issue.keys) {
|
|
13945
13960
|
const home = actions.find((other) => other !== action && actionKeys(family, other).accepted.has(key));
|
|
13946
|
-
const reason = home ? `${key} belongs to action: ${home}` : `${key} is not a field of ${family} ${action};
|
|
13961
|
+
const reason = home ? `${key} belongs to action: ${home}` : `${key} is not a field of ${family} ${action}; ${takes}`;
|
|
13947
13962
|
fields.push({ path: key, reason });
|
|
13948
|
-
|
|
13963
|
+
if (home)
|
|
13964
|
+
sentence.push(reason);
|
|
13965
|
+
else
|
|
13966
|
+
foreign.push(key);
|
|
13949
13967
|
}
|
|
13950
13968
|
continue;
|
|
13951
13969
|
}
|
|
@@ -13958,6 +13976,8 @@ function invalidOperation(family, input, error) {
|
|
|
13958
13976
|
fields.push({ path: issue.path.join("."), reason });
|
|
13959
13977
|
sentence.push(reason);
|
|
13960
13978
|
}
|
|
13979
|
+
if (foreign.length)
|
|
13980
|
+
sentence.push(`${foreign.join(", ")} ${foreign.length === 1 ? "is not a field" : "are not fields"} of ${family} ${action}; ${takes}`);
|
|
13961
13981
|
const example = JSON.stringify(exampleOperation(family, action));
|
|
13962
13982
|
return failure2("invalid_input", `${[...new Set(sentence)].join("; ")}. Example: ${example}`, {
|
|
13963
13983
|
fields
|
|
@@ -13972,6 +13992,10 @@ function parseAdvertisedOperation(family, input, host) {
|
|
|
13972
13992
|
return success(null, null, request);
|
|
13973
13993
|
return invalidOperation(family, request, parsed.error);
|
|
13974
13994
|
}
|
|
13995
|
+
function explainInvalidOperation(family, request) {
|
|
13996
|
+
const parsed = advertisedOperationSchemas[family].safeParse(request);
|
|
13997
|
+
return parsed.success ? null : invalidOperation(family, request, parsed.error);
|
|
13998
|
+
}
|
|
13975
13999
|
// packages/workit-core/src/core/task-store.ts
|
|
13976
14000
|
import { createHash as createHash8, randomUUID as randomUUID3 } from "node:crypto";
|
|
13977
14001
|
import * as fs12 from "node:fs";
|
|
@@ -24291,6 +24315,42 @@ function diffPolicy(previous, next, reason, now) {
|
|
|
24291
24315
|
return parsed.data;
|
|
24292
24316
|
}
|
|
24293
24317
|
|
|
24318
|
+
// packages/workit-core/src/core/finding-evidence.ts
|
|
24319
|
+
var RULES3 = {
|
|
24320
|
+
fixed: "check or review evidence with result passed, recorded after the finding and still current on this tree",
|
|
24321
|
+
dismissed: "evidence (check, review, investigation or artifact) with result passed or failed, on the finding's candidate, that shares a ref with the finding or repeats its claim",
|
|
24322
|
+
deferred: "an approved limitation decision (decisionIds) that references an acceptanceAllowed requirement and covers the finding's scope"
|
|
24323
|
+
};
|
|
24324
|
+
var sameRef = (left, right) => {
|
|
24325
|
+
try {
|
|
24326
|
+
return canonicalJson(left) === canonicalJson(right);
|
|
24327
|
+
} catch {
|
|
24328
|
+
return false;
|
|
24329
|
+
}
|
|
24330
|
+
};
|
|
24331
|
+
var sameCandidate = (finding, evidence) => finding.candidateId === null ? (evidence.candidateId ?? null) === null : evidence.candidateId === finding.candidateId || evidence.beforeCandidateId === finding.candidateId;
|
|
24332
|
+
function matchingEvidence(task, finding, disposition) {
|
|
24333
|
+
if (disposition === "deferred")
|
|
24334
|
+
return [];
|
|
24335
|
+
return task.evidence.filter((entry) => {
|
|
24336
|
+
const data = entry.data;
|
|
24337
|
+
if (disposition === "fixed")
|
|
24338
|
+
return entry.recordedAt >= finding.recordedAt && data.result === "passed" && (data.kind === "check" || data.kind === "review") && (finding.data.candidateId === null || data.candidateId != null);
|
|
24339
|
+
return (data.result === "passed" || data.result === "failed") && sameCandidate(finding.data, data) && (finding.data.refs.some((left) => data.refs.some((right) => sameRef(left, right))) || data.claim === finding.data.claim);
|
|
24340
|
+
}).map((entry) => entry.id);
|
|
24341
|
+
}
|
|
24342
|
+
function acceptedEvidenceText(task, finding, disposition) {
|
|
24343
|
+
const accepted = `accepted for ${disposition}: ${RULES3[disposition]}`;
|
|
24344
|
+
if (disposition === "deferred")
|
|
24345
|
+
return accepted;
|
|
24346
|
+
const ids = matchingEvidence(task, finding, disposition);
|
|
24347
|
+
if (ids.length)
|
|
24348
|
+
return `${accepted}; evidence in this task that fits: ${ids.join(", ")}`;
|
|
24349
|
+
const ref = finding.data.refs[0];
|
|
24350
|
+
const refs = ref ? JSON.stringify([ref]) : "[]";
|
|
24351
|
+
return `${accepted}; none recorded in this task yet: workit evidence record --payload '{"kind":"${disposition === "fixed" ? "check" : "review"}","claim":${JSON.stringify(finding.data.claim)},"result":"passed","refs":${refs},…}' (or workit check <name> for a check)`;
|
|
24352
|
+
}
|
|
24353
|
+
|
|
24294
24354
|
// packages/workit-core/src/core/policy/judgment.ts
|
|
24295
24355
|
var isObject7 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24296
24356
|
var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
|
|
@@ -24537,6 +24597,12 @@ var workspaceVerification = (root) => {
|
|
|
24537
24597
|
return "self";
|
|
24538
24598
|
}
|
|
24539
24599
|
};
|
|
24600
|
+
var parseRequest = (family, request) => {
|
|
24601
|
+
const parsed = parseOperation(family, request);
|
|
24602
|
+
if (parsed.ok || parsed.code !== "invalid_input")
|
|
24603
|
+
return parsed;
|
|
24604
|
+
return explainInvalidOperation(family, request) ?? parsed;
|
|
24605
|
+
};
|
|
24540
24606
|
var provenance = (context, kind = context.provenanceKind ?? "host_observed") => ({
|
|
24541
24607
|
kind,
|
|
24542
24608
|
host: context.caller.host,
|
|
@@ -24987,7 +25053,7 @@ class WorkitCore {
|
|
|
24987
25053
|
return root;
|
|
24988
25054
|
if ((this.context.workerId ?? null) !== null)
|
|
24989
25055
|
return failure2("permission_denied", "helpers cannot control task state");
|
|
24990
|
-
const parsed =
|
|
25056
|
+
const parsed = parseRequest("state", request);
|
|
24991
25057
|
if (!parsed.ok)
|
|
24992
25058
|
return parsed;
|
|
24993
25059
|
const input = parsed.data;
|
|
@@ -25059,7 +25125,7 @@ class WorkitCore {
|
|
|
25059
25125
|
const root = this.contextRootError();
|
|
25060
25126
|
if (!root.ok)
|
|
25061
25127
|
return root;
|
|
25062
|
-
const parsed =
|
|
25128
|
+
const parsed = parseRequest("task", request);
|
|
25063
25129
|
if (!parsed.ok)
|
|
25064
25130
|
return parsed;
|
|
25065
25131
|
const input = parsed.data;
|
|
@@ -25173,7 +25239,7 @@ class WorkitCore {
|
|
|
25173
25239
|
const root = this.contextRootError();
|
|
25174
25240
|
if (!root.ok)
|
|
25175
25241
|
return root;
|
|
25176
|
-
const parsed =
|
|
25242
|
+
const parsed = parseRequest("policy", request);
|
|
25177
25243
|
if (!parsed.ok)
|
|
25178
25244
|
return parsed;
|
|
25179
25245
|
const input = parsed.data;
|
|
@@ -25263,7 +25329,7 @@ class WorkitCore {
|
|
|
25263
25329
|
const root = this.contextRootError();
|
|
25264
25330
|
if (!root.ok)
|
|
25265
25331
|
return root;
|
|
25266
|
-
const parsed =
|
|
25332
|
+
const parsed = parseRequest("evidence", request);
|
|
25267
25333
|
if (!parsed.ok)
|
|
25268
25334
|
return parsed;
|
|
25269
25335
|
const input = parsed.data;
|
|
@@ -25422,7 +25488,7 @@ class WorkitCore {
|
|
|
25422
25488
|
const root = this.contextRootError();
|
|
25423
25489
|
if (!root.ok)
|
|
25424
25490
|
return root;
|
|
25425
|
-
const parsed =
|
|
25491
|
+
const parsed = parseRequest("decision", request);
|
|
25426
25492
|
if (!parsed.ok)
|
|
25427
25493
|
return parsed;
|
|
25428
25494
|
const input = parsed.data;
|
|
@@ -25525,7 +25591,7 @@ class WorkitCore {
|
|
|
25525
25591
|
const root = this.contextRootError();
|
|
25526
25592
|
if (!root.ok)
|
|
25527
25593
|
return root;
|
|
25528
|
-
const parsed =
|
|
25594
|
+
const parsed = parseRequest("finding", request);
|
|
25529
25595
|
if (!parsed.ok)
|
|
25530
25596
|
return parsed;
|
|
25531
25597
|
const input = parsed.data;
|
|
@@ -25570,8 +25636,6 @@ class WorkitCore {
|
|
|
25570
25636
|
return changed;
|
|
25571
25637
|
return success(changed.data.revision, null, changed.data.findings.at(-1));
|
|
25572
25638
|
}
|
|
25573
|
-
if (helper?.ok)
|
|
25574
|
-
return failure2("permission_denied", "helpers cannot resolve findings");
|
|
25575
25639
|
const findingRef = resolveIdRef("finding", input.findingId, task.data.findings.map((entry) => entry.id));
|
|
25576
25640
|
if (!findingRef.ok)
|
|
25577
25641
|
return findingRef;
|
|
@@ -25581,10 +25645,34 @@ class WorkitCore {
|
|
|
25581
25645
|
return failure2("not_found", "finding not found");
|
|
25582
25646
|
if (!input.reason.trim())
|
|
25583
25647
|
return failure2("invalid_input", "finding resolution requires a reason");
|
|
25648
|
+
const helperId = helper?.ok ? helper.data.id : null;
|
|
25649
|
+
if (helperId !== null) {
|
|
25650
|
+
if (finding.provenance.workerId !== helperId)
|
|
25651
|
+
return failure2("permission_denied", "helpers resolve only the findings they recorded; the lead resolves this one");
|
|
25652
|
+
if (finding.data.leadOwned)
|
|
25653
|
+
return failure2("permission_denied", "the lead now owns this finding (it reopened, dismissed or deferred it); report it to the lead");
|
|
25654
|
+
if (finding.data.disposition !== "open")
|
|
25655
|
+
return failure2("permission_denied", `finding is already ${finding.data.disposition}; a helper resolves only its open findings`);
|
|
25656
|
+
if (input.disposition !== "fixed" && input.disposition !== "dismissed")
|
|
25657
|
+
return failure2("permission_denied", "helpers resolve their own findings as fixed or dismissed; deferring or reopening is the lead's");
|
|
25658
|
+
}
|
|
25659
|
+
const refuse = (code, message) => {
|
|
25660
|
+
if (input.disposition === "open" || helperId === null && this.context.caller.host === "workit_cli")
|
|
25661
|
+
return failure2(code, message);
|
|
25662
|
+
const pool = helperId === null ? task.data : { evidence: task.data.evidence.filter((e) => e.provenance.workerId === helperId) };
|
|
25663
|
+
const text = acceptedEvidenceText(pool, finding, input.disposition);
|
|
25664
|
+
return failure2(code, `${message}; ${text}`, { guidance: text });
|
|
25665
|
+
};
|
|
25584
25666
|
const evidence = task.data.evidence.filter((entry) => input.evidenceIds.includes(entry.id));
|
|
25585
25667
|
const decisions = task.data.decisions.filter((entry) => input.decisionIds.includes(entry.id));
|
|
25586
25668
|
if (evidence.length !== input.evidenceIds.length || decisions.length !== input.decisionIds.length)
|
|
25587
|
-
return
|
|
25669
|
+
return refuse("invalid_input", "finding resolution references an unknown record");
|
|
25670
|
+
if (helperId !== null) {
|
|
25671
|
+
if (evidence.length === 0)
|
|
25672
|
+
return refuse("permission_denied", "a helper's resolution requires its own evidence");
|
|
25673
|
+
if (evidence.some((entry) => entry.provenance.workerId !== helperId))
|
|
25674
|
+
return refuse("permission_denied", "a helper resolves with evidence it recorded, not another session's");
|
|
25675
|
+
}
|
|
25588
25676
|
if (input.disposition === "fixed") {
|
|
25589
25677
|
const current = captureCandidate(this.store.root, task.data.intent.data.scope, environment());
|
|
25590
25678
|
if (!current.ok)
|
|
@@ -25599,10 +25687,10 @@ class WorkitCore {
|
|
|
25599
25687
|
});
|
|
25600
25688
|
});
|
|
25601
25689
|
if (!verified)
|
|
25602
|
-
return
|
|
25690
|
+
return refuse("permission_denied", "fixed findings require passing verification evidence");
|
|
25603
25691
|
}
|
|
25604
25692
|
if (input.disposition === "dismissed" && evidence.length === 0)
|
|
25605
|
-
return
|
|
25693
|
+
return refuse("permission_denied", "dismissal requires supporting evidence");
|
|
25606
25694
|
if (input.disposition === "dismissed") {
|
|
25607
25695
|
const relevant = evidence.every((entry) => {
|
|
25608
25696
|
if (entry.data.result === "missing" || entry.data.result === "skipped")
|
|
@@ -25612,7 +25700,7 @@ class WorkitCore {
|
|
|
25612
25700
|
return candidateMatches && (referenceMatches || entry.data.claim === finding.data.claim);
|
|
25613
25701
|
});
|
|
25614
25702
|
if (!relevant)
|
|
25615
|
-
return
|
|
25703
|
+
return refuse("permission_denied", "dismissal evidence is unrelated to the finding");
|
|
25616
25704
|
}
|
|
25617
25705
|
if (input.disposition === "deferred") {
|
|
25618
25706
|
const workspace = this.store.readWorkspace();
|
|
@@ -25622,14 +25710,16 @@ class WorkitCore {
|
|
|
25622
25710
|
return failure2("not_found", "workspace not found");
|
|
25623
25711
|
const allowed = decisions.some((entry) => entry.provenance.kind !== "imported" && entry.data.purpose === "limitation" && entry.data.response === "approved" && entry.data.revoked === null && verifyDecisionContentAtRoot(this.store.root, entry.data.binding).ok && entry.data.binding.taskId === task.data.id && entry.data.binding.workspaceId === workspace.data.id && scopeCovers(entry.data.binding.scope, finding.data.scope) && entry.data.requirementIds.some((id) => task.data.policy?.requirements.some((requirement) => requirement.id === id && requirement.acceptanceAllowed)));
|
|
25624
25712
|
if (!allowed)
|
|
25625
|
-
return
|
|
25713
|
+
return refuse("permission_denied", "deferred findings require an approved limitation decision");
|
|
25626
25714
|
}
|
|
25627
25715
|
const changed = this.store.mutateTask(task.data.id, input.expectedRevision, (current, mutation) => {
|
|
25628
25716
|
const existing = current.findings.find((entry) => entry.id === input.findingId);
|
|
25629
25717
|
if (!existing)
|
|
25630
25718
|
return failure2("not_found", "finding not found");
|
|
25631
|
-
const
|
|
25719
|
+
const owner = helperId === null && existing.provenance.workerId !== null ? { leadOwned: true } : {};
|
|
25720
|
+
const data = input.disposition === "open" ? { ...existing.data, ...owner, disposition: "open", resolution: null } : {
|
|
25632
25721
|
...existing.data,
|
|
25722
|
+
...owner,
|
|
25633
25723
|
disposition: input.disposition,
|
|
25634
25724
|
resolution: {
|
|
25635
25725
|
reason: input.reason,
|
|
@@ -25661,7 +25751,7 @@ class WorkitCore {
|
|
|
25661
25751
|
const root = this.contextRootError();
|
|
25662
25752
|
if (!root.ok)
|
|
25663
25753
|
return root;
|
|
25664
|
-
const parsed =
|
|
25754
|
+
const parsed = parseRequest("worker", request);
|
|
25665
25755
|
if (!parsed.ok)
|
|
25666
25756
|
return parsed;
|
|
25667
25757
|
const input = parsed.data;
|
|
@@ -25680,19 +25770,19 @@ class WorkitCore {
|
|
|
25680
25770
|
return failure2("permission_denied", "helpers cannot assign workers");
|
|
25681
25771
|
if (task.data.status !== "active")
|
|
25682
25772
|
return failure2("invalid_transition", "paused or closed tasks cannot assign workers");
|
|
25683
|
-
|
|
25684
|
-
|
|
25773
|
+
const gap = scopeGap(task.data.intent.data.scope, input.assignment.scope);
|
|
25774
|
+
if (gap) {
|
|
25775
|
+
const leadScope = task.data.intent.data.scope;
|
|
25776
|
+
const lead = leadScope.paths.join(", ") || "(none)";
|
|
25777
|
+
const reason = gap.exclusion === null ? `${gap.path} is not inside lead paths ${lead}` : `${gap.path} reaches lead exclusion ${gap.exclusion}; add ${gap.exclusion} to the worker exclusions`;
|
|
25778
|
+
const excluded = leadScope.exclusions.length ? `; lead exclusions are ${leadScope.exclusions.join(", ")}` : "";
|
|
25779
|
+
return failure2("permission_denied", `worker assignment is outside task scope: ${reason}`, {
|
|
25685
25780
|
fields: [
|
|
25686
|
-
{
|
|
25687
|
-
|
|
25688
|
-
reason: `paths ${JSON.stringify(input.assignment.scope.paths)} must be contained by lead paths ${JSON.stringify(task.data.intent.data.scope.paths)}`
|
|
25689
|
-
},
|
|
25690
|
-
{
|
|
25691
|
-
path: "task.intent.scope",
|
|
25692
|
-
reason: `lead paths are ${JSON.stringify(task.data.intent.data.scope.paths)}`
|
|
25693
|
-
}
|
|
25781
|
+
{ path: "assignment.scope", reason },
|
|
25782
|
+
{ path: "task.intent.scope", reason: `lead paths are ${lead}${excluded}` }
|
|
25694
25783
|
]
|
|
25695
25784
|
});
|
|
25785
|
+
}
|
|
25696
25786
|
if (input.assignment.decisionIds.some((id) => !task.data.decisions.some((entry) => entry.id === id)))
|
|
25697
25787
|
return failure2("invalid_input", "worker assignment references an unknown decision");
|
|
25698
25788
|
if (input.assignment.requirementIds.some((id) => !task.data.policy?.requirements.some((requirement) => requirement.id === id)))
|
|
@@ -9596,7 +9596,7 @@ var scopeSchema = object({
|
|
|
9596
9596
|
paths: array(pathValue),
|
|
9597
9597
|
exclusions: array(pathValue)
|
|
9598
9598
|
}).strict();
|
|
9599
|
-
var
|
|
9599
|
+
var scopeGap = (outer, inner) => {
|
|
9600
9600
|
const strip = (value) => value.length > 1 ? value.replace(/\/+$/, "") : value;
|
|
9601
9601
|
const normOuter = {
|
|
9602
9602
|
...outer,
|
|
@@ -9608,8 +9608,17 @@ var scopeCovers = (outer, inner) => {
|
|
|
9608
9608
|
const excluded = (path, scope) => scope.exclusions.some((excludedPath) => excludedPath === path || path.startsWith(`${excludedPath}/`));
|
|
9609
9609
|
const covers = (path) => normOuter.paths.some((base) => scopePathCovers(base, path)) && !excluded(path, normOuter);
|
|
9610
9610
|
const innerExcludes = (path) => innerExclusions.some((excludedPath) => excludedPath === path || path.startsWith(`${excludedPath}/`));
|
|
9611
|
-
|
|
9611
|
+
const uncovered = innerPaths.find((path) => !covers(path));
|
|
9612
|
+
if (uncovered !== undefined)
|
|
9613
|
+
return { path: uncovered, exclusion: null };
|
|
9614
|
+
for (const excludedPath of normOuter.exclusions) {
|
|
9615
|
+
const base = innerPaths.find((path) => (path === "." || excludedPath === path || excludedPath.startsWith(`${path}/`)) && !innerExcludes(excludedPath));
|
|
9616
|
+
if (base !== undefined)
|
|
9617
|
+
return { path: base, exclusion: excludedPath };
|
|
9618
|
+
}
|
|
9619
|
+
return null;
|
|
9612
9620
|
};
|
|
9621
|
+
var scopeCovers = (outer, inner) => scopeGap(outer, inner) === null;
|
|
9613
9622
|
var refSchema = discriminatedUnion("kind", [
|
|
9614
9623
|
object({ kind: literal("file"), path: pathValue, digest: nullableDigest }).strict(),
|
|
9615
9624
|
object({
|
|
@@ -9822,7 +9831,8 @@ var findingSchema = object({
|
|
|
9822
9831
|
candidateId: nullableDigest,
|
|
9823
9832
|
refs: array(refSchema),
|
|
9824
9833
|
disposition: _enum(["open", "fixed", "dismissed", "deferred"]),
|
|
9825
|
-
resolution: object({ reason: text2, evidenceIds: array(id), decisionIds: array(id) }).strict().nullable()
|
|
9834
|
+
resolution: object({ reason: text2, evidenceIds: array(id), decisionIds: array(id) }).strict().nullable(),
|
|
9835
|
+
leadOwned: literal(true).optional()
|
|
9826
9836
|
}).strict();
|
|
9827
9837
|
var assignmentSchema = object({
|
|
9828
9838
|
role: _enum(["investigator", "reviewer", "implementer"]),
|
package/dist/workit-hook.js
CHANGED
|
@@ -84,7 +84,7 @@ if (quiet) {
|
|
|
84
84
|
`);
|
|
85
85
|
} else {
|
|
86
86
|
try {
|
|
87
|
-
const { runCodexHook } = await import("./workit-hook-
|
|
87
|
+
const { runCodexHook } = await import("./workit-hook-mbshcvgv.js");
|
|
88
88
|
await runCodexHook([payload]);
|
|
89
89
|
} catch (error) {
|
|
90
90
|
const { answerRuntimeFailure } = await import("./workit-hook-ehy7rps6.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/codex",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"build": "bun scripts/build.ts"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@workit-dev/core": "^1.1.
|
|
45
|
-
"@workit-dev/mcp": "^1.1.
|
|
44
|
+
"@workit-dev/core": "^1.1.6",
|
|
45
|
+
"@workit-dev/mcp": "^1.1.6"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|