@kody-ade/kody-engine 0.4.522 → 0.4.524
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/bin/kody.js +22 -8
- package/package.json +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@kody-ade/kody-engine",
|
|
18
|
-
version: "0.4.
|
|
18
|
+
version: "0.4.524",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -2697,6 +2697,7 @@ function requireTenant(tenantId2) {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
function requireChatTenant(tenantId2) {
|
|
2699
2699
|
const value = tenantId2.trim();
|
|
2700
|
+
if (/^user:\d+$/.test(value)) return value;
|
|
2700
2701
|
return value === "global" ? value : requireTenant(value);
|
|
2701
2702
|
}
|
|
2702
2703
|
function requireNonEmpty(value, name) {
|
|
@@ -13760,9 +13761,7 @@ function dueSlot(loop, now) {
|
|
|
13760
13761
|
return `${year}-${month}-${day}T${loop.trigger.at.time}[${loop.trigger.at.timezone}]`;
|
|
13761
13762
|
}
|
|
13762
13763
|
function loopJob(loop) {
|
|
13763
|
-
const cliArgs =
|
|
13764
|
-
Object.entries(loop.input).map(([key, value]) => [key, typeof value === "string" ? value : JSON.stringify(value)])
|
|
13765
|
-
);
|
|
13764
|
+
const cliArgs = { ...loop.input };
|
|
13766
13765
|
return loop.target.kind === "workflow" ? { workflow: loop.target.id, cliArgs, flavor: "scheduled" } : { capability: loop.target.id, cliArgs, flavor: "scheduled" };
|
|
13767
13766
|
}
|
|
13768
13767
|
function repositoryTenant(config) {
|
|
@@ -18144,7 +18143,8 @@ var init_publishReport = __esm({
|
|
|
18144
18143
|
if (!publication) return;
|
|
18145
18144
|
const result = latestResult(ctx.data.capabilityResults, agentResult);
|
|
18146
18145
|
const stateData = recordField4(recordField4(ctx.data.nextJobState)?.data) ?? {};
|
|
18147
|
-
const
|
|
18146
|
+
const capabilityFacts = recordField4(recordField4(ctx.data.capabilityOutput)?.facts) ?? {};
|
|
18147
|
+
const data = { ...stateData, ...result?.facts ?? {}, ...capabilityFacts };
|
|
18148
18148
|
if (publication.publishWhenFact && resolveDotted(data, publication.publishWhenFact) === void 0) return;
|
|
18149
18149
|
const slug = publication.slug ?? stringValue5(resolveDotted(data, publication.slugFact));
|
|
18150
18150
|
if (!slug || !SAFE_SLUG.test(slug)) return;
|
|
@@ -27251,12 +27251,22 @@ function tryLoadConfig(cwd) {
|
|
|
27251
27251
|
return null;
|
|
27252
27252
|
}
|
|
27253
27253
|
}
|
|
27254
|
+
function conversationTenantId(dashboardUrl) {
|
|
27255
|
+
if (!dashboardUrl) return void 0;
|
|
27256
|
+
try {
|
|
27257
|
+
const value = new URL(dashboardUrl).searchParams.get("conversationTenantId")?.trim();
|
|
27258
|
+
return value && /^user:\d+$/.test(value) ? value : void 0;
|
|
27259
|
+
} catch {
|
|
27260
|
+
return void 0;
|
|
27261
|
+
}
|
|
27262
|
+
}
|
|
27254
27263
|
function buildSink(cwd, sessionId, dashboardUrl) {
|
|
27255
27264
|
const backend = createStateBackendFromEnv();
|
|
27265
|
+
const tenantId2 = conversationTenantId(dashboardUrl) ?? "global";
|
|
27256
27266
|
const sinks = [
|
|
27257
27267
|
new BackendEventSink(
|
|
27258
|
-
(
|
|
27259
|
-
|
|
27268
|
+
(tenantId3, targetSessionId, event) => backend.appendChatEvent(tenantId3, targetSessionId, event),
|
|
27269
|
+
tenantId2,
|
|
27260
27270
|
sessionId
|
|
27261
27271
|
),
|
|
27262
27272
|
new FileSink(eventsFilePath(cwd, sessionId))
|
|
@@ -27334,7 +27344,11 @@ ${CHAT_HELP}`);
|
|
|
27334
27344
|
process.stdout.write(`\u2192 kody:chat: litellm proxy ready (url=${litellm?.url ?? "skipped"})
|
|
27335
27345
|
`);
|
|
27336
27346
|
const sessionFile = sessionFilePath(cwd, sessionId);
|
|
27337
|
-
const store = createSessionStore({
|
|
27347
|
+
const store = createSessionStore({
|
|
27348
|
+
sessionId,
|
|
27349
|
+
sessionFile,
|
|
27350
|
+
tenantId: conversationTenantId(args.dashboardUrl)
|
|
27351
|
+
});
|
|
27338
27352
|
if (args.initMessage) {
|
|
27339
27353
|
await store.appendTurn({
|
|
27340
27354
|
role: "user",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.524",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|