@aerovato/operator-helper 1.7.0 → 1.8.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/README.md +5 -1
- package/dist/index.js +157 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,6 +32,9 @@ operator-helper install pi
|
|
|
32
32
|
|
|
33
33
|
# DeepSeek Harness
|
|
34
34
|
operator-helper install deepseek
|
|
35
|
+
|
|
36
|
+
# Kiro
|
|
37
|
+
operator-helper install kiro
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
Restart the harness, then run `/operator:user-init` in a new conversation to begin setup.
|
|
@@ -49,6 +52,7 @@ operator-helper install opencode
|
|
|
49
52
|
operator-helper install opencode-v2
|
|
50
53
|
operator-helper install pi
|
|
51
54
|
operator-helper install deepseek
|
|
55
|
+
operator-helper install kiro
|
|
52
56
|
```
|
|
53
57
|
|
|
54
58
|
Operator Helper automatically checks for and installs updates when commands run. If it cannot determine whether Bun or npm owns the global installation, it asks for a manual update using the original installation method.
|
|
@@ -56,7 +60,7 @@ Operator Helper automatically checks for and installs updates when commands run.
|
|
|
56
60
|
## Documentation
|
|
57
61
|
|
|
58
62
|
- [Overview and setup](https://github.com/aerovato/operator-memory#readme)
|
|
59
|
-
- [
|
|
63
|
+
- [Getting Started](https://github.com/aerovato/operator-memory/blob/main/docs/getting-started.md)
|
|
60
64
|
- [Architecture](https://github.com/aerovato/operator-memory/blob/main/docs/architecture.md)
|
|
61
65
|
- [Troubleshooting](https://github.com/aerovato/operator-memory/blob/main/docs/troubleshooting.md)
|
|
62
66
|
|
package/dist/index.js
CHANGED
|
@@ -15319,7 +15319,7 @@ var log = (...args) => consoleWith((console2) => sync(() => {
|
|
|
15319
15319
|
// package.json
|
|
15320
15320
|
var package_default = {
|
|
15321
15321
|
name: "@aerovato/operator-helper",
|
|
15322
|
-
version: "1.
|
|
15322
|
+
version: "1.8.0",
|
|
15323
15323
|
description: "Installation and setup CLI for Operator Memory",
|
|
15324
15324
|
license: "BSD-3-Clause",
|
|
15325
15325
|
author: "Aerovato Research",
|
|
@@ -15876,20 +15876,26 @@ npm install --global @aerovato/operator-helper
|
|
|
15876
15876
|
# With Bun
|
|
15877
15877
|
bun add --global --minimum-release-age 0 @aerovato/operator-helper@latest
|
|
15878
15878
|
|
|
15879
|
-
# Install
|
|
15880
|
-
operator-helper install
|
|
15879
|
+
# Install Claude Code plugin
|
|
15880
|
+
operator-helper install claude-code
|
|
15881
|
+
|
|
15882
|
+
# Install Codex plugin
|
|
15883
|
+
operator-helper install codex
|
|
15881
15884
|
|
|
15882
15885
|
# Install OpenCode V2 plugin
|
|
15883
15886
|
operator-helper install opencode-v2
|
|
15884
15887
|
|
|
15885
|
-
# Install
|
|
15886
|
-
operator-helper install
|
|
15888
|
+
# Install OpenCode plugin
|
|
15889
|
+
operator-helper install opencode
|
|
15887
15890
|
|
|
15888
15891
|
# Install Pi plugin
|
|
15889
15892
|
operator-helper install pi
|
|
15890
15893
|
|
|
15891
15894
|
# Install DeepSeek Harness plugin
|
|
15892
15895
|
operator-helper install deepseek
|
|
15896
|
+
|
|
15897
|
+
# Install Kiro adapter
|
|
15898
|
+
operator-helper install kiro
|
|
15893
15899
|
\`\`\`
|
|
15894
15900
|
`;
|
|
15895
15901
|
|
|
@@ -16671,6 +16677,136 @@ function profileResult(profile, result) {
|
|
|
16671
16677
|
return { exitCode: 0, output: `✓ ${label}: ${result.output || "Plugin installed"}` };
|
|
16672
16678
|
}
|
|
16673
16679
|
|
|
16680
|
+
// src/commands/install/kiro.ts
|
|
16681
|
+
import { mkdir as mkdir3, writeFile as writeFile4 } from "node:fs/promises";
|
|
16682
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
16683
|
+
|
|
16684
|
+
// src/templates/kiro.ts
|
|
16685
|
+
var HOOK = `${JSON.stringify({
|
|
16686
|
+
version: "v1",
|
|
16687
|
+
hooks: [
|
|
16688
|
+
{
|
|
16689
|
+
name: "Operator Memory preamble",
|
|
16690
|
+
trigger: "SessionStart",
|
|
16691
|
+
action: { type: "command", command: "operator-helper preamble" },
|
|
16692
|
+
timeout: 120,
|
|
16693
|
+
enabled: true
|
|
16694
|
+
}
|
|
16695
|
+
]
|
|
16696
|
+
}, null, 2)}
|
|
16697
|
+
`;
|
|
16698
|
+
var STEERING = `---
|
|
16699
|
+
inclusion: always
|
|
16700
|
+
---
|
|
16701
|
+
|
|
16702
|
+
# Operator Memory
|
|
16703
|
+
|
|
16704
|
+
Operator Memory is installed for Kiro. If you do not see Operator's preamble guidance above wrapped within \`<operator-guidance>\`, manually run the \`operator-helper preamble\` command once from the workspace root and follow all instructions from the command output. If the command fails, report to the user and stop. Do not run if the preamble is already available.
|
|
16705
|
+
`;
|
|
16706
|
+
var RECOVERY = (command) => `## Recovery
|
|
16707
|
+
|
|
16708
|
+
- If Helper cannot start, install or repair the npm package \`@aerovato/operator-helper\` globally and retry the failed command.
|
|
16709
|
+
- If the version check or upgrade fails, diagnose the error and retry.
|
|
16710
|
+
- If \`operator-helper ${command}\` reports a failure, use its output to resolve it and rerun it as needed.
|
|
16711
|
+
- If you cannot resolve a problem, report the blocker.
|
|
16712
|
+
|
|
16713
|
+
Use Helper output as working context. Do not reproduce it wholesale or reimplement Helper logic.
|
|
16714
|
+
`;
|
|
16715
|
+
var USER_INIT = `---
|
|
16716
|
+
name: operator-user-init
|
|
16717
|
+
description: Initialize and configure the Operator User Partition. Use only when the user invokes /operator-user-init.
|
|
16718
|
+
---
|
|
16719
|
+
|
|
16720
|
+
# Operator User Setup
|
|
16721
|
+
|
|
16722
|
+
1. Run \`operator-helper version\`. If an update is available, run \`operator-helper upgrade\` before continuing.
|
|
16723
|
+
2. Run \`operator-helper user init\` and follow the emitted User Setup guide, including when initialization reports failures.
|
|
16724
|
+
|
|
16725
|
+
${RECOVERY("user init")}`;
|
|
16726
|
+
var PROJECT_INIT = `---
|
|
16727
|
+
name: operator-project-init
|
|
16728
|
+
description: Initialize and configure the Operator Project Brain. Use only when the user invokes /operator-project-init.
|
|
16729
|
+
---
|
|
16730
|
+
|
|
16731
|
+
# Operator Project Setup
|
|
16732
|
+
|
|
16733
|
+
1. Run \`operator-helper version\`. If an update is available, run \`operator-helper upgrade\` before continuing.
|
|
16734
|
+
2. Run \`operator-helper project init\` and follow the emitted Project Setup guide, including when initialization reports failures.
|
|
16735
|
+
|
|
16736
|
+
For a new conversation to set up the Project Index, tell the user to invoke \`/operator-index\`.
|
|
16737
|
+
|
|
16738
|
+
${RECOVERY("project init")}`;
|
|
16739
|
+
var INDEX = `---
|
|
16740
|
+
name: operator-index
|
|
16741
|
+
description: Build or refresh the Operator Project Index. Use only when the user invokes /operator-index.
|
|
16742
|
+
---
|
|
16743
|
+
|
|
16744
|
+
# Operator Project Index Setup
|
|
16745
|
+
|
|
16746
|
+
1. Run \`operator-helper version\`. If an update is available, run \`operator-helper upgrade\` before continuing.
|
|
16747
|
+
2. Run \`operator-helper index init\` and follow the emitted Project Index Setup guide, including when inspection reports failures.
|
|
16748
|
+
|
|
16749
|
+
If the Project Brain is missing, tell the user to invoke \`/operator-project-init\` to set it up.
|
|
16750
|
+
|
|
16751
|
+
${RECOVERY("index init")}`;
|
|
16752
|
+
var REPAIR = `---
|
|
16753
|
+
name: operator-repair
|
|
16754
|
+
description: Diagnose and repair Operator memory load failures. Use only when the user invokes /operator-repair.
|
|
16755
|
+
---
|
|
16756
|
+
|
|
16757
|
+
# Operator Memory Repair
|
|
16758
|
+
|
|
16759
|
+
1. Run \`operator-helper version\`. If an update is available, run \`operator-helper upgrade\` before continuing.
|
|
16760
|
+
2. Run \`operator-helper memory check\`. If no issues are detected, stop. Otherwise, repair only the reported load failures without initializing absent partitions. Rerun \`operator-helper memory check\` to confirm the repair, then read the applicable Operator memory documents.
|
|
16761
|
+
|
|
16762
|
+
If \`~/.kiro/hooks/operator-memory.json\` or \`~/.kiro/steering/operator-memory.md\` is missing, tell the user to run \`operator-helper install kiro\` and start a new session.
|
|
16763
|
+
|
|
16764
|
+
${RECOVERY("memory check")}`;
|
|
16765
|
+
var KIRO_FILES = [
|
|
16766
|
+
{ path: "hooks/operator-memory.json", content: HOOK },
|
|
16767
|
+
{ path: "steering/operator-memory.md", content: STEERING },
|
|
16768
|
+
{ path: "skills/operator-user-init/SKILL.md", content: USER_INIT },
|
|
16769
|
+
{ path: "skills/operator-project-init/SKILL.md", content: PROJECT_INIT },
|
|
16770
|
+
{ path: "skills/operator-index/SKILL.md", content: INDEX },
|
|
16771
|
+
{ path: "skills/operator-repair/SKILL.md", content: REPAIR }
|
|
16772
|
+
];
|
|
16773
|
+
|
|
16774
|
+
// src/commands/install/kiro.ts
|
|
16775
|
+
var installKiro = fn2("installKiro")(function* (context) {
|
|
16776
|
+
const helper = yield* runProcess("operator-helper", ["help"], context.cwd, null);
|
|
16777
|
+
if (!helper.ok) {
|
|
16778
|
+
return { exitCode: 1, output: `✗ Operator Helper must be available on PATH: ${helper.error}` };
|
|
16779
|
+
}
|
|
16780
|
+
if (helper.exitCode !== 0) {
|
|
16781
|
+
return {
|
|
16782
|
+
exitCode: helper.exitCode,
|
|
16783
|
+
output: helper.output || "Operator Helper must be available on PATH"
|
|
16784
|
+
};
|
|
16785
|
+
}
|
|
16786
|
+
return yield* writeKiroFiles(join3(context.home, ".kiro"));
|
|
16787
|
+
});
|
|
16788
|
+
function writeKiroFiles(kiroHome) {
|
|
16789
|
+
return promise2(async () => {
|
|
16790
|
+
try {
|
|
16791
|
+
for (const file of KIRO_FILES) {
|
|
16792
|
+
const path = join3(kiroHome, file.path);
|
|
16793
|
+
await mkdir3(dirname2(path), { recursive: true });
|
|
16794
|
+
await writeFile4(path, file.content);
|
|
16795
|
+
}
|
|
16796
|
+
} catch (error) {
|
|
16797
|
+
return {
|
|
16798
|
+
exitCode: 1,
|
|
16799
|
+
output: `✗ Could not install the Kiro adapter: ${getErrorMessage(error)}`
|
|
16800
|
+
};
|
|
16801
|
+
}
|
|
16802
|
+
return {
|
|
16803
|
+
exitCode: 0,
|
|
16804
|
+
output: `✓ Kiro adapter installed in ${kiroHome}
|
|
16805
|
+
Start a new Kiro session.`
|
|
16806
|
+
};
|
|
16807
|
+
});
|
|
16808
|
+
}
|
|
16809
|
+
|
|
16674
16810
|
// src/commands/install/opencode.ts
|
|
16675
16811
|
var OPENCODE_PLUGIN = "@aerovato/operator-opencode@latest";
|
|
16676
16812
|
var installOpenCode = fn2("installOpenCode")(function* (context) {
|
|
@@ -16727,7 +16863,7 @@ var installPi = fn2("installPi")(function* (context) {
|
|
|
16727
16863
|
import { resolve as resolve2 } from "node:path";
|
|
16728
16864
|
|
|
16729
16865
|
// ../core/src/memory/project.ts
|
|
16730
|
-
import { extname, join as
|
|
16866
|
+
import { extname, join as join4, relative, sep } from "node:path";
|
|
16731
16867
|
|
|
16732
16868
|
// ../core/src/utils.ts
|
|
16733
16869
|
function success(value) {
|
|
@@ -16841,13 +16977,13 @@ async function loadProjectPartition(root, loadFiles) {
|
|
|
16841
16977
|
return hasNodeErrorCode(directory.error.cause, "ENOENT") ? success(loadFiles ? { exists: false, operatorInstructions: null, catalog: null, indexes: [] } : { exists: false }) : directory;
|
|
16842
16978
|
}
|
|
16843
16979
|
if (!loadFiles) {
|
|
16844
|
-
for (const path of [
|
|
16980
|
+
for (const path of [join4(root, "operator.md"), join4(root, "catalog.md")]) {
|
|
16845
16981
|
const file = await checkOptionalReadableFile(path);
|
|
16846
16982
|
if (!file.ok) {
|
|
16847
16983
|
return file;
|
|
16848
16984
|
}
|
|
16849
16985
|
}
|
|
16850
|
-
const indexRoot =
|
|
16986
|
+
const indexRoot = join4(root, "index");
|
|
16851
16987
|
const indexPaths = await listMarkdownFiles(indexRoot, indexRoot);
|
|
16852
16988
|
if (!indexPaths.ok) {
|
|
16853
16989
|
return indexPaths;
|
|
@@ -16860,15 +16996,15 @@ async function loadProjectPartition(root, loadFiles) {
|
|
|
16860
16996
|
}
|
|
16861
16997
|
return success({ exists: true });
|
|
16862
16998
|
}
|
|
16863
|
-
const operatorInstructions = await readOptionalContent(
|
|
16999
|
+
const operatorInstructions = await readOptionalContent(join4(root, "operator.md"));
|
|
16864
17000
|
if (!operatorInstructions.ok) {
|
|
16865
17001
|
return operatorInstructions;
|
|
16866
17002
|
}
|
|
16867
|
-
const catalog = await readOptionalContent(
|
|
17003
|
+
const catalog = await readOptionalContent(join4(root, "catalog.md"));
|
|
16868
17004
|
if (!catalog.ok) {
|
|
16869
17005
|
return catalog;
|
|
16870
17006
|
}
|
|
16871
|
-
const indexes = await readIndexes(
|
|
17007
|
+
const indexes = await readIndexes(join4(root, "index"));
|
|
16872
17008
|
if (!indexes.ok) {
|
|
16873
17009
|
return indexes;
|
|
16874
17010
|
}
|
|
@@ -16906,7 +17042,7 @@ async function listMarkdownFiles(root, directory) {
|
|
|
16906
17042
|
}
|
|
16907
17043
|
const paths = [];
|
|
16908
17044
|
for (const entry of entries.value) {
|
|
16909
|
-
const path =
|
|
17045
|
+
const path = join4(directory, entry.name);
|
|
16910
17046
|
if (entry.isDirectory()) {
|
|
16911
17047
|
const nestedPaths = await listMarkdownFiles(root, path);
|
|
16912
17048
|
if (!nestedPaths.ok) {
|
|
@@ -16927,14 +17063,14 @@ function compareStrings2(left, right) {
|
|
|
16927
17063
|
}
|
|
16928
17064
|
|
|
16929
17065
|
// ../core/src/memory/user.ts
|
|
16930
|
-
import { join as
|
|
17066
|
+
import { join as join5 } from "node:path";
|
|
16931
17067
|
async function loadUserPartition(root, loadFiles) {
|
|
16932
17068
|
if (!loadFiles) {
|
|
16933
17069
|
const directory = await readDirectory2(root);
|
|
16934
17070
|
if (!directory.ok) {
|
|
16935
17071
|
return hasNodeErrorCode(directory.error.cause, "ENOENT") ? success({ exists: false }) : directory;
|
|
16936
17072
|
}
|
|
16937
|
-
for (const path of [
|
|
17073
|
+
for (const path of [join5(root, "operator.md"), join5(root, "catalog.md")]) {
|
|
16938
17074
|
const file = await checkOptionalReadableFile(path);
|
|
16939
17075
|
if (!file.ok) {
|
|
16940
17076
|
return file;
|
|
@@ -16942,11 +17078,11 @@ async function loadUserPartition(root, loadFiles) {
|
|
|
16942
17078
|
}
|
|
16943
17079
|
return success({ exists: true });
|
|
16944
17080
|
}
|
|
16945
|
-
const operatorInstructions = await readOptionalContent(
|
|
17081
|
+
const operatorInstructions = await readOptionalContent(join5(root, "operator.md"));
|
|
16946
17082
|
if (!operatorInstructions.ok) {
|
|
16947
17083
|
return operatorInstructions;
|
|
16948
17084
|
}
|
|
16949
|
-
const catalog = await readOptionalContent(
|
|
17085
|
+
const catalog = await readOptionalContent(join5(root, "catalog.md"));
|
|
16950
17086
|
if (!catalog.ok) {
|
|
16951
17087
|
return catalog;
|
|
16952
17088
|
}
|
|
@@ -17905,7 +18041,8 @@ ${renderTable([
|
|
|
17905
18041
|
["install opencode-v2", "Install or update the OpenCode V2 plugin"],
|
|
17906
18042
|
["install deepseek", "Install or update the DeepSeek Harness plugin"],
|
|
17907
18043
|
["install pi", "Install or update the Pi plugin"],
|
|
17908
|
-
["install claude-code", "Install or update the Claude Code plugin"]
|
|
18044
|
+
["install claude-code", "Install or update the Claude Code plugin"],
|
|
18045
|
+
["install kiro", "Install or update the Kiro adapter"]
|
|
17909
18046
|
])}
|
|
17910
18047
|
|
|
17911
18048
|
AGENT COMMANDS
|
|
@@ -17966,6 +18103,8 @@ function runCli(arguments_, context) {
|
|
|
17966
18103
|
return yield* installDeepSeek(context);
|
|
17967
18104
|
case "install pi":
|
|
17968
18105
|
return yield* installPi(context);
|
|
18106
|
+
case "install kiro":
|
|
18107
|
+
return yield* installKiro(context);
|
|
17969
18108
|
case "user guide":
|
|
17970
18109
|
case "project guide":
|
|
17971
18110
|
case "index guide":
|
|
@@ -18004,4 +18143,4 @@ var main = gen2(function* () {
|
|
|
18004
18143
|
}).pipe(provide4(LiveLayers));
|
|
18005
18144
|
runMain2(main);
|
|
18006
18145
|
|
|
18007
|
-
//# debugId=
|
|
18146
|
+
//# debugId=5B7C579F2928C78764756E2164756E21
|