akm-cli 0.9.1-beta.1 → 0.9.1-beta.2
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/CHANGELOG.md +18 -1
- package/dist/cli/parse-args.js +7 -1
- package/dist/commands/env/child-env.js +14 -0
- package/dist/commands/improve/eval-cases.js +2 -0
- package/dist/commands/improve/memory/memory-improve.js +1 -0
- package/dist/commands/lint/index.js +5 -1
- package/dist/commands/sources/add-cli.js +8 -2
- package/dist/commands/sources/migration-help.js +12 -3
- package/dist/commands/sources/self-update.js +9 -1
- package/dist/core/adapter/adapters/agent-skills-adapter.js +32 -16
- package/dist/core/adapter/adapters/akm-lint.js +6 -2
- package/dist/core/adapter/adapters/akm-task-adapter.js +4 -2
- package/dist/core/adapter/adapters/dotenv-adapter.js +21 -0
- package/dist/core/asset/frontmatter.js +6 -1
- package/dist/core/common.js +81 -3
- package/dist/core/config/config-io.js +5 -45
- package/dist/core/config/schema/engines.js +14 -3
- package/dist/core/extra-params.js +11 -0
- package/dist/core/fs-txn.js +15 -2
- package/dist/core/json-schema.js +19 -2
- package/dist/core/paths.js +16 -2
- package/dist/core/redaction.js +22 -1
- package/dist/core/state-db.js +1 -0
- package/dist/core/write-source.js +26 -2
- package/dist/indexer/indexer.js +31 -6
- package/dist/indexer/search/db-search.js +17 -2
- package/dist/indexer/walk/walker.js +6 -1
- package/dist/integrations/agent/detect.js +13 -1
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +21 -0
- package/dist/integrations/lockfile.js +10 -0
- package/dist/llm/client.js +14 -19
- package/dist/llm/embedder.js +23 -3
- package/dist/llm/embedders/remote.js +27 -2
- package/dist/output/html-render.js +40 -1
- package/dist/runtime.js +23 -1
- package/dist/scripts/akm-migrate-node.js +303 -107
- package/dist/scripts/akm-migrate.js +303 -107
- package/dist/setup/setup.js +22 -7
- package/dist/sources/providers/git-install.js +25 -2
- package/dist/sources/snapshot-fetchers/content-extract.js +63 -1
- package/dist/storage/database.js +71 -12
- package/dist/storage/engines/sqlite-migrations.js +61 -2
- package/dist/storage/repositories/index-connection.js +11 -1
- package/dist/storage/repositories/index-meta-repository.js +11 -0
- package/dist/storage/repositories/index-schema.js +17 -2
- package/dist/storage/repositories/index-vec-repository.js +43 -5
- package/dist/storage/sqlite-pragmas.js +12 -1
- package/dist/tasks/runner.js +84 -7
- package/dist/tasks/scheduler-invocation.js +19 -0
- package/dist/tasks/schema.js +21 -1
- package/dist/text-import-hook.mjs +1 -1
- package/dist/workflows/exec/native-executor.js +8 -0
- package/dist/workflows/exec/step-work.js +10 -2
- package/dist/workflows/parser.js +26 -1
- package/package.json +1 -1
- package/schemas/akm-config.json +10 -5
- package/schemas/akm-workflow.json +7 -3
package/dist/runtime.js
CHANGED
|
@@ -78,8 +78,17 @@ function nodeSpawnAdapter(cmd, options) {
|
|
|
78
78
|
detached: options.detached,
|
|
79
79
|
stdio: [stdioFor(options.stdin), stdioFor(options.stdout), stdioFor(options.stderr)],
|
|
80
80
|
});
|
|
81
|
+
// Node's 'exit' fires (null, signal) when the child dies from a signal.
|
|
82
|
+
// Resolving `code ?? 0` reported that as SUCCESS, so an OOM-killed or
|
|
83
|
+
// segfaulted child came back exit 0 with partial stdout. Bun resolves
|
|
84
|
+
// 128 + signum for the same case; match it so both runtimes agree and
|
|
85
|
+
// callers that only check `exitCode !== 0` classify signal deaths correctly.
|
|
86
|
+
let signalCode = null;
|
|
81
87
|
const exited = new Promise((resolve, reject) => {
|
|
82
|
-
child.once("exit", (code) =>
|
|
88
|
+
child.once("exit", (code, signal) => {
|
|
89
|
+
signalCode = signal;
|
|
90
|
+
resolve(code ?? (signal ? 128 + signalNumber(signal) : 0));
|
|
91
|
+
});
|
|
83
92
|
child.once("error", reject);
|
|
84
93
|
});
|
|
85
94
|
return {
|
|
@@ -96,12 +105,25 @@ function nodeSpawnAdapter(cmd, options) {
|
|
|
96
105
|
get exitCode() {
|
|
97
106
|
return child.exitCode;
|
|
98
107
|
},
|
|
108
|
+
get signalCode() {
|
|
109
|
+
return signalCode ?? child.signalCode;
|
|
110
|
+
},
|
|
99
111
|
pid: child.pid,
|
|
100
112
|
kill(signal) {
|
|
101
113
|
child.kill(signal);
|
|
102
114
|
},
|
|
103
115
|
};
|
|
104
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Map a signal name to its number so a signal death can be reported as the
|
|
119
|
+
* conventional 128 + signum exit status. Falls back to SIGKILL's 9 for a name
|
|
120
|
+
* this platform does not define, which still yields a non-zero status — the
|
|
121
|
+
* property that matters for classifying the run as failed.
|
|
122
|
+
*/
|
|
123
|
+
function signalNumber(signal) {
|
|
124
|
+
const { constants } = nodeRequire("node:os");
|
|
125
|
+
return constants.signals[signal] ?? 9;
|
|
126
|
+
}
|
|
105
127
|
// `node:stream`'s Writable.toWeb is available on Node >=17; referenced via the
|
|
106
128
|
// class to avoid a static import that Bun's typings may not expose.
|
|
107
129
|
function Writable_toWeb(w) {
|