@workit-dev/opencode 2.18.1 → 2.19.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/assets/skills/workit-retro/SKILL.md +1 -1
- package/dist/plugin.js +38 -13
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ proposes and stops. Nothing changes until the user approves.
|
|
|
42
42
|
agent behaviour, becomes an issue or PR on BrainerVirus/workit, not a host
|
|
43
43
|
memory (one host reads it). Never fork a local copy. Use a minimal synthetic
|
|
44
44
|
repro: no private repo name, path, code, ledger text, PR, thread or transcript.
|
|
45
|
-
Paste the
|
|
45
|
+
Paste the whole `workit feedback "<title>" --body-file -` draft; `--post` once approved.
|
|
46
46
|
6. **Bloat guards.** AGENTS.md stays within 8 KB: each addition names what it
|
|
47
47
|
removes. Create `CODING_STANDARDS.md` or `GLOSSARY.md` only in the same
|
|
48
48
|
edit as its first real entry, never as a scaffold. Edit steering text by
|
package/dist/plugin.js
CHANGED
|
@@ -9496,6 +9496,7 @@ var workspaceConfigSchema = object({
|
|
|
9496
9496
|
trailers: boolean2().optional().describe("Whether commits get the `Workit-Session:` trailer (default true). With false, authorship lives in the ledger only."),
|
|
9497
9497
|
deleteBranch: boolean2().optional().describe("Whether `workit pr merge` deletes the head branch after a merge (default true); `--keep-branch` opts out for one merge."),
|
|
9498
9498
|
cleanup: unknown().optional().describe("What happens when work finishes: `auto` (default) removes the delivered branch's clean Workit worktree and local branch, switches a clean checkout on it back to the trunk, and stops the processes registered inside them; `keep` removes and stops nothing. A value Workit does not know reads as `keep`."),
|
|
9499
|
+
feedback: unknown().optional().describe('`workit feedback` for this workspace: `off` hides its contract line and makes the verb refuse; `{ "account": "<login>" }` names the GitHub login it posts with; workspaces inside this one inherit it.'),
|
|
9499
9500
|
liveSessionGuard: boolean2().optional().describe("Whether the live-session guard denies edits in a checkout another live agent session owns (default true)."),
|
|
9500
9501
|
fanout: object({
|
|
9501
9502
|
tierModels: unknown().optional().describe("The model per slice TIER (mundane, standard, hard), as one name or per host.")
|
|
@@ -9538,7 +9539,10 @@ var workspaceConfigSchema = object({
|
|
|
9538
9539
|
});
|
|
9539
9540
|
var workspacesFileSchema = object({
|
|
9540
9541
|
workspaces: array(workspaceConfigSchema).optional().describe("Workspace entries, each mapping a path glob to its forge, policies and grants."),
|
|
9541
|
-
models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false).")
|
|
9542
|
+
models: object({ roles: modelRoles }).passthrough().optional().describe("The global default model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false)."),
|
|
9543
|
+
feedback: object({
|
|
9544
|
+
account: nonBlank.optional().describe("The GitHub login `workit feedback --post` uses when no workspace names one; never the workspace's work account by default.")
|
|
9545
|
+
}).passthrough().optional().describe("`workit feedback` defaults for every workspace.")
|
|
9542
9546
|
}).passthrough().superRefine((file, context) => {
|
|
9543
9547
|
const names = new Set;
|
|
9544
9548
|
for (const [index, workspace] of (file.workspaces ?? []).entries()) {
|
|
@@ -9976,6 +9980,12 @@ var resolveRuntimeReleasePackages = (cwd, dir) => {
|
|
|
9976
9980
|
return found?.source ? { workspace: found.source.name, releasePackages: found.source.releasePackages } : null;
|
|
9977
9981
|
};
|
|
9978
9982
|
var workspaceLiveSessionGuard = (cwd, dir) => inheritedSetting(cwd, dir, (entry) => typeof entry.liveSessionGuard === "boolean")?.source?.liveSessionGuard !== false;
|
|
9983
|
+
var feedbackSetting = (cwd, dir) => {
|
|
9984
|
+
const found = inheritedSetting(cwd, dir, (entry) => entry.feedback !== undefined);
|
|
9985
|
+
const value = found?.source?.feedback;
|
|
9986
|
+
return { found, value, off: value === "off" };
|
|
9987
|
+
};
|
|
9988
|
+
var workspaceFeedbackOff = (cwd, dir) => feedbackSetting(cwd, dir).off;
|
|
9979
9989
|
var changelogPathOf = (value) => {
|
|
9980
9990
|
if (typeof value !== "string")
|
|
9981
9991
|
return null;
|
|
@@ -18387,6 +18397,7 @@ function selectMethods(policy, capabilities) {
|
|
|
18387
18397
|
return [{ id, reason: reasons.join("; "), assurance: capability.assurance }];
|
|
18388
18398
|
});
|
|
18389
18399
|
}
|
|
18400
|
+
var FEEDBACK_LINE = "Workit friction: offer `workit feedback` once per problem; keep working.";
|
|
18390
18401
|
var BOOTSTRAP = `
|
|
18391
18402
|
Workit is optional coordination and proof tooling: you decide what and
|
|
18392
18403
|
whether, the CLI does how and records what it observed.
|
|
@@ -18441,6 +18452,7 @@ effect before a retry.
|
|
|
18441
18452
|
Mid-task: never silently drop or resume an objective (workit-continue).
|
|
18442
18453
|
Notes, drafts, logs, resume files: \`workit dir notes|handoffs\` (outside the
|
|
18443
18454
|
repo), never the repo tree.
|
|
18455
|
+
FEEDBACK_LINE
|
|
18444
18456
|
|
|
18445
18457
|
Skills: load the skill, never act from memory.
|
|
18446
18458
|
- brainstorm, plan, spec, grill, should we: workit-shape
|
|
@@ -18458,9 +18470,13 @@ Skills: load the skill, never act from memory.
|
|
|
18458
18470
|
- architecture, deepen modules (user-invoked; offer it): workit-architecture
|
|
18459
18471
|
`.trim();
|
|
18460
18472
|
var invariantBootstrap = (session = null) => {
|
|
18473
|
+
const feedbackOff = session !== null && workspaceFeedbackOff(session.cwd);
|
|
18474
|
+
const bootstrap = BOOTSTRAP.replace(`FEEDBACK_LINE
|
|
18475
|
+
`, () => feedbackOff ? "" : `${FEEDBACK_LINE}
|
|
18476
|
+
`);
|
|
18461
18477
|
const table = session && hostFamily(session.host) === "claude_code" ? claudeSpawnTable(session.cwd) : null;
|
|
18462
|
-
return table ? `${
|
|
18463
|
-
${table}` :
|
|
18478
|
+
return table ? `${bootstrap}
|
|
18479
|
+
${table}` : bootstrap;
|
|
18464
18480
|
};
|
|
18465
18481
|
|
|
18466
18482
|
// packages/workit-core/src/core/task-context.ts
|
|
@@ -25051,7 +25067,8 @@ var WORKIT_USER_ONLY = [
|
|
|
25051
25067
|
["install"],
|
|
25052
25068
|
["workspace", "seal"]
|
|
25053
25069
|
];
|
|
25054
|
-
var
|
|
25070
|
+
var WORKIT_ASKED_VERBS = ["feedback"];
|
|
25071
|
+
var USER_ONLY_WORD = new RegExp(`\\b(?:${[...new Set([...WORKIT_USER_ONLY.map((words) => words[0]), ...WORKIT_ASKED_VERBS])].join("|")})\\b`);
|
|
25055
25072
|
var mayRunUserOnly = (text) => {
|
|
25056
25073
|
const joined = text.replace(/\\\r?\n/g, "");
|
|
25057
25074
|
const bare = joined.replace(/['"\\]/g, "");
|
|
@@ -31937,15 +31954,23 @@ var createV2Lifecycle = (deps) => {
|
|
|
31937
31954
|
|
|
31938
31955
|
// packages/workit-opencode/src/bootstrap.ts
|
|
31939
31956
|
var OPENCODE_ADDENDUM = "On OpenCode, run external mutations with native host tools or the workit CLI; workit_context is read-only and there is no managed external-action executor, so do not create proposals or request Workit approvals merely to invoke native tools. Record a meaningful user choice with workit_decision directly; it needs no question.";
|
|
31940
|
-
var cached2;
|
|
31941
|
-
var
|
|
31942
|
-
|
|
31943
|
-
|
|
31944
|
-
|
|
31945
|
-
|
|
31957
|
+
var cached2 = new Map;
|
|
31958
|
+
var CACHE_DIRS = 32;
|
|
31959
|
+
var getWorkitBootstrap = (cwd = process.cwd()) => {
|
|
31960
|
+
const hit = cached2.get(cwd);
|
|
31961
|
+
if (hit !== undefined) {
|
|
31962
|
+
cached2.delete(cwd);
|
|
31963
|
+
cached2.set(cwd, hit);
|
|
31964
|
+
return hit;
|
|
31965
|
+
}
|
|
31966
|
+
const block = `<workit-contract>
|
|
31967
|
+
${invariantBootstrap({ cwd, host: "opencode" })}
|
|
31946
31968
|
${OPENCODE_ADDENDUM}
|
|
31947
31969
|
</workit-contract>`;
|
|
31948
|
-
|
|
31970
|
+
cached2.set(cwd, block);
|
|
31971
|
+
if (cached2.size > CACHE_DIRS)
|
|
31972
|
+
cached2.delete(cached2.keys().next().value);
|
|
31973
|
+
return block;
|
|
31949
31974
|
};
|
|
31950
31975
|
|
|
31951
31976
|
// packages/workit-opencode/src/runtime.ts
|
|
@@ -32010,7 +32035,7 @@ var hasMarker = (system, marker) => system.some((part) => part.type === "text" &
|
|
|
32010
32035
|
var injectAgentContext = (root, session, directChildren, system) => {
|
|
32011
32036
|
if (!session || !sameWorkspace(root, session.directory))
|
|
32012
32037
|
return;
|
|
32013
|
-
const bootstrap = session.parentID === undefined ? getWorkitBootstrap() : null;
|
|
32038
|
+
const bootstrap = session.parentID === undefined ? getWorkitBootstrap(session.directory ?? root) : null;
|
|
32014
32039
|
const taskContext = compactContextFor(root, session.id);
|
|
32015
32040
|
const workerContext = session.parentID ? workerContextFor(root, session.id, session.parentID, directChildren) : null;
|
|
32016
32041
|
if (bootstrap && !hasMarker(system, "<workit-contract>"))
|
|
@@ -32060,7 +32085,7 @@ var judgeVerdictText = (root, session, workerContext) => {
|
|
|
32060
32085
|
var injectModelSwitch = (root, session, directChildren, system) => {
|
|
32061
32086
|
if (!session || !sameWorkspace(root, session.directory))
|
|
32062
32087
|
return;
|
|
32063
|
-
const contract = session.parentID ? workerContextFor(root, session.id, session.parentID, directChildren) : getWorkitBootstrap();
|
|
32088
|
+
const contract = session.parentID ? workerContextFor(root, session.id, session.parentID, directChildren) : getWorkitBootstrap(session.directory ?? root);
|
|
32064
32089
|
const taskContext = compactContextFor(root, session.id);
|
|
32065
32090
|
const parts = [
|
|
32066
32091
|
contract,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opencode/plugin": "2.0.18",
|
|
44
|
-
"@workit-dev/core": "^2.
|
|
44
|
+
"@workit-dev/core": "^2.19.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|