clinkx 1.1.2 → 1.2.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/CHANGELOG.md +31 -0
- package/README.md +63 -12
- package/clinkx-workflows/dist/allowed-roots.js +2 -0
- package/clinkx-workflows/dist/allowed-roots.js.map +1 -1
- package/clinkx-workflows/dist/child-env.d.ts +3 -1
- package/clinkx-workflows/dist/child-env.js +6 -2
- package/clinkx-workflows/dist/child-env.js.map +1 -1
- package/clinkx-workflows/dist/config.d.ts +28 -5
- package/clinkx-workflows/dist/config.js +137 -20
- package/clinkx-workflows/dist/config.js.map +1 -1
- package/clinkx-workflows/dist/contained-file.js +9 -0
- package/clinkx-workflows/dist/contained-file.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/session-log-identity.js +2 -1
- package/clinkx-workflows/dist/dashboard/session-log-identity.js.map +1 -1
- package/clinkx-workflows/dist/root-path-validation.d.ts +12 -0
- package/clinkx-workflows/dist/root-path-validation.js +63 -0
- package/clinkx-workflows/dist/root-path-validation.js.map +1 -0
- package/clinkx-workflows/dist/rosters.d.ts +1 -0
- package/clinkx-workflows/dist/rosters.js +16 -6
- package/clinkx-workflows/dist/rosters.js.map +1 -1
- package/clinkx-workflows/dist/server.js +5 -2
- package/clinkx-workflows/dist/server.js.map +1 -1
- package/clinkx-workflows/dist/state-schema.d.ts +13 -0
- package/clinkx-workflows/dist/state.d.ts +7 -1
- package/clinkx-workflows/dist/state.js +74 -13
- package/clinkx-workflows/dist/state.js.map +1 -1
- package/clinkx-workflows/dist/workflow-completion.d.ts +83 -0
- package/clinkx-workflows/dist/workflow-completion.js +250 -0
- package/clinkx-workflows/dist/workflow-completion.js.map +1 -0
- package/clinkx-workflows/dist/workflow-tools.d.ts +4 -3
- package/clinkx-workflows/dist/workflow-tools.js +341 -34
- package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
- package/dist/allowed-roots.d.ts +1 -1
- package/dist/allowed-roots.js +124 -14
- package/dist/allowed-roots.js.map +1 -1
- package/dist/context-builder/config.d.ts +1 -0
- package/dist/context-builder/config.js +21 -9
- package/dist/context-builder/config.js.map +1 -1
- package/dist/context-builder/mutation-lock.d.ts +4 -0
- package/dist/context-builder/mutation-lock.js +7 -1
- package/dist/context-builder/mutation-lock.js.map +1 -1
- package/dist/context-builder/storage.d.ts +10 -2
- package/dist/context-builder/storage.js +213 -16
- package/dist/context-builder/storage.js.map +1 -1
- package/dist/dashboard-cli.d.ts +6 -0
- package/dist/dashboard-cli.js +8 -29
- package/dist/dashboard-cli.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +5 -1
- package/dist/registry.js.map +1 -1
- package/dist/server.js +12 -5
- package/dist/server.js.map +1 -1
- package/docs/configuration.md +157 -12
- package/docs/security.md +3 -0
- package/package.json +1 -1
- package/scripts/provider-doctor-core.mjs +21 -5
|
@@ -31,6 +31,7 @@ async function loadModules(withProbe) {
|
|
|
31
31
|
redactSecrets: env.redactSecrets,
|
|
32
32
|
redactCredentials: (text) => redaction.redactWithOptions(text, {}),
|
|
33
33
|
preflightEnabled: () => process.env["CLINKX_WORKFLOWS_CONTEXT_PREFLIGHT_ENABLED"]?.trim().toLowerCase() !== "false",
|
|
34
|
+
getClinkxHome: workflowsConfig.getClinkxHome,
|
|
34
35
|
getChildConfigPath: workflowsConfig.getChildConfigPath,
|
|
35
36
|
getDefaultCurator: workflowsConfig.getWorkflowsContextDefaultCurator,
|
|
36
37
|
getContextDefault: workflowsConfig.getWorkflowsContextDefault,
|
|
@@ -242,13 +243,28 @@ function configFiles(path) {
|
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
245
|
|
|
245
|
-
function
|
|
246
|
+
function jsonFilesInDirectory(dir) {
|
|
247
|
+
if (!existsSync(dir)) return [];
|
|
248
|
+
try {
|
|
249
|
+
return readdirSync(dir).filter((file) => file.endsWith(".json")).sort().map((file) => join(dir, file));
|
|
250
|
+
} catch {
|
|
251
|
+
return [];
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Mirrors discoverConfigPaths() in src/registry.ts; a CLINKX_HOME error has already failed AdapterRegistry.load() with its own message.
|
|
256
|
+
function standardConfigFiles(getClinkxHome) {
|
|
246
257
|
const envPath = process.env["CLINKX_CONFIG_PATH"];
|
|
247
258
|
if (envPath != null && envPath !== "") return configFiles(envPath);
|
|
248
259
|
const xdgHome = process.env["XDG_CONFIG_HOME"] ?? join(homedir(), ".config");
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
260
|
+
let homeTier = [];
|
|
261
|
+
try {
|
|
262
|
+
homeTier = [join(getClinkxHome(), "adapters")];
|
|
263
|
+
} catch {
|
|
264
|
+
homeTier = [];
|
|
265
|
+
}
|
|
266
|
+
return [...homeTier, join(xdgHome, "clinkx", "adapters"), join(PACKAGE_ROOT, "conf", "adapters")]
|
|
267
|
+
.flatMap(jsonFilesInDirectory);
|
|
252
268
|
}
|
|
253
269
|
|
|
254
270
|
function jsonErrorLocation(message, raw) {
|
|
@@ -297,7 +313,7 @@ export async function runDoctor(probes, signal) {
|
|
|
297
313
|
try {
|
|
298
314
|
standard = m.AdapterRegistry.load();
|
|
299
315
|
} catch (error) {
|
|
300
|
-
fail(null, `adapter registry failed to load: ${describeLoadError(error, standardConfigFiles())}`);
|
|
316
|
+
fail(null, `adapter registry failed to load: ${describeLoadError(error, standardConfigFiles(m.getClinkxHome))}`);
|
|
301
317
|
}
|
|
302
318
|
|
|
303
319
|
const childPath = m.getChildConfigPath();
|