odai-dsh-agent 0.2.5 → 0.2.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/README.md +3 -3
- package/build/bin/odai-dsh-agent.d.mts +3 -0
- package/build/bin/odai-dsh-agent.d.mts.map +1 -0
- package/build/bin/odai-dsh-agent.mjs +114 -0
- package/build/bin/odai-dsh-agent.mjs.map +1 -0
- package/build/src/dsh-version.d.mts +16 -0
- package/build/src/dsh-version.d.mts.map +1 -0
- package/build/src/dsh-version.mjs +20 -0
- package/build/src/dsh-version.mjs.map +1 -0
- package/build/src/installer.d.mts +46 -0
- package/build/src/installer.d.mts.map +1 -0
- package/build/src/installer.mjs +397 -0
- package/build/src/installer.mjs.map +1 -0
- package/package.json +13 -12
- package/preset/odai/runtime/compaction-config.d.mts +66 -0
- package/preset/odai/runtime/compaction-config.d.mts.map +1 -0
- package/preset/odai/runtime/compaction-config.mjs +320 -342
- package/preset/odai/runtime/compaction-config.mjs.map +1 -0
- package/preset/odai/runtime/compaction-runtime.d.mts +68 -0
- package/preset/odai/runtime/compaction-runtime.d.mts.map +1 -0
- package/preset/odai/runtime/compaction-runtime.mjs +157 -0
- package/preset/odai/runtime/compaction-runtime.mjs.map +1 -0
- package/preset/odai/runtime/context-activation.d.mts +31 -0
- package/preset/odai/runtime/context-activation.d.mts.map +1 -0
- package/preset/odai/runtime/context-activation.mjs +55 -49
- package/preset/odai/runtime/context-activation.mjs.map +1 -0
- package/preset/odai/runtime/context-capability.d.mts +16 -0
- package/preset/odai/runtime/context-capability.d.mts.map +1 -0
- package/preset/odai/runtime/context-capability.mjs +79 -74
- package/preset/odai/runtime/context-capability.mjs.map +1 -0
- package/preset/odai/runtime/governance.d.mts +30 -0
- package/preset/odai/runtime/governance.d.mts.map +1 -0
- package/preset/odai/runtime/governance.mjs +126 -113
- package/preset/odai/runtime/governance.mjs.map +1 -0
- package/preset/odai/runtime/human-care.d.mts +13 -0
- package/preset/odai/runtime/human-care.d.mts.map +1 -0
- package/preset/odai/runtime/human-care.mjs +45 -42
- package/preset/odai/runtime/human-care.mjs.map +1 -0
- package/preset/odai/runtime/human-safety-continuity-store.d.mts +43 -0
- package/preset/odai/runtime/human-safety-continuity-store.d.mts.map +1 -0
- package/preset/odai/runtime/human-safety-continuity-store.mjs +193 -215
- package/preset/odai/runtime/human-safety-continuity-store.mjs.map +1 -0
- package/preset/odai/runtime/human-safety-continuity.d.mts +27 -0
- package/preset/odai/runtime/human-safety-continuity.d.mts.map +1 -0
- package/preset/odai/runtime/human-safety-continuity.mjs +205 -216
- package/preset/odai/runtime/human-safety-continuity.mjs.map +1 -0
- package/preset/odai/runtime/human-safety.d.mts +14 -0
- package/preset/odai/runtime/human-safety.d.mts.map +1 -0
- package/preset/odai/runtime/human-safety.mjs +50 -47
- package/preset/odai/runtime/human-safety.mjs.map +1 -0
- package/preset/odai/runtime/index.d.mts +8 -0
- package/preset/odai/runtime/index.d.mts.map +1 -0
- package/preset/odai/runtime/index.mjs +161 -2473
- package/preset/odai/runtime/index.mjs.map +1 -0
- package/preset/odai/runtime/lifecycle-runtime.d.mts +83 -0
- package/preset/odai/runtime/lifecycle-runtime.d.mts.map +1 -0
- package/preset/odai/runtime/lifecycle-runtime.mjs +1081 -0
- package/preset/odai/runtime/lifecycle-runtime.mjs.map +1 -0
- package/preset/odai/runtime/model-route.d.mts +22 -0
- package/preset/odai/runtime/model-route.d.mts.map +1 -0
- package/preset/odai/runtime/model-route.mjs +68 -60
- package/preset/odai/runtime/model-route.mjs.map +1 -0
- package/preset/odai/runtime/output-config.d.mts +54 -0
- package/preset/odai/runtime/output-config.d.mts.map +1 -0
- package/preset/odai/runtime/output-config.mjs +289 -315
- package/preset/odai/runtime/output-config.mjs.map +1 -0
- package/preset/odai/runtime/output-policy-state.d.mts +3 -0
- package/preset/odai/runtime/output-policy-state.d.mts.map +1 -0
- package/preset/odai/runtime/output-policy-state.mjs +41 -29
- package/preset/odai/runtime/output-policy-state.mjs.map +1 -0
- package/preset/odai/runtime/prompt-runtime.d.mts +55 -0
- package/preset/odai/runtime/prompt-runtime.d.mts.map +1 -0
- package/preset/odai/runtime/prompt-runtime.mjs +303 -0
- package/preset/odai/runtime/prompt-runtime.mjs.map +1 -0
- package/preset/odai/runtime/research-packet.d.mts +30 -0
- package/preset/odai/runtime/research-packet.d.mts.map +1 -0
- package/preset/odai/runtime/research-packet.mjs +116 -117
- package/preset/odai/runtime/research-packet.mjs.map +1 -0
- package/preset/odai/runtime/responsibility-gap.d.mts +26 -0
- package/preset/odai/runtime/responsibility-gap.d.mts.map +1 -0
- package/preset/odai/runtime/responsibility-gap.mjs +91 -85
- package/preset/odai/runtime/responsibility-gap.mjs.map +1 -0
- package/preset/odai/runtime/responsibility-scope.d.mts +69 -0
- package/preset/odai/runtime/responsibility-scope.d.mts.map +1 -0
- package/preset/odai/runtime/responsibility-scope.mjs +199 -171
- package/preset/odai/runtime/responsibility-scope.mjs.map +1 -0
- package/preset/odai/runtime/role-overlays.d.mts +5 -0
- package/preset/odai/runtime/role-overlays.d.mts.map +1 -0
- package/preset/odai/runtime/role-overlays.mjs +14 -13
- package/preset/odai/runtime/role-overlays.mjs.map +1 -0
- package/preset/odai/runtime/route-card.d.mts +42 -0
- package/preset/odai/runtime/route-card.d.mts.map +1 -0
- package/preset/odai/runtime/route-card.mjs +158 -146
- package/preset/odai/runtime/route-card.mjs.map +1 -0
- package/preset/odai/runtime/router.d.mts +79 -0
- package/preset/odai/runtime/router.d.mts.map +1 -0
- package/preset/odai/runtime/router.mjs +491 -559
- package/preset/odai/runtime/router.mjs.map +1 -0
- package/preset/odai/runtime/routing-config.d.mts +76 -0
- package/preset/odai/runtime/routing-config.d.mts.map +1 -0
- package/preset/odai/runtime/routing-config.mjs +373 -438
- package/preset/odai/runtime/routing-config.mjs.map +1 -0
- package/preset/odai/runtime/routing-context.d.mts +47 -0
- package/preset/odai/runtime/routing-context.d.mts.map +1 -0
- package/preset/odai/runtime/routing-context.mjs +238 -273
- package/preset/odai/runtime/routing-context.mjs.map +1 -0
- package/preset/odai/runtime/runtime-config.d.mts +24 -0
- package/preset/odai/runtime/runtime-config.d.mts.map +1 -0
- package/preset/odai/runtime/runtime-config.mjs +181 -0
- package/preset/odai/runtime/runtime-config.mjs.map +1 -0
- package/preset/odai/runtime/runtime-support.d.mts +91 -0
- package/preset/odai/runtime/runtime-support.d.mts.map +1 -0
- package/preset/odai/runtime/runtime-support.mjs +371 -0
- package/preset/odai/runtime/runtime-support.mjs.map +1 -0
- package/preset/odai/runtime/runtime-types.d.mts +235 -0
- package/preset/odai/runtime/runtime-types.d.mts.map +1 -0
- package/preset/odai/runtime/runtime-types.mjs +4 -0
- package/preset/odai/runtime/runtime-types.mjs.map +1 -0
- package/preset/odai/runtime/semantic-memory-store.d.mts +110 -0
- package/preset/odai/runtime/semantic-memory-store.d.mts.map +1 -0
- package/preset/odai/runtime/semantic-memory-store.mjs +271 -385
- package/preset/odai/runtime/semantic-memory-store.mjs.map +1 -0
- package/preset/odai/runtime/semantic-memory.d.mts +88 -0
- package/preset/odai/runtime/semantic-memory.d.mts.map +1 -0
- package/preset/odai/runtime/semantic-memory.mjs +790 -750
- package/preset/odai/runtime/semantic-memory.mjs.map +1 -0
- package/preset/odai/runtime/session-compat.d.mts +31 -0
- package/preset/odai/runtime/session-compat.d.mts.map +1 -0
- package/preset/odai/runtime/session-compat.mjs +301 -328
- package/preset/odai/runtime/session-compat.mjs.map +1 -0
- package/preset/odai/runtime/session-evidence.d.mts +25 -0
- package/preset/odai/runtime/session-evidence.d.mts.map +1 -0
- package/preset/odai/runtime/session-evidence.mjs +309 -287
- package/preset/odai/runtime/session-evidence.mjs.map +1 -0
- package/preset/odai/runtime/skill-bundle.d.mts +53 -0
- package/preset/odai/runtime/skill-bundle.d.mts.map +1 -0
- package/preset/odai/runtime/skill-bundle.mjs +286 -276
- package/preset/odai/runtime/skill-bundle.mjs.map +1 -0
- package/preset/odai/runtime/skill-evolution.d.mts +112 -0
- package/preset/odai/runtime/skill-evolution.d.mts.map +1 -0
- package/preset/odai/runtime/skill-evolution.mjs +1287 -1261
- package/preset/odai/runtime/skill-evolution.mjs.map +1 -0
- package/preset/odai/runtime/skill-selection-state.d.mts +5 -0
- package/preset/odai/runtime/skill-selection-state.d.mts.map +1 -0
- package/preset/odai/runtime/skill-selection-state.mjs +59 -43
- package/preset/odai/runtime/skill-selection-state.mjs.map +1 -0
- package/preset/odai/runtime/skill-selector.d.mts +28 -0
- package/preset/odai/runtime/skill-selector.d.mts.map +1 -0
- package/preset/odai/runtime/skill-selector.mjs +100 -109
- package/preset/odai/runtime/skill-selector.mjs.map +1 -0
- package/preset/odai/runtime/skill-source-config.d.mts +32 -0
- package/preset/odai/runtime/skill-source-config.d.mts.map +1 -0
- package/preset/odai/runtime/skill-source-config.mjs +200 -210
- package/preset/odai/runtime/skill-source-config.mjs.map +1 -0
- package/preset/odai/runtime/store-lock.d.mts +2 -0
- package/preset/odai/runtime/store-lock.d.mts.map +1 -0
- package/preset/odai/runtime/store-lock.mjs +92 -87
- package/preset/odai/runtime/store-lock.mjs.map +1 -0
- package/preset/odai/runtime/tool-runtime.d.mts +43 -0
- package/preset/odai/runtime/tool-runtime.d.mts.map +1 -0
- package/preset/odai/runtime/tool-runtime.mjs +221 -0
- package/preset/odai/runtime/tool-runtime.mjs.map +1 -0
- package/bin/odai-dsh-agent.mjs +0 -108
- package/scripts/verify-agent-load.mjs +0 -260
- package/src/dsh-version.mjs +0 -24
- package/src/installer.mjs +0 -385
|
@@ -1,239 +1,229 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
3
|
-
existsSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readFileSync,
|
|
6
|
-
renameSync,
|
|
7
|
-
rmSync,
|
|
8
|
-
statSync,
|
|
9
|
-
writeFileSync,
|
|
10
|
-
} from "node:fs";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync, } from "node:fs";
|
|
11
3
|
import { homedir } from "node:os";
|
|
12
4
|
import { dirname, resolve } from "node:path";
|
|
13
|
-
|
|
14
5
|
import { SKILL_SOURCE_MODES } from "./skill-bundle.mjs";
|
|
15
|
-
|
|
6
|
+
import { isUnknownRecord } from "./runtime-types.mjs";
|
|
16
7
|
export const SKILL_SOURCE_CONFIG_PROMPT = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
"## Odai skill source configuration",
|
|
9
|
+
"When the user naturally asks how the DSH Agent or Plugin selects Odai governance, or explicitly asks to inspect, set, or reset that source, use odai_skill_source_config.",
|
|
10
|
+
"Set a source only when the user explicitly chooses bundled, auto, or user. Never enable project or user skill overrides by inference.",
|
|
11
|
+
"bundled uses the Agent/Plugin release copy. auto allows compatible project/custom overrides and newer compatible user installs with bundled fallback. user requires a valid user/custom install and reports a visible bundled fallback when that source cannot be used.",
|
|
12
|
+
"Do not ask the user to edit YAML, JSON, managed Agent files, or Plugin configuration. The tool owns persistence. Changes apply from the next user turn.",
|
|
13
|
+
"An explicit deployment skillPath or ODAI_SKILL_PATH remains host-owned and takes precedence over this setting.",
|
|
23
14
|
].join("\n");
|
|
24
|
-
|
|
25
15
|
const STORE_SCHEMA_VERSION = 1;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
function isSkillSourceMode(value) {
|
|
17
|
+
return typeof value === "string" && SKILL_SOURCE_MODES.includes(value);
|
|
18
|
+
}
|
|
19
|
+
function errorCode(error) {
|
|
20
|
+
if (error === null || typeof error !== "object" || !("code" in error))
|
|
21
|
+
return undefined;
|
|
22
|
+
return typeof error.code === "string" ? error.code : undefined;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
export function resolveSkillSourceConfigPath(configuredPath, env = process.env) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
if (configuredPath !== undefined) {
|
|
26
|
+
if (typeof configuredPath !== "string" || configuredPath.trim() === "") {
|
|
27
|
+
throw new TypeError("config.governance.skillConfigPath must be a non-empty string");
|
|
28
|
+
}
|
|
29
|
+
return resolve(configuredPath.trim());
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
: resolve(homedir(), ".dsh");
|
|
44
|
-
return resolve(dshHome, "odai", "source.json");
|
|
31
|
+
const dshHome = typeof env.DSH_HOME === "string" && env.DSH_HOME.trim() !== ""
|
|
32
|
+
? resolve(env.DSH_HOME.trim())
|
|
33
|
+
: resolve(homedir(), ".dsh");
|
|
34
|
+
return resolve(dshHome, "odai", "source.json");
|
|
45
35
|
}
|
|
46
|
-
|
|
47
36
|
export function readSkillSourceStore(configPath) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
37
|
+
if (!existsSync(configPath))
|
|
38
|
+
return Object.freeze({ schemaVersion: STORE_SCHEMA_VERSION });
|
|
39
|
+
let parsed;
|
|
40
|
+
try {
|
|
41
|
+
parsed = JSON.parse(readFileSync(configPath, "utf8"));
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
throw new Error(`cannot read Odai skill source config ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
45
|
+
}
|
|
46
|
+
if (!isUnknownRecord(parsed))
|
|
47
|
+
throw new TypeError(`Odai skill source config ${configPath} must be an object`);
|
|
48
|
+
const unknownFields = Object.keys(parsed).filter((field) => !["schemaVersion", "source"].includes(field));
|
|
49
|
+
if (unknownFields.length > 0) {
|
|
50
|
+
throw new TypeError(`Odai skill source config ${configPath} has unknown fields: ${unknownFields.join(", ")}`);
|
|
51
|
+
}
|
|
52
|
+
if (parsed.schemaVersion !== STORE_SCHEMA_VERSION) {
|
|
53
|
+
throw new TypeError(`Odai skill source config ${configPath} has unsupported schemaVersion ${String(parsed.schemaVersion)}`);
|
|
54
|
+
}
|
|
55
|
+
if (!isSkillSourceMode(parsed.source)) {
|
|
56
|
+
throw new TypeError(`Odai skill source config ${configPath}.source must be bundled, auto, or user`);
|
|
57
|
+
}
|
|
58
|
+
return Object.freeze({ schemaVersion: STORE_SCHEMA_VERSION, source: parsed.source });
|
|
67
59
|
}
|
|
68
|
-
|
|
69
60
|
export function effectiveSkillSource(configPath, configuredSource) {
|
|
70
|
-
|
|
61
|
+
return readSkillSourceStore(configPath).source ?? configuredSource;
|
|
71
62
|
}
|
|
72
|
-
|
|
73
63
|
function writeSkillSourceStore(configPath, source) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
64
|
+
mkdirSync(dirname(configPath), { recursive: true, mode: 0o700 });
|
|
65
|
+
const temporary = `${configPath}.tmp-${process.pid}-${randomUUID()}`;
|
|
66
|
+
const value = `${JSON.stringify({ schemaVersion: STORE_SCHEMA_VERSION, source }, null, 2)}\n`;
|
|
67
|
+
try {
|
|
68
|
+
writeFileSync(temporary, value, { encoding: "utf8", mode: 0o600, flag: "wx" });
|
|
69
|
+
renameSync(temporary, configPath);
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
rmSync(temporary, { force: true });
|
|
73
|
+
}
|
|
83
74
|
}
|
|
84
|
-
|
|
85
75
|
function acquireStoreLock(configPath) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
create();
|
|
95
|
-
} catch (error) {
|
|
96
|
-
if (error?.code !== "EEXIST") throw error;
|
|
97
|
-
let stale = false;
|
|
76
|
+
mkdirSync(dirname(configPath), { recursive: true, mode: 0o700 });
|
|
77
|
+
const lockPath = `${configPath}.lock`;
|
|
78
|
+
const create = () => writeFileSync(lockPath, `${process.pid}\n`, {
|
|
79
|
+
encoding: "utf8",
|
|
80
|
+
mode: 0o600,
|
|
81
|
+
flag: "wx",
|
|
82
|
+
});
|
|
98
83
|
try {
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
create();
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
if (errorCode(error) !== "EEXIST")
|
|
88
|
+
throw error;
|
|
89
|
+
let stale = false;
|
|
90
|
+
try {
|
|
91
|
+
stale = Date.now() - statSync(lockPath).mtimeMs > 30_000;
|
|
92
|
+
}
|
|
93
|
+
catch { }
|
|
94
|
+
if (!stale)
|
|
95
|
+
throw new Error("Odai skill source configuration is being updated; retry the tool call");
|
|
96
|
+
rmSync(lockPath, { force: true });
|
|
97
|
+
create();
|
|
98
|
+
}
|
|
99
|
+
return () => rmSync(lockPath, { force: true });
|
|
106
100
|
}
|
|
107
|
-
|
|
108
101
|
function preserveInvalidStore(configPath) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
if (!existsSync(configPath))
|
|
103
|
+
return false;
|
|
104
|
+
renameSync(configPath, `${configPath}.invalid-${Date.now()}-${randomUUID()}`);
|
|
105
|
+
return true;
|
|
112
106
|
}
|
|
113
|
-
|
|
114
107
|
function resultFor(configPath, action, source, configuredSource, recoveredInvalidStore = false, explicitPath = false) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
108
|
+
return {
|
|
109
|
+
action,
|
|
110
|
+
configPath,
|
|
111
|
+
source,
|
|
112
|
+
effectiveSource: explicitPath ? "path" : source,
|
|
113
|
+
configuredSource,
|
|
114
|
+
requiresNextTurn: action !== "show",
|
|
115
|
+
...(explicitPath ? { hostOverride: true } : {}),
|
|
116
|
+
...(recoveredInvalidStore ? { recoveredInvalidStore: true } : {}),
|
|
117
|
+
};
|
|
125
118
|
}
|
|
126
|
-
|
|
127
119
|
export function createSkillSourceConfigTool(configPath, configuredSource, options = {}) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
120
|
+
const onConfigured = typeof options.onConfigured === "function" ? options.onConfigured : () => { };
|
|
121
|
+
const explicitPath = options.explicitPath === true;
|
|
122
|
+
return {
|
|
123
|
+
name: "odai_skill_source_config",
|
|
124
|
+
description: [
|
|
125
|
+
"Inspect, set, or reset how the Odai DSH Agent and Plugin select their governance skill bundle.",
|
|
126
|
+
"Use only when the user naturally asks about this source or explicitly chooses bundled, auto, or user.",
|
|
127
|
+
"Never enable project/user overrides by inference. The persisted setting is shared by Agent and Plugin and applies from the next user turn.",
|
|
128
|
+
].join(" "),
|
|
129
|
+
parameters: {
|
|
130
|
+
type: "object",
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
required: ["action"],
|
|
133
|
+
properties: {
|
|
134
|
+
action: {
|
|
135
|
+
type: "string",
|
|
136
|
+
enum: ["show", "set", "remove"],
|
|
137
|
+
description: "Show the effective source, set a user-selected source, or remove the persisted override.",
|
|
138
|
+
},
|
|
139
|
+
source: {
|
|
140
|
+
type: "string",
|
|
141
|
+
enum: [...SKILL_SOURCE_MODES],
|
|
142
|
+
description: "Required only for set; bundled, auto, or user must be explicitly chosen by the user.",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
146
145
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
output: {
|
|
147
|
+
schema: {
|
|
148
|
+
type: "object",
|
|
149
|
+
additionalProperties: false,
|
|
150
|
+
required: ["action", "configPath", "source", "effectiveSource", "configuredSource", "requiresNextTurn"],
|
|
151
|
+
properties: {
|
|
152
|
+
action: { type: "string", enum: ["show", "set", "remove"] },
|
|
153
|
+
configPath: { type: "string" },
|
|
154
|
+
source: { type: "string", enum: [...SKILL_SOURCE_MODES] },
|
|
155
|
+
effectiveSource: { type: "string", enum: [...SKILL_SOURCE_MODES, "path"] },
|
|
156
|
+
configuredSource: { type: "string", enum: [...SKILL_SOURCE_MODES] },
|
|
157
|
+
requiresNextTurn: { type: "boolean" },
|
|
158
|
+
hostOverride: { type: "boolean" },
|
|
159
|
+
recoveredInvalidStore: { type: "boolean" },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
render(_arguments, value) {
|
|
163
|
+
return [{
|
|
164
|
+
type: "text",
|
|
165
|
+
text: [
|
|
166
|
+
`${value.action === "show" ? "Current" : "Updated"} Odai skill source: ${value.effectiveSource}.`,
|
|
167
|
+
...(value.hostOverride ? [` The stored ${value.source} choice is inactive while an explicit host skill path is configured.`] : []),
|
|
168
|
+
...(value.recoveredInvalidStore ? [" An invalid prior store was preserved and replaced."] : []),
|
|
169
|
+
...(value.requiresNextTurn ? [" The change applies from the next user turn."] : []),
|
|
170
|
+
].join(""),
|
|
171
|
+
}];
|
|
172
|
+
},
|
|
151
173
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
174
|
+
execute(arguments_, execution) {
|
|
175
|
+
if (!execution.agent)
|
|
176
|
+
throw new Error("odai_skill_source_config requires an owning agent session");
|
|
177
|
+
const header = execution.agent.session?.header;
|
|
178
|
+
if (header?.origin === "subagent" || (Number.isSafeInteger(header?.delegationDepth) && (header?.delegationDepth ?? 0) > 0)) {
|
|
179
|
+
throw new Error("child agents may not change Odai skill source configuration");
|
|
180
|
+
}
|
|
181
|
+
if (!isUnknownRecord(arguments_))
|
|
182
|
+
throw new TypeError("arguments must be an object");
|
|
183
|
+
const unknownFields = Object.keys(arguments_).filter((field) => !["action", "source"].includes(field));
|
|
184
|
+
if (unknownFields.length > 0)
|
|
185
|
+
throw new TypeError(`unknown arguments: ${unknownFields.join(", ")}`);
|
|
186
|
+
const action = arguments_.action;
|
|
187
|
+
if (action !== "show" && action !== "set" && action !== "remove")
|
|
188
|
+
throw new TypeError("action must be show, set, or remove");
|
|
189
|
+
if (action === "show") {
|
|
190
|
+
if (arguments_.source !== undefined)
|
|
191
|
+
throw new TypeError("source must be omitted for show");
|
|
192
|
+
return Promise.resolve(resultFor(configPath, "show", effectiveSkillSource(configPath, configuredSource), configuredSource, false, explicitPath));
|
|
193
|
+
}
|
|
194
|
+
if (action === "set" && !isSkillSourceMode(arguments_.source)) {
|
|
195
|
+
throw new TypeError("source must be bundled, auto, or user for set");
|
|
196
|
+
}
|
|
197
|
+
if (action === "remove" && arguments_.source !== undefined) {
|
|
198
|
+
throw new TypeError("source must be omitted for remove");
|
|
199
|
+
}
|
|
200
|
+
const releaseLock = acquireStoreLock(configPath);
|
|
201
|
+
try {
|
|
202
|
+
let recoveredInvalidStore = false;
|
|
203
|
+
try {
|
|
204
|
+
readSkillSourceStore(configPath);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
recoveredInvalidStore = preserveInvalidStore(configPath);
|
|
208
|
+
}
|
|
209
|
+
const source = action === "set" && isSkillSourceMode(arguments_.source)
|
|
210
|
+
? arguments_.source
|
|
211
|
+
: configuredSource;
|
|
212
|
+
if (action === "set")
|
|
213
|
+
writeSkillSourceStore(configPath, source);
|
|
214
|
+
else
|
|
215
|
+
rmSync(configPath, { force: true });
|
|
216
|
+
onConfigured(execution.agent, {
|
|
217
|
+
action,
|
|
218
|
+
source,
|
|
219
|
+
...(recoveredInvalidStore ? { recoveredInvalidStore: true } : {}),
|
|
220
|
+
});
|
|
221
|
+
return Promise.resolve(resultFor(configPath, action, source, configuredSource, recoveredInvalidStore, explicitPath));
|
|
222
|
+
}
|
|
223
|
+
finally {
|
|
224
|
+
releaseLock();
|
|
225
|
+
}
|
|
168
226
|
},
|
|
169
|
-
|
|
170
|
-
render(_args, value) {
|
|
171
|
-
return [{
|
|
172
|
-
type: "text",
|
|
173
|
-
text: [
|
|
174
|
-
`${value.action === "show" ? "Current" : "Updated"} Odai skill source: ${value.effectiveSource}.`,
|
|
175
|
-
...(value.hostOverride ? [` The stored ${value.source} choice is inactive while an explicit host skill path is configured.`] : []),
|
|
176
|
-
...(value.recoveredInvalidStore ? [" An invalid prior store was preserved and replaced."] : []),
|
|
177
|
-
...(value.requiresNextTurn ? [" The change applies from the next user turn."] : []),
|
|
178
|
-
].join(""),
|
|
179
|
-
}];
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
execute(args, execution) {
|
|
183
|
-
if (!execution.agent) throw new Error("odai_skill_source_config requires an owning agent session");
|
|
184
|
-
const header = execution.agent.session?.header;
|
|
185
|
-
if (header?.origin === "subagent" || (Number.isSafeInteger(header?.delegationDepth) && header.delegationDepth > 0)) {
|
|
186
|
-
throw new Error("child agents may not change Odai skill source configuration");
|
|
187
|
-
}
|
|
188
|
-
if (!args || typeof args !== "object" || Array.isArray(args)) throw new TypeError("arguments must be an object");
|
|
189
|
-
const unknown = Object.keys(args).filter((field) => !["action", "source"].includes(field));
|
|
190
|
-
if (unknown.length > 0) throw new TypeError(`unknown arguments: ${unknown.join(", ")}`);
|
|
191
|
-
if (!["show", "set", "remove"].includes(args.action)) throw new TypeError("action must be show, set, or remove");
|
|
192
|
-
if (args.action === "show") {
|
|
193
|
-
if (args.source !== undefined) throw new TypeError("source must be omitted for show");
|
|
194
|
-
return Promise.resolve(resultFor(
|
|
195
|
-
configPath,
|
|
196
|
-
"show",
|
|
197
|
-
effectiveSkillSource(configPath, configuredSource),
|
|
198
|
-
configuredSource,
|
|
199
|
-
false,
|
|
200
|
-
explicitPath,
|
|
201
|
-
));
|
|
202
|
-
}
|
|
203
|
-
if (args.action === "set" && !SKILL_SOURCE_MODES.includes(args.source)) {
|
|
204
|
-
throw new TypeError("source must be bundled, auto, or user for set");
|
|
205
|
-
}
|
|
206
|
-
if (args.action === "remove" && args.source !== undefined) {
|
|
207
|
-
throw new TypeError("source must be omitted for remove");
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const releaseLock = acquireStoreLock(configPath);
|
|
211
|
-
try {
|
|
212
|
-
let recoveredInvalidStore = false;
|
|
213
|
-
try {
|
|
214
|
-
readSkillSourceStore(configPath);
|
|
215
|
-
} catch {
|
|
216
|
-
recoveredInvalidStore = preserveInvalidStore(configPath);
|
|
217
|
-
}
|
|
218
|
-
if (args.action === "set") writeSkillSourceStore(configPath, args.source);
|
|
219
|
-
else rmSync(configPath, { force: true });
|
|
220
|
-
const source = args.action === "set" ? args.source : configuredSource;
|
|
221
|
-
onConfigured(execution.agent, {
|
|
222
|
-
action: args.action,
|
|
223
|
-
source,
|
|
224
|
-
...(recoveredInvalidStore ? { recoveredInvalidStore: true } : {}),
|
|
225
|
-
});
|
|
226
|
-
return Promise.resolve(resultFor(
|
|
227
|
-
configPath,
|
|
228
|
-
args.action,
|
|
229
|
-
source,
|
|
230
|
-
configuredSource,
|
|
231
|
-
recoveredInvalidStore,
|
|
232
|
-
explicitPath,
|
|
233
|
-
));
|
|
234
|
-
} finally {
|
|
235
|
-
releaseLock();
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
};
|
|
227
|
+
};
|
|
239
228
|
}
|
|
229
|
+
//# sourceMappingURL=skill-source-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-source-config.mj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