@brainervirus/workit-codex 2.0.1 → 2.1.0
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
|
@@ -17087,13 +17087,6 @@ var workspaceConfigSchema = object({
|
|
|
17087
17087
|
profiles: record(nonBlank, workspaceProfileSchema).optional(),
|
|
17088
17088
|
releaseTracks: record(nonBlank, releaseTrackSchema).optional()
|
|
17089
17089
|
}).passthrough().superRefine((workspace, context) => {
|
|
17090
|
-
if (workspace.youtrack && workspace.vcs?.provider !== "gitlab") {
|
|
17091
|
-
context.addIssue({
|
|
17092
|
-
code: "custom",
|
|
17093
|
-
path: ["youtrack"],
|
|
17094
|
-
message: `YouTrack issue linking requires the gitlab provider, got ${workspace.vcs?.provider ?? "unset"}`
|
|
17095
|
-
});
|
|
17096
|
-
}
|
|
17097
17090
|
if (workspace.issues && workspace.vcs?.provider !== "github") {
|
|
17098
17091
|
context.addIssue({
|
|
17099
17092
|
code: "custom",
|
|
@@ -17285,13 +17278,10 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
|
|
|
17285
17278
|
}
|
|
17286
17279
|
return mostSpecific[0];
|
|
17287
17280
|
};
|
|
17288
|
-
var
|
|
17289
|
-
const result = readWorkspacesResult(dir);
|
|
17290
|
-
if (result.status === "malformed" || result.status === "invalid")
|
|
17291
|
-
throw new Error(result.error);
|
|
17281
|
+
var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
|
|
17292
17282
|
const targets = [cwd, realpathOf(cwd)].map((p) => p.replaceAll("\\", "/"));
|
|
17293
17283
|
const matches = [];
|
|
17294
|
-
for (const ws of
|
|
17284
|
+
for (const ws of entries) {
|
|
17295
17285
|
const glob = ws.glob.replaceAll("\\", "/");
|
|
17296
17286
|
const canonical = canonicalGlob(glob);
|
|
17297
17287
|
let matched = false;
|
|
@@ -17306,6 +17296,12 @@ var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
|
17306
17296
|
}
|
|
17307
17297
|
return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
|
|
17308
17298
|
};
|
|
17299
|
+
var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
17300
|
+
const result = readWorkspacesResult(dir);
|
|
17301
|
+
if (result.status === "malformed" || result.status === "invalid")
|
|
17302
|
+
throw new Error(result.error);
|
|
17303
|
+
return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
|
|
17304
|
+
};
|
|
17309
17305
|
var runtimeWorkspacePolicySchema = (kind) => {
|
|
17310
17306
|
const key = kind === "branch" ? "branchPolicy" : kind === "commit" ? "commitPolicy" : "vcs";
|
|
17311
17307
|
const policySchema = kind === "branch" ? workspaceBranchPolicySchema : kind === "commit" ? workspaceCommitPolicySchema : object({
|
|
@@ -17581,8 +17577,8 @@ function vcsConfig(mode, cwd) {
|
|
|
17581
17577
|
const hasWorkspacePolicy = typeof wp.preset === "string" && Object.hasOwn(PRESETS, wp.preset);
|
|
17582
17578
|
const policyDefault = resolveBranchPolicyFor(root).defaultTargetBranch;
|
|
17583
17579
|
const defaultTarget = String(wsVcs.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : cfg.defaultTargetBranch ?? policyDefault) ?? "develop");
|
|
17584
|
-
const linkIssues =
|
|
17585
|
-
const youtrackBaseUrl =
|
|
17580
|
+
const linkIssues = typeof wsYt.link_issues === "boolean" ? wsYt.link_issues : null;
|
|
17581
|
+
const youtrackBaseUrl = typeof wsYt.baseUrl === "string" ? wsYt.baseUrl : null;
|
|
17586
17582
|
let issuesProvider = null;
|
|
17587
17583
|
let linkOnPr = null;
|
|
17588
17584
|
if (provider === "github" && typeof wsIssues.provider === "string" && wsIssues.provider.toLowerCase() === "github") {
|
package/dist/workit-hook.js
CHANGED
|
@@ -10124,13 +10124,6 @@ var workspaceConfigSchema = object({
|
|
|
10124
10124
|
profiles: record(nonBlank, workspaceProfileSchema).optional(),
|
|
10125
10125
|
releaseTracks: record(nonBlank, releaseTrackSchema).optional()
|
|
10126
10126
|
}).passthrough().superRefine((workspace, context) => {
|
|
10127
|
-
if (workspace.youtrack && workspace.vcs?.provider !== "gitlab") {
|
|
10128
|
-
context.addIssue({
|
|
10129
|
-
code: "custom",
|
|
10130
|
-
path: ["youtrack"],
|
|
10131
|
-
message: `YouTrack issue linking requires the gitlab provider, got ${workspace.vcs?.provider ?? "unset"}`
|
|
10132
|
-
});
|
|
10133
|
-
}
|
|
10134
10127
|
if (workspace.issues && workspace.vcs?.provider !== "github") {
|
|
10135
10128
|
context.addIssue({
|
|
10136
10129
|
code: "custom",
|
|
@@ -10322,13 +10315,10 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
|
|
|
10322
10315
|
}
|
|
10323
10316
|
return mostSpecific[0];
|
|
10324
10317
|
};
|
|
10325
|
-
var
|
|
10326
|
-
const result = readWorkspacesResult(dir);
|
|
10327
|
-
if (result.status === "malformed" || result.status === "invalid")
|
|
10328
|
-
throw new Error(result.error);
|
|
10318
|
+
var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
|
|
10329
10319
|
const targets = [cwd, realpathOf(cwd)].map((p) => p.replaceAll("\\", "/"));
|
|
10330
10320
|
const matches = [];
|
|
10331
|
-
for (const ws of
|
|
10321
|
+
for (const ws of entries) {
|
|
10332
10322
|
const glob = ws.glob.replaceAll("\\", "/");
|
|
10333
10323
|
const canonical = canonicalGlob(glob);
|
|
10334
10324
|
let matched = false;
|
|
@@ -10343,6 +10333,12 @@ var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
|
10343
10333
|
}
|
|
10344
10334
|
return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
|
|
10345
10335
|
};
|
|
10336
|
+
var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
10337
|
+
const result = readWorkspacesResult(dir);
|
|
10338
|
+
if (result.status === "malformed" || result.status === "invalid")
|
|
10339
|
+
throw new Error(result.error);
|
|
10340
|
+
return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
|
|
10341
|
+
};
|
|
10346
10342
|
var runtimeWorkspacePolicySchema = (kind) => {
|
|
10347
10343
|
const key = kind === "branch" ? "branchPolicy" : kind === "commit" ? "commitPolicy" : "vcs";
|
|
10348
10344
|
const policySchema = kind === "branch" ? workspaceBranchPolicySchema : kind === "commit" ? workspaceCommitPolicySchema : object({
|
|
@@ -10480,8 +10476,8 @@ function vcsConfig(mode, cwd) {
|
|
|
10480
10476
|
const hasWorkspacePolicy = typeof wp.preset === "string" && Object.hasOwn(PRESETS, wp.preset);
|
|
10481
10477
|
const policyDefault = resolveBranchPolicyFor(root).defaultTargetBranch;
|
|
10482
10478
|
const defaultTarget = String(wsVcs.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : cfg.defaultTargetBranch ?? policyDefault) ?? "develop");
|
|
10483
|
-
const linkIssues =
|
|
10484
|
-
const youtrackBaseUrl =
|
|
10479
|
+
const linkIssues = typeof wsYt.link_issues === "boolean" ? wsYt.link_issues : null;
|
|
10480
|
+
const youtrackBaseUrl = typeof wsYt.baseUrl === "string" ? wsYt.baseUrl : null;
|
|
10485
10481
|
let issuesProvider = null;
|
|
10486
10482
|
let linkOnPr = null;
|
|
10487
10483
|
if (provider === "github" && typeof wsIssues.provider === "string" && wsIssues.provider.toLowerCase() === "github") {
|
|
@@ -11941,7 +11937,8 @@ let imported decisions grant authority. Never turn a host deny into allow or
|
|
|
11941
11937
|
claim enforcement/evidence a host cannot provide. A precise request with settled
|
|
11942
11938
|
constraints does not need an interview. Present genuine unresolved options with
|
|
11943
11939
|
evidence and a recommendation, then continue toward the requested delivery
|
|
11944
|
-
endpoint: investigation, implementation, PR/MR-ready,
|
|
11940
|
+
endpoint: investigation, implementation, branch/commit/push, PR/MR-ready,
|
|
11941
|
+
merge, or release. Run
|
|
11945
11942
|
applicable checks and safe repairs without repeated continuation questions;
|
|
11946
11943
|
stop for missing host authority, a new consequential choice, a conflicting edit,
|
|
11947
11944
|
or an unresolved blocker. A tracked record may close when actual evidence
|
|
@@ -11953,6 +11950,12 @@ confirm the stop. Preserve unresolved requirements, gaps, and uncertain workers.
|
|
|
11953
11950
|
When context changes, distinguish a quick question, same-task adjustment, and
|
|
11954
11951
|
separate request. Answer a quick question without pausing/resuming task state;
|
|
11955
11952
|
park a concise checkpoint only when substantial work needs to continue later.
|
|
11953
|
+
For work spanning repositories, bind each unfinished item to its actual checkout,
|
|
11954
|
+
branch, requested deliverables, and delivery endpoint. Preserve held items with
|
|
11955
|
+
an explicit resume condition. Resolve competing plausible targets before a
|
|
11956
|
+
mutation; ask only when available context cannot settle that consequential choice.
|
|
11957
|
+
Before reporting delivery, reconcile every requested item and observe the actual
|
|
11958
|
+
target result; a local commit alone is not evidence of a requested remote push.
|
|
11956
11959
|
|
|
11957
11960
|
Skill routing: slash aliases /wk-* load on demand. Use workit-steer for a
|
|
11958
11961
|
substantial interruption or change of direction, workit-deslop when relevant
|
|
@@ -11999,6 +12002,13 @@ var compactText = (value, limit) => value === null ? null : value.replace(privat
|
|
|
11999
12002
|
return `${match.slice(0, space)} <redacted>`;
|
|
12000
12003
|
}).slice(0, limit);
|
|
12001
12004
|
var compactBytes = (value) => new TextEncoder().encode(value).byteLength;
|
|
12005
|
+
var compactTimestamp = (value) => `${value.slice(0, 19)}.${value.slice(20, -1).padEnd(9, "0")}`;
|
|
12006
|
+
var compactDecisionChoice = (entry) => {
|
|
12007
|
+
const stated = entry.data.binding.statedChoice?.text;
|
|
12008
|
+
const approved = entry.data.response === "approved" ? entry.data.binding.approvedContent : "";
|
|
12009
|
+
const source = stated?.trim() || approved.trim() || null;
|
|
12010
|
+
return compactText(source, COMPACT_TEXT_BYTES);
|
|
12011
|
+
};
|
|
12002
12012
|
var compactReference = (ref) => {
|
|
12003
12013
|
if (ref.kind === "file")
|
|
12004
12014
|
return {
|
|
@@ -12014,11 +12024,18 @@ var compactReference = (ref) => {
|
|
|
12014
12024
|
return { kind: ref.kind };
|
|
12015
12025
|
};
|
|
12016
12026
|
function compactTaskContext(view) {
|
|
12017
|
-
const decisions = view.task.decisions.slice().sort((left, right) =>
|
|
12027
|
+
const decisions = view.task.decisions.slice().sort((left, right) => {
|
|
12028
|
+
const leftAt = compactTimestamp(left.recordedAt);
|
|
12029
|
+
const rightAt = compactTimestamp(right.recordedAt);
|
|
12030
|
+
if (leftAt !== rightAt)
|
|
12031
|
+
return leftAt > rightAt ? -1 : 1;
|
|
12032
|
+
return left.id < right.id ? -1 : left.id > right.id ? 1 : 0;
|
|
12033
|
+
}).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
|
|
12018
12034
|
id: entry.id,
|
|
12019
12035
|
purpose: entry.data.purpose,
|
|
12020
12036
|
status: entry.data.response,
|
|
12021
12037
|
digest: entry.data.digest,
|
|
12038
|
+
choice: compactDecisionChoice(entry) || `task.inspect taskId=${view.task.id} view=full; decision=${entry.id}`,
|
|
12022
12039
|
references: entry.data.binding.contentRefs.slice(0, 1).map(compactReference)
|
|
12023
12040
|
}));
|
|
12024
12041
|
const methods = view.task.policy ? selectMethods(view.task.policy, view.capabilities).map((method) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-codex",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, and fourteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"build": "bun scripts/build.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@brainervirus/workit-core": "^2.0
|
|
42
|
-
"@brainervirus/workit-mcp": "^2.0
|
|
41
|
+
"@brainervirus/workit-core": "^2.1.0",
|
|
42
|
+
"@brainervirus/workit-mcp": "^2.1.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=24"
|
|
@@ -22,6 +22,14 @@ request, and a timeout is not proof that a worker stopped.
|
|
|
22
22
|
until process exit or explicit recovery.
|
|
23
23
|
4. Reconcile helper reports and run the checks appropriate to the requested
|
|
24
24
|
outcome. If delegation is unavailable, continue inline when useful.
|
|
25
|
+
5. Before a cross-repo mutation, resolve the actual checkout, branch and remote
|
|
26
|
+
from the request and current context. Ask only if competing plausible targets
|
|
27
|
+
remain unresolved. Branch, commit, direct push, PR-ready, merge and release
|
|
28
|
+
are distinct endpoints; perform only the authorized one under target rules.
|
|
29
|
+
Before saying done, reconcile every named deliverable against that checkout
|
|
30
|
+
and verify the requested result. For a push, observe the destination remote
|
|
31
|
+
ref and confirm it contains the delivered commit; report drift or missing
|
|
32
|
+
items as blockers instead of treating local success as remote delivery.
|
|
25
33
|
|
|
26
34
|
Do not edit Workit metadata directly, create nested helper trees, widen paths, or
|
|
27
35
|
create a second lifecycle. Read-only investigation and bounded reports do not
|
|
@@ -18,7 +18,11 @@ request. Preserve continuity when it helps; do not manufacture task mutations.
|
|
|
18
18
|
3. For a separate request, do not silently resume an old objective. Park a
|
|
19
19
|
concise checkpoint only when substantial work needs to continue later. Start
|
|
20
20
|
a distinct tracked record only if the new work benefits from continuity,
|
|
21
|
-
dependencies, coordination, or durable decisions.
|
|
21
|
+
dependencies, coordination, or durable decisions. For work spanning repos,
|
|
22
|
+
checkpoint each unfinished item with its checkout, branch, requested
|
|
23
|
+
deliverables, and delivery endpoint. Keep explicitly held items parked with
|
|
24
|
+
their resume condition until the user resumes them. A conversational
|
|
25
|
+
checkpoint is sufficient when no task record is needed.
|
|
22
26
|
4. Before resuming a named tracked task, reconcile its checkout, branch, dirty
|
|
23
27
|
state, current policy, stale evidence, uncertain effects, and ownership. Do
|
|
24
28
|
not change branches, stash, fetch large histories, or seize ownership just
|