@aerovato/operator-helper 1.7.1 → 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 +150 -14
- 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",
|
|
@@ -15893,6 +15893,9 @@ operator-helper install pi
|
|
|
15893
15893
|
|
|
15894
15894
|
# Install DeepSeek Harness plugin
|
|
15895
15895
|
operator-helper install deepseek
|
|
15896
|
+
|
|
15897
|
+
# Install Kiro adapter
|
|
15898
|
+
operator-helper install kiro
|
|
15896
15899
|
\`\`\`
|
|
15897
15900
|
`;
|
|
15898
15901
|
|
|
@@ -16674,6 +16677,136 @@ function profileResult(profile, result) {
|
|
|
16674
16677
|
return { exitCode: 0, output: `✓ ${label}: ${result.output || "Plugin installed"}` };
|
|
16675
16678
|
}
|
|
16676
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
|
+
|
|
16677
16810
|
// src/commands/install/opencode.ts
|
|
16678
16811
|
var OPENCODE_PLUGIN = "@aerovato/operator-opencode@latest";
|
|
16679
16812
|
var installOpenCode = fn2("installOpenCode")(function* (context) {
|
|
@@ -16730,7 +16863,7 @@ var installPi = fn2("installPi")(function* (context) {
|
|
|
16730
16863
|
import { resolve as resolve2 } from "node:path";
|
|
16731
16864
|
|
|
16732
16865
|
// ../core/src/memory/project.ts
|
|
16733
|
-
import { extname, join as
|
|
16866
|
+
import { extname, join as join4, relative, sep } from "node:path";
|
|
16734
16867
|
|
|
16735
16868
|
// ../core/src/utils.ts
|
|
16736
16869
|
function success(value) {
|
|
@@ -16844,13 +16977,13 @@ async function loadProjectPartition(root, loadFiles) {
|
|
|
16844
16977
|
return hasNodeErrorCode(directory.error.cause, "ENOENT") ? success(loadFiles ? { exists: false, operatorInstructions: null, catalog: null, indexes: [] } : { exists: false }) : directory;
|
|
16845
16978
|
}
|
|
16846
16979
|
if (!loadFiles) {
|
|
16847
|
-
for (const path of [
|
|
16980
|
+
for (const path of [join4(root, "operator.md"), join4(root, "catalog.md")]) {
|
|
16848
16981
|
const file = await checkOptionalReadableFile(path);
|
|
16849
16982
|
if (!file.ok) {
|
|
16850
16983
|
return file;
|
|
16851
16984
|
}
|
|
16852
16985
|
}
|
|
16853
|
-
const indexRoot =
|
|
16986
|
+
const indexRoot = join4(root, "index");
|
|
16854
16987
|
const indexPaths = await listMarkdownFiles(indexRoot, indexRoot);
|
|
16855
16988
|
if (!indexPaths.ok) {
|
|
16856
16989
|
return indexPaths;
|
|
@@ -16863,15 +16996,15 @@ async function loadProjectPartition(root, loadFiles) {
|
|
|
16863
16996
|
}
|
|
16864
16997
|
return success({ exists: true });
|
|
16865
16998
|
}
|
|
16866
|
-
const operatorInstructions = await readOptionalContent(
|
|
16999
|
+
const operatorInstructions = await readOptionalContent(join4(root, "operator.md"));
|
|
16867
17000
|
if (!operatorInstructions.ok) {
|
|
16868
17001
|
return operatorInstructions;
|
|
16869
17002
|
}
|
|
16870
|
-
const catalog = await readOptionalContent(
|
|
17003
|
+
const catalog = await readOptionalContent(join4(root, "catalog.md"));
|
|
16871
17004
|
if (!catalog.ok) {
|
|
16872
17005
|
return catalog;
|
|
16873
17006
|
}
|
|
16874
|
-
const indexes = await readIndexes(
|
|
17007
|
+
const indexes = await readIndexes(join4(root, "index"));
|
|
16875
17008
|
if (!indexes.ok) {
|
|
16876
17009
|
return indexes;
|
|
16877
17010
|
}
|
|
@@ -16909,7 +17042,7 @@ async function listMarkdownFiles(root, directory) {
|
|
|
16909
17042
|
}
|
|
16910
17043
|
const paths = [];
|
|
16911
17044
|
for (const entry of entries.value) {
|
|
16912
|
-
const path =
|
|
17045
|
+
const path = join4(directory, entry.name);
|
|
16913
17046
|
if (entry.isDirectory()) {
|
|
16914
17047
|
const nestedPaths = await listMarkdownFiles(root, path);
|
|
16915
17048
|
if (!nestedPaths.ok) {
|
|
@@ -16930,14 +17063,14 @@ function compareStrings2(left, right) {
|
|
|
16930
17063
|
}
|
|
16931
17064
|
|
|
16932
17065
|
// ../core/src/memory/user.ts
|
|
16933
|
-
import { join as
|
|
17066
|
+
import { join as join5 } from "node:path";
|
|
16934
17067
|
async function loadUserPartition(root, loadFiles) {
|
|
16935
17068
|
if (!loadFiles) {
|
|
16936
17069
|
const directory = await readDirectory2(root);
|
|
16937
17070
|
if (!directory.ok) {
|
|
16938
17071
|
return hasNodeErrorCode(directory.error.cause, "ENOENT") ? success({ exists: false }) : directory;
|
|
16939
17072
|
}
|
|
16940
|
-
for (const path of [
|
|
17073
|
+
for (const path of [join5(root, "operator.md"), join5(root, "catalog.md")]) {
|
|
16941
17074
|
const file = await checkOptionalReadableFile(path);
|
|
16942
17075
|
if (!file.ok) {
|
|
16943
17076
|
return file;
|
|
@@ -16945,11 +17078,11 @@ async function loadUserPartition(root, loadFiles) {
|
|
|
16945
17078
|
}
|
|
16946
17079
|
return success({ exists: true });
|
|
16947
17080
|
}
|
|
16948
|
-
const operatorInstructions = await readOptionalContent(
|
|
17081
|
+
const operatorInstructions = await readOptionalContent(join5(root, "operator.md"));
|
|
16949
17082
|
if (!operatorInstructions.ok) {
|
|
16950
17083
|
return operatorInstructions;
|
|
16951
17084
|
}
|
|
16952
|
-
const catalog = await readOptionalContent(
|
|
17085
|
+
const catalog = await readOptionalContent(join5(root, "catalog.md"));
|
|
16953
17086
|
if (!catalog.ok) {
|
|
16954
17087
|
return catalog;
|
|
16955
17088
|
}
|
|
@@ -17908,7 +18041,8 @@ ${renderTable([
|
|
|
17908
18041
|
["install opencode-v2", "Install or update the OpenCode V2 plugin"],
|
|
17909
18042
|
["install deepseek", "Install or update the DeepSeek Harness plugin"],
|
|
17910
18043
|
["install pi", "Install or update the Pi plugin"],
|
|
17911
|
-
["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"]
|
|
17912
18046
|
])}
|
|
17913
18047
|
|
|
17914
18048
|
AGENT COMMANDS
|
|
@@ -17969,6 +18103,8 @@ function runCli(arguments_, context) {
|
|
|
17969
18103
|
return yield* installDeepSeek(context);
|
|
17970
18104
|
case "install pi":
|
|
17971
18105
|
return yield* installPi(context);
|
|
18106
|
+
case "install kiro":
|
|
18107
|
+
return yield* installKiro(context);
|
|
17972
18108
|
case "user guide":
|
|
17973
18109
|
case "project guide":
|
|
17974
18110
|
case "index guide":
|
|
@@ -18007,4 +18143,4 @@ var main = gen2(function* () {
|
|
|
18007
18143
|
}).pipe(provide4(LiveLayers));
|
|
18008
18144
|
runMain2(main);
|
|
18009
18145
|
|
|
18010
|
-
//# debugId=
|
|
18146
|
+
//# debugId=5B7C579F2928C78764756E2164756E21
|