@kody-ade/kody-engine 0.4.523 → 0.4.525
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 +24 -5
- 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.525",
|
|
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) {
|
|
@@ -18142,7 +18143,11 @@ var init_publishReport = __esm({
|
|
|
18142
18143
|
if (!publication) return;
|
|
18143
18144
|
const result = latestResult(ctx.data.capabilityResults, agentResult);
|
|
18144
18145
|
const stateData = recordField4(recordField4(ctx.data.nextJobState)?.data) ?? {};
|
|
18145
|
-
const
|
|
18146
|
+
const resultFacts = { ...result?.facts ?? {} };
|
|
18147
|
+
const nestedResultFacts = recordField4(resultFacts.facts) ?? {};
|
|
18148
|
+
if (Object.keys(nestedResultFacts).length > 0) delete resultFacts.facts;
|
|
18149
|
+
const capabilityFacts = recordField4(recordField4(ctx.data.capabilityOutput)?.facts) ?? {};
|
|
18150
|
+
const data = { ...stateData, ...resultFacts, ...nestedResultFacts, ...capabilityFacts };
|
|
18146
18151
|
if (publication.publishWhenFact && resolveDotted(data, publication.publishWhenFact) === void 0) return;
|
|
18147
18152
|
const slug = publication.slug ?? stringValue5(resolveDotted(data, publication.slugFact));
|
|
18148
18153
|
if (!slug || !SAFE_SLUG.test(slug)) return;
|
|
@@ -27249,12 +27254,22 @@ function tryLoadConfig(cwd) {
|
|
|
27249
27254
|
return null;
|
|
27250
27255
|
}
|
|
27251
27256
|
}
|
|
27257
|
+
function conversationTenantId(dashboardUrl) {
|
|
27258
|
+
if (!dashboardUrl) return void 0;
|
|
27259
|
+
try {
|
|
27260
|
+
const value = new URL(dashboardUrl).searchParams.get("conversationTenantId")?.trim();
|
|
27261
|
+
return value && /^user:\d+$/.test(value) ? value : void 0;
|
|
27262
|
+
} catch {
|
|
27263
|
+
return void 0;
|
|
27264
|
+
}
|
|
27265
|
+
}
|
|
27252
27266
|
function buildSink(cwd, sessionId, dashboardUrl) {
|
|
27253
27267
|
const backend = createStateBackendFromEnv();
|
|
27268
|
+
const tenantId2 = conversationTenantId(dashboardUrl) ?? "global";
|
|
27254
27269
|
const sinks = [
|
|
27255
27270
|
new BackendEventSink(
|
|
27256
|
-
(
|
|
27257
|
-
|
|
27271
|
+
(tenantId3, targetSessionId, event) => backend.appendChatEvent(tenantId3, targetSessionId, event),
|
|
27272
|
+
tenantId2,
|
|
27258
27273
|
sessionId
|
|
27259
27274
|
),
|
|
27260
27275
|
new FileSink(eventsFilePath(cwd, sessionId))
|
|
@@ -27332,7 +27347,11 @@ ${CHAT_HELP}`);
|
|
|
27332
27347
|
process.stdout.write(`\u2192 kody:chat: litellm proxy ready (url=${litellm?.url ?? "skipped"})
|
|
27333
27348
|
`);
|
|
27334
27349
|
const sessionFile = sessionFilePath(cwd, sessionId);
|
|
27335
|
-
const store = createSessionStore({
|
|
27350
|
+
const store = createSessionStore({
|
|
27351
|
+
sessionId,
|
|
27352
|
+
sessionFile,
|
|
27353
|
+
tenantId: conversationTenantId(args.dashboardUrl)
|
|
27354
|
+
});
|
|
27336
27355
|
if (args.initMessage) {
|
|
27337
27356
|
await store.appendTurn({
|
|
27338
27357
|
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.525",
|
|
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",
|