@fro.bot/systematic 3.2.7 → 3.3.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/cli.js +1 -1
- package/dist/{index-6yz7bra8.js → index-0vm17gwv.js} +42 -4
- package/dist/index.js +11437 -207
- package/dist/lib/config-schema.d.ts +8 -0
- package/dist/lib/config.d.ts +6 -0
- package/dist/lib/opencode-operation-observer.d.ts +79 -0
- package/dist/lib/opencode-workflow-guard.d.ts +54 -0
- package/dist/lib/question-attestation.d.ts +94 -0
- package/dist/lib/receipt-classifier.d.ts +44 -0
- package/dist/lib/receipt-ledger.d.ts +139 -0
- package/dist/lib/receipt-readback.d.ts +164 -0
- package/dist/lib/workflow-guard.d.ts +136 -0
- package/dist/schemas/systematic-config.schema.json +57 -3
- package/package.json +5 -3
package/dist/cli.js
CHANGED
|
@@ -13,6 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
set: __exportSetter.bind(all, name)
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
+
var __require = import.meta.require;
|
|
16
17
|
|
|
17
18
|
// src/lib/skills.ts
|
|
18
19
|
import fs2 from "fs";
|
|
@@ -16110,6 +16111,24 @@ var modeSchema = exports_external.enum(["subagent", "primary", "all"]).meta({
|
|
|
16110
16111
|
description: "Agent execution mode",
|
|
16111
16112
|
examples: ["subagent", "primary", "all"]
|
|
16112
16113
|
});
|
|
16114
|
+
var workflowGuardModeSchema = exports_external.enum([
|
|
16115
|
+
"observe",
|
|
16116
|
+
"protected",
|
|
16117
|
+
"disabled"
|
|
16118
|
+
]);
|
|
16119
|
+
var WorkflowGuardSchema = exports_external.object({
|
|
16120
|
+
mode: workflowGuardModeSchema.default("observe").meta({
|
|
16121
|
+
description: "Workflow guard mode",
|
|
16122
|
+
examples: ["observe", "protected", "disabled"]
|
|
16123
|
+
}),
|
|
16124
|
+
debug: exports_external.boolean().default(false).meta({
|
|
16125
|
+
description: "Enable workflow guard debugging",
|
|
16126
|
+
examples: [false, true]
|
|
16127
|
+
})
|
|
16128
|
+
}).strict().default({ mode: "observe", debug: false }).meta({
|
|
16129
|
+
description: "Workflow guard configuration",
|
|
16130
|
+
examples: [{ mode: "observe", debug: false }]
|
|
16131
|
+
});
|
|
16113
16132
|
var colorSchema = exports_external.union([
|
|
16114
16133
|
exports_external.enum(OPENCODE_AGENT_COLOR_TOKENS),
|
|
16115
16134
|
exports_external.string().regex(/^#[0-9a-fA-F]{6}$/, "must be a 6-digit hex color (#RRGGBB)")
|
|
@@ -16256,6 +16275,7 @@ function createSystematicConfigSchema(opts) {
|
|
|
16256
16275
|
{ enabled: false, file: ".opencode/custom-prompt.md" }
|
|
16257
16276
|
]
|
|
16258
16277
|
}),
|
|
16278
|
+
workflow_guard: WorkflowGuardSchema,
|
|
16259
16279
|
skills_as_commands: exports_external.boolean().default(true).meta({
|
|
16260
16280
|
description: "Register skills discovered from user/project skill directories (OpenCode config and other agent-harness-standard locations) as slash commands. Default true.",
|
|
16261
16281
|
examples: [true, false]
|
|
@@ -16289,11 +16309,16 @@ var DEFAULT_CONFIG = {
|
|
|
16289
16309
|
bootstrap: {
|
|
16290
16310
|
enabled: true
|
|
16291
16311
|
},
|
|
16312
|
+
workflow_guard: {
|
|
16313
|
+
mode: "observe",
|
|
16314
|
+
debug: false
|
|
16315
|
+
},
|
|
16292
16316
|
agents: {},
|
|
16293
16317
|
categories: {},
|
|
16294
16318
|
skills_as_commands: true
|
|
16295
16319
|
};
|
|
16296
16320
|
var SECURITY_OVERLAY_FIELDS2 = new Set(SECURITY_OVERLAY_FIELDS);
|
|
16321
|
+
var PROJECT_PROTECTED_FIELDS = new Set(["workflow_guard"]);
|
|
16297
16322
|
var CURRENT_SKILL_NAMES_SET = new Set(BUNDLED_SKILL_NAMES);
|
|
16298
16323
|
var CURRENT_AGENT_NAMES_SET = new Set([
|
|
16299
16324
|
...BUNDLED_AGENT_NAMES,
|
|
@@ -16421,11 +16446,19 @@ function loadConfigSource(filePath, trust) {
|
|
|
16421
16446
|
const rawConfig = loadJsoncFile(filePath);
|
|
16422
16447
|
if (!rawConfig)
|
|
16423
16448
|
return null;
|
|
16424
|
-
const
|
|
16449
|
+
const config2 = trust === "project" ? stripProjectProtectedFields(rawConfig) : rawConfig;
|
|
16450
|
+
const result = SystematicConfigSchema.safeParse(config2);
|
|
16425
16451
|
if (!result.success) {
|
|
16426
|
-
throwTopLevelConfigSchemaError(filePath, trust, result.error.issues,
|
|
16452
|
+
throwTopLevelConfigSchemaError(filePath, trust, result.error.issues, config2);
|
|
16453
|
+
}
|
|
16454
|
+
return { path: filePath, config: config2, trust };
|
|
16455
|
+
}
|
|
16456
|
+
function stripProjectProtectedFields(rawConfig) {
|
|
16457
|
+
const config2 = { ...rawConfig };
|
|
16458
|
+
for (const field of PROJECT_PROTECTED_FIELDS) {
|
|
16459
|
+
delete config2[field];
|
|
16427
16460
|
}
|
|
16428
|
-
return
|
|
16461
|
+
return config2;
|
|
16429
16462
|
}
|
|
16430
16463
|
function isRecord2(value) {
|
|
16431
16464
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -16471,6 +16504,11 @@ function loadConfigWithSources(projectDir) {
|
|
|
16471
16504
|
...projectConfig?.bootstrap,
|
|
16472
16505
|
...customConfig?.bootstrap
|
|
16473
16506
|
},
|
|
16507
|
+
workflow_guard: {
|
|
16508
|
+
...DEFAULT_CONFIG.workflow_guard,
|
|
16509
|
+
...userConfig?.workflow_guard,
|
|
16510
|
+
...customConfig?.workflow_guard
|
|
16511
|
+
},
|
|
16474
16512
|
agents: overlayValues(overlays.agents),
|
|
16475
16513
|
categories: overlayValues(overlays.categories),
|
|
16476
16514
|
skills_as_commands: customConfig?.skills_as_commands ?? projectConfig?.skills_as_commands ?? userConfig?.skills_as_commands ?? DEFAULT_CONFIG.skills_as_commands
|
|
@@ -16639,4 +16677,4 @@ function extractCommandFrontmatter(content) {
|
|
|
16639
16677
|
};
|
|
16640
16678
|
}
|
|
16641
16679
|
|
|
16642
|
-
export { parseFrontmatter, isRecord, walkDir, extractFrontmatterFromContent, findSkillsInDir, parse2 as parse, parseTree2 as parseTree, modify, applyEdits, exports_external, AgentOverlaySchema, CategoryOverlaySchema, loadConfig, loadConfigWithSources, getConfigPaths, findAgentsInDir, extractAgentFrontmatter, findCommandsInDir, extractCommandFrontmatter };
|
|
16680
|
+
export { __require, parseFrontmatter, isRecord, walkDir, extractFrontmatterFromContent, findSkillsInDir, parse2 as parse, parseTree2 as parseTree, modify, applyEdits, exports_external, AgentOverlaySchema, CategoryOverlaySchema, loadConfig, loadConfigWithSources, getConfigPaths, findAgentsInDir, extractAgentFrontmatter, findCommandsInDir, extractCommandFrontmatter };
|