@botpress/adk 1.19.0-beta.12 → 1.19.0-beta.13
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/agent0/index.js +16 -7
- package/dist/agent0/index.js.map +5 -5
- package/dist/agent0/runtime/client.d.ts +2 -0
- package/dist/agent0/runtime/client.d.ts.map +1 -1
- package/dist/agent0/runtime/engine.d.ts +2 -1
- package/dist/agent0/runtime/engine.d.ts.map +1 -1
- package/dist/agent0/runtime/process.d.ts +1 -0
- package/dist/agent0/runtime/process.d.ts.map +1 -1
- package/dist/assets/manager.d.ts +3 -0
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/dependencies/index.js +134 -258
- package/dist/dependencies/index.js.map +8 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +459 -573
- package/dist/index.js.map +13 -14
- package/dist/integrations/hub-cache.d.ts +0 -58
- package/dist/integrations/hub-cache.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +0 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/knowledge/manager.d.ts +3 -0
- package/dist/knowledge/manager.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts +6 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/tables/table-manager.d.ts +3 -0
- package/dist/tables/table-manager.d.ts.map +1 -1
- package/dist/workspace/workspace-cache.d.ts +2 -1
- package/dist/workspace/workspace-cache.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/agent0/index.js
CHANGED
|
@@ -1500,6 +1500,7 @@ import { pipeline } from "node:stream/promises";
|
|
|
1500
1500
|
|
|
1501
1501
|
// src/agent0/runtime/engine.ts
|
|
1502
1502
|
init_src();
|
|
1503
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1503
1504
|
|
|
1504
1505
|
// src/agent0/runtime/permissions.ts
|
|
1505
1506
|
var AGENT0_BUILT_IN_MCP_PERMISSION = "adk_*";
|
|
@@ -1683,14 +1684,15 @@ function buildAgent0CognitiveProvider(options) {
|
|
|
1683
1684
|
models
|
|
1684
1685
|
};
|
|
1685
1686
|
}
|
|
1686
|
-
function buildAgent0OpenCodeEnv(paths2,
|
|
1687
|
+
function buildAgent0OpenCodeEnv(paths2, configOrContent, authContent = {}) {
|
|
1688
|
+
const configContent = typeof configOrContent === "string" ? configOrContent : JSON.stringify(configOrContent);
|
|
1687
1689
|
return {
|
|
1688
1690
|
XDG_CONFIG_HOME: paths2.xdgConfigHome,
|
|
1689
1691
|
XDG_DATA_HOME: paths2.xdgDataHome,
|
|
1690
1692
|
XDG_CACHE_HOME: paths2.xdgCacheHome,
|
|
1691
1693
|
XDG_STATE_HOME: paths2.xdgStateHome,
|
|
1692
1694
|
OPENCODE_CONFIG_DIR: paths2.engineConfigDir,
|
|
1693
|
-
OPENCODE_CONFIG_CONTENT:
|
|
1695
|
+
OPENCODE_CONFIG_CONTENT: configContent,
|
|
1694
1696
|
OPENCODE_AUTH_CONTENT: JSON.stringify(authContent),
|
|
1695
1697
|
OPENCODE_TEST_HOME: paths2.fakeHomeDir,
|
|
1696
1698
|
OPENCODE_PURE: "1",
|
|
@@ -1707,11 +1709,13 @@ function buildAgent0OpenCodeEnv(paths2, config, authContent = {}) {
|
|
|
1707
1709
|
}
|
|
1708
1710
|
function renderAgent0OpenCodeRuntime(options) {
|
|
1709
1711
|
const config = buildAgent0OpenCodeConfig(options);
|
|
1712
|
+
const configContent = JSON.stringify(config);
|
|
1710
1713
|
const authContent = options.agent0Config ? buildAgent0OpenCodeAuthContent(options.agent0Config) : {};
|
|
1711
1714
|
return {
|
|
1712
1715
|
config,
|
|
1713
1716
|
authContent,
|
|
1714
|
-
|
|
1717
|
+
renderedOpenCodeConfigHash: sha256(configContent),
|
|
1718
|
+
env: buildAgent0OpenCodeEnv(options.paths, configContent, authContent)
|
|
1715
1719
|
};
|
|
1716
1720
|
}
|
|
1717
1721
|
async function prepareAgent0OpenCodeRuntime(options) {
|
|
@@ -1756,6 +1760,9 @@ function renderCognitiveModelCostAndLimits(model) {
|
|
|
1756
1760
|
}
|
|
1757
1761
|
};
|
|
1758
1762
|
}
|
|
1763
|
+
function sha256(content) {
|
|
1764
|
+
return createHash2("sha256").update(content).digest("hex");
|
|
1765
|
+
}
|
|
1759
1766
|
function renderCognitiveModelModalities(model) {
|
|
1760
1767
|
if (!model.tags?.includes("vision"))
|
|
1761
1768
|
return {};
|
|
@@ -1955,6 +1962,7 @@ async function startAgent0OpenCodeProcess(options) {
|
|
|
1955
1962
|
return {
|
|
1956
1963
|
baseURL,
|
|
1957
1964
|
authHeaders: buildAgent0OpenCodeAuthHeaders(serverAuth),
|
|
1965
|
+
renderedOpenCodeConfigHash: runtime.renderedOpenCodeConfigHash,
|
|
1958
1966
|
pid: child.pid,
|
|
1959
1967
|
stop: () => stopAgent0OpenCodeProcess(child)
|
|
1960
1968
|
};
|
|
@@ -2083,7 +2091,7 @@ function createAgent0RuntimeClient(options) {
|
|
|
2083
2091
|
path: "/path",
|
|
2084
2092
|
searchParams: { directory: options.projectPath }
|
|
2085
2093
|
});
|
|
2086
|
-
return normalizeAgent0RuntimeStatus(pathInfo, options.projectPath);
|
|
2094
|
+
return normalizeAgent0RuntimeStatus(pathInfo, options.projectPath, options.engine.renderedOpenCodeConfigHash);
|
|
2087
2095
|
},
|
|
2088
2096
|
async listSessions() {
|
|
2089
2097
|
const sessions = await fetchAgent0OpenCodeJson({
|
|
@@ -3059,14 +3067,15 @@ function toOpenCodeCreateSessionInput(input) {
|
|
|
3059
3067
|
}
|
|
3060
3068
|
};
|
|
3061
3069
|
}
|
|
3062
|
-
function normalizeAgent0RuntimeStatus(value, projectPath) {
|
|
3070
|
+
function normalizeAgent0RuntimeStatus(value, projectPath, renderedOpenCodeConfigHash) {
|
|
3063
3071
|
if (!isRecord2(value) || typeof value.directory !== "string" || typeof value.worktree !== "string") {
|
|
3064
3072
|
throw new Agent0RuntimeClientError("ENGINE_INVALID_RESPONSE", "Agent(0) private runtime returned an invalid path response");
|
|
3065
3073
|
}
|
|
3066
3074
|
return {
|
|
3067
3075
|
state: "running",
|
|
3068
3076
|
projectPath,
|
|
3069
|
-
worktreePath: value.worktree
|
|
3077
|
+
worktreePath: value.worktree,
|
|
3078
|
+
...renderedOpenCodeConfigHash === undefined ? {} : { renderedOpenCodeConfigHash }
|
|
3070
3079
|
};
|
|
3071
3080
|
}
|
|
3072
3081
|
function isRecord2(value) {
|
|
@@ -3378,4 +3387,4 @@ export {
|
|
|
3378
3387
|
AGENT0_BUILT_IN_MCP_PERMISSION
|
|
3379
3388
|
};
|
|
3380
3389
|
|
|
3381
|
-
//# debugId=
|
|
3390
|
+
//# debugId=2AF928F6A248B6DF64756E2164756E21
|