@kindgi/cli 0.1.4 → 0.1.5-rc.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/README.md +13 -7
- package/dist/build/defaults.d.ts +3 -1
- package/dist/build/defaults.d.ts.map +1 -1
- package/dist/build/defaults.js +44 -1
- package/dist/build/defaults.js.map +1 -1
- package/dist/build/java-image.d.ts +31 -0
- package/dist/build/java-image.d.ts.map +1 -0
- package/dist/build/java-image.js +146 -0
- package/dist/build/java-image.js.map +1 -0
- package/dist/build/pack-root.d.ts +1 -31
- package/dist/build/pack-root.d.ts.map +1 -1
- package/dist/build/pack-root.js +22 -2
- package/dist/build/pack-root.js.map +1 -1
- package/dist/build/runners.d.ts +44 -0
- package/dist/build/runners.d.ts.map +1 -1
- package/dist/build/scala-image.d.ts +21 -0
- package/dist/build/scala-image.d.ts.map +1 -0
- package/dist/build/scala-image.js +150 -0
- package/dist/build/scala-image.js.map +1 -0
- package/dist/cli-pin.d.ts +16 -0
- package/dist/cli-pin.d.ts.map +1 -0
- package/dist/cli-pin.js +66 -0
- package/dist/cli-pin.js.map +1 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +9 -8
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/approvals.d.ts.map +1 -1
- package/dist/commands/approvals.js +30 -4
- package/dist/commands/approvals.js.map +1 -1
- package/dist/commands/artifacts.d.ts.map +1 -1
- package/dist/commands/artifacts.js +100 -37
- package/dist/commands/artifacts.js.map +1 -1
- package/dist/commands/auth.js +2 -2
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +5 -4
- package/dist/commands/blocks.js.map +1 -1
- package/dist/commands/build.d.ts +10 -2
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +109 -16
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/capabilities.d.ts.map +1 -1
- package/dist/commands/capabilities.js +37 -10
- package/dist/commands/capabilities.js.map +1 -1
- package/dist/commands/console.d.ts +21 -0
- package/dist/commands/console.d.ts.map +1 -0
- package/dist/commands/console.js +87 -0
- package/dist/commands/console.js.map +1 -0
- package/dist/commands/conversations.d.ts.map +1 -1
- package/dist/commands/conversations.js +13 -2
- package/dist/commands/conversations.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +2 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +11 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +211 -39
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts +14 -2
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +355 -19
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/env-scoped.d.ts +44 -0
- package/dist/commands/env-scoped.d.ts.map +1 -0
- package/dist/commands/env-scoped.js +222 -0
- package/dist/commands/env-scoped.js.map +1 -0
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +85 -123
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/eval-runs.d.ts +9 -0
- package/dist/commands/eval-runs.d.ts.map +1 -1
- package/dist/commands/eval-runs.js +20 -19
- package/dist/commands/eval-runs.js.map +1 -1
- package/dist/commands/eval-suites.d.ts.map +1 -1
- package/dist/commands/eval-suites.js +16 -8
- package/dist/commands/eval-suites.js.map +1 -1
- package/dist/commands/exports.d.ts +3 -0
- package/dist/commands/exports.d.ts.map +1 -0
- package/dist/commands/exports.js +82 -0
- package/dist/commands/exports.js.map +1 -0
- package/dist/commands/feedback.d.ts.map +1 -1
- package/dist/commands/feedback.js +6 -5
- package/dist/commands/feedback.js.map +1 -1
- package/dist/commands/flows.d.ts.map +1 -1
- package/dist/commands/flows.js +2 -1
- package/dist/commands/flows.js.map +1 -1
- package/dist/commands/gate-policies.d.ts.map +1 -1
- package/dist/commands/gate-policies.js +2 -1
- package/dist/commands/gate-policies.js.map +1 -1
- package/dist/commands/guardrails.d.ts.map +1 -1
- package/dist/commands/guardrails.js +3 -2
- package/dist/commands/guardrails.js.map +1 -1
- package/dist/commands/helpers.js +5 -5
- package/dist/commands/helpers.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +14 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +254 -18
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/judge-classes.d.ts.map +1 -1
- package/dist/commands/judge-classes.js +11 -10
- package/dist/commands/judge-classes.js.map +1 -1
- package/dist/commands/judgments.d.ts.map +1 -1
- package/dist/commands/judgments.js +7 -6
- package/dist/commands/judgments.js.map +1 -1
- package/dist/commands/key.js +4 -4
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +277 -25
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/people.d.ts +3 -0
- package/dist/commands/people.d.ts.map +1 -0
- package/dist/commands/people.js +166 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/proposals.d.ts.map +1 -1
- package/dist/commands/proposals.js +390 -69
- package/dist/commands/proposals.js.map +1 -1
- package/dist/commands/provenance.d.ts.map +1 -1
- package/dist/commands/provenance.js +6 -7
- package/dist/commands/provenance.js.map +1 -1
- package/dist/commands/providers.d.ts.map +1 -1
- package/dist/commands/providers.js +6 -5
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/reviewers.d.ts.map +1 -1
- package/dist/commands/reviewers.js +3 -2
- package/dist/commands/reviewers.js.map +1 -1
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +24 -14
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/schedules.d.ts +3 -0
- package/dist/commands/schedules.d.ts.map +1 -0
- package/dist/commands/schedules.js +275 -0
- package/dist/commands/schedules.js.map +1 -0
- package/dist/commands/secrets.d.ts.map +1 -1
- package/dist/commands/secrets.js +10 -11
- package/dist/commands/secrets.js.map +1 -1
- package/dist/commands/service-accounts.d.ts +3 -0
- package/dist/commands/service-accounts.d.ts.map +1 -0
- package/dist/commands/service-accounts.js +175 -0
- package/dist/commands/service-accounts.js.map +1 -0
- package/dist/commands/skills.d.ts +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +11 -4
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/sso.d.ts +6 -0
- package/dist/commands/sso.d.ts.map +1 -0
- package/dist/commands/sso.js +318 -0
- package/dist/commands/sso.js.map +1 -0
- package/dist/commands/tokens.d.ts +11 -0
- package/dist/commands/tokens.d.ts.map +1 -1
- package/dist/commands/tokens.js +144 -11
- package/dist/commands/tokens.js.map +1 -1
- package/dist/commands/tools.d.ts.map +1 -1
- package/dist/commands/tools.js +4 -3
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/unwired.d.ts.map +1 -1
- package/dist/commands/unwired.js +1 -30
- package/dist/commands/unwired.js.map +1 -1
- package/dist/commands/upgrade.d.ts +11 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +160 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/context.d.ts +7 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -0
- package/dist/context.js.map +1 -1
- package/dist/dev/defaults.d.ts +28 -11
- package/dist/dev/defaults.d.ts.map +1 -1
- package/dist/dev/defaults.js +114 -35
- package/dist/dev/defaults.js.map +1 -1
- package/dist/dev/google-credentials.d.ts +50 -0
- package/dist/dev/google-credentials.d.ts.map +1 -0
- package/dist/dev/google-credentials.js +157 -0
- package/dist/dev/google-credentials.js.map +1 -0
- package/dist/dev/java-builder.d.ts +56 -0
- package/dist/dev/java-builder.d.ts.map +1 -0
- package/dist/dev/java-builder.js +204 -0
- package/dist/dev/java-builder.js.map +1 -0
- package/dist/dev/jvm-run-files.d.ts +29 -0
- package/dist/dev/jvm-run-files.d.ts.map +1 -0
- package/dist/dev/jvm-run-files.js +94 -0
- package/dist/dev/jvm-run-files.js.map +1 -0
- package/dist/dev/lines.d.ts +13 -0
- package/dist/dev/lines.d.ts.map +1 -0
- package/dist/dev/lines.js +24 -0
- package/dist/dev/lines.js.map +1 -0
- package/dist/dev/log-view.d.ts +116 -0
- package/dist/dev/log-view.d.ts.map +1 -0
- package/dist/dev/log-view.js +233 -0
- package/dist/dev/log-view.js.map +1 -0
- package/dist/dev/pack-code.d.ts +79 -4
- package/dist/dev/pack-code.d.ts.map +1 -1
- package/dist/dev/pack-code.js +262 -3
- package/dist/dev/pack-code.js.map +1 -1
- package/dist/dev/pack-env.d.ts.map +1 -1
- package/dist/dev/pack-env.js +4 -0
- package/dist/dev/pack-env.js.map +1 -1
- package/dist/dev/pack-service.d.ts +11 -1
- package/dist/dev/pack-service.d.ts.map +1 -1
- package/dist/dev/pack-service.js +56 -20
- package/dist/dev/pack-service.js.map +1 -1
- package/dist/dev/paths.d.ts +6 -0
- package/dist/dev/paths.d.ts.map +1 -1
- package/dist/dev/paths.js +8 -0
- package/dist/dev/paths.js.map +1 -1
- package/dist/dev/project-database.js +1 -1
- package/dist/dev/project-database.js.map +1 -1
- package/dist/dev/runners.d.ts +35 -9
- package/dist/dev/runners.d.ts.map +1 -1
- package/dist/dev/runtime-container.d.ts +10 -2
- package/dist/dev/runtime-container.d.ts.map +1 -1
- package/dist/dev/runtime-container.js +48 -20
- package/dist/dev/runtime-container.js.map +1 -1
- package/dist/dev/runtime-env.d.ts +10 -0
- package/dist/dev/runtime-env.d.ts.map +1 -1
- package/dist/dev/runtime-env.js +8 -4
- package/dist/dev/runtime-env.js.map +1 -1
- package/dist/dev/runtime-image.d.ts +1 -1
- package/dist/dev/runtime-image.d.ts.map +1 -1
- package/dist/dev/runtime-image.js +1 -1
- package/dist/dev/runtime-image.js.map +1 -1
- package/dist/dev/scala-builder.d.ts +72 -0
- package/dist/dev/scala-builder.d.ts.map +1 -0
- package/dist/dev/scala-builder.js +347 -0
- package/dist/dev/scala-builder.js.map +1 -0
- package/dist/env/project-env.d.ts.map +1 -1
- package/dist/env/project-env.js +3 -1
- package/dist/env/project-env.js.map +1 -1
- package/dist/errors.d.ts +9 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -1
- package/dist/init/dependency-specs.d.ts +26 -0
- package/dist/init/dependency-specs.d.ts.map +1 -1
- package/dist/init/dependency-specs.js +38 -0
- package/dist/init/dependency-specs.js.map +1 -1
- package/dist/init/java-augment.d.ts +24 -0
- package/dist/init/java-augment.d.ts.map +1 -0
- package/dist/init/java-augment.js +198 -0
- package/dist/init/java-augment.js.map +1 -0
- package/dist/init/mode-detect.d.ts +2 -2
- package/dist/init/mode-detect.d.ts.map +1 -1
- package/dist/init/mode-detect.js +12 -1
- package/dist/init/mode-detect.js.map +1 -1
- package/dist/init/scala-augment.d.ts +23 -0
- package/dist/init/scala-augment.d.ts.map +1 -0
- package/dist/init/scala-augment.js +213 -0
- package/dist/init/scala-augment.js.map +1 -0
- package/dist/init/template-files.d.ts +40 -2
- package/dist/init/template-files.d.ts.map +1 -1
- package/dist/init/template-files.js +56 -5
- package/dist/init/template-files.js.map +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -2
- package/dist/main.js.map +1 -1
- package/dist/open-url.d.ts +15 -0
- package/dist/open-url.d.ts.map +1 -0
- package/dist/open-url.js +41 -0
- package/dist/open-url.js.map +1 -0
- package/dist/package-manager.d.ts +10 -3
- package/dist/package-manager.d.ts.map +1 -1
- package/dist/package-manager.js +19 -1
- package/dist/package-manager.js.map +1 -1
- package/dist/providers/presets/anthropic.json +11 -3
- package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +26 -2
- package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +47 -3
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +7 -5
- package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +40 -15
- package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +27 -1
- package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +5 -4
- package/dist/sdk-skills/kindgi-getting-started/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-java-authoring-agents/SKILL.md +220 -0
- package/dist/sdk-skills/kindgi-java-authoring-flows/SKILL.md +390 -0
- package/dist/sdk-skills/kindgi-java-authoring-guardrails/SKILL.md +209 -0
- package/dist/sdk-skills/kindgi-java-authoring-tools/SKILL.md +334 -0
- package/dist/sdk-skills/kindgi-java-getting-started/SKILL.md +270 -0
- package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +21 -3
- package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +10 -3
- package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +36 -5
- package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +2 -2
- package/dist/sdk-skills/kindgi-scala-authoring-agents/SKILL.md +217 -0
- package/dist/sdk-skills/kindgi-scala-authoring-flows/SKILL.md +357 -0
- package/dist/sdk-skills/kindgi-scala-authoring-guardrails/SKILL.md +199 -0
- package/dist/sdk-skills/kindgi-scala-authoring-tools/SKILL.md +302 -0
- package/dist/sdk-skills/kindgi-scala-getting-started/SKILL.md +302 -0
- package/dist/templates/java/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/dist/templates/java/AGENTS.md +31 -0
- package/dist/templates/java/README.md.tmpl +69 -0
- package/dist/templates/java/gitignore +9 -0
- package/dist/templates/java/kindgi.config.json.tmpl +8 -0
- package/dist/templates/java/kindgiw +33 -0
- package/dist/templates/java/kindgiw.cmd +28 -0
- package/dist/templates/java/mvnw +295 -0
- package/dist/templates/java/pom.xml.tmpl +65 -0
- package/dist/templates/java/src/main/java/__PACKAGE__/agents/EchoAgent.java.tmpl +27 -0
- package/dist/templates/java/src/main/java/__PACKAGE__/flows/EchoFlow.java.tmpl +18 -0
- package/dist/templates/java/src/main/java/__PACKAGE__/guardrails/ResponseNotEmpty.java.tmpl +28 -0
- package/dist/templates/java/src/main/java/__PACKAGE__/tools/Echo.java.tmpl +22 -0
- package/dist/templates/java/src/main/java/__PACKAGE__/tools/Greet.java.tmpl +23 -0
- package/dist/templates/java/src/test/java/__PACKAGE__/ToolsTest.java.tmpl +30 -0
- package/dist/templates/minimal/README.md.tmpl +6 -12
- package/dist/templates/python/README.md.tmpl +4 -4
- package/dist/templates/sample/README.md.tmpl +5 -11
- package/dist/templates/scala/AGENTS.md +32 -0
- package/dist/templates/scala/README.md.tmpl +75 -0
- package/dist/templates/scala/build.sbt.tmpl +16 -0
- package/dist/templates/scala/gitignore +13 -0
- package/dist/templates/scala/kindgi.config.json.tmpl +8 -0
- package/dist/templates/scala/project/build.properties +1 -0
- package/dist/templates/scala/src/main/scala/__PACKAGE__/agents/EchoAgent.scala.tmpl +23 -0
- package/dist/templates/scala/src/main/scala/__PACKAGE__/flows/EchoFlow.scala.tmpl +16 -0
- package/dist/templates/scala/src/main/scala/__PACKAGE__/guardrails/ResponseNotEmpty.scala.tmpl +21 -0
- package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Echo.scala.tmpl +16 -0
- package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Greet.scala.tmpl +17 -0
- package/dist/templates/scala/src/test/scala/__PACKAGE__/ToolsSuite.scala.tmpl +23 -0
- package/package.json +13 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../src/package-manager.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../src/package-manager.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AAI3E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG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EAAE,EAAE,cAAc,GAAG,OAAO,GAAG,OAAO,CAEvE"}
|
package/dist/package-manager.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { spawn } from 'node:child_process';
|
|
11
11
|
import { readFile, stat } from 'node:fs/promises';
|
|
12
12
|
import { dirname, join } from 'node:path';
|
|
13
|
+
import { isJvmLanguage } from '@kindgi/handler-runtime';
|
|
13
14
|
import { CLI_VERSION } from './version-info.js';
|
|
14
15
|
/**
|
|
15
16
|
* How this CLI was installed: from npm (`@kindgi/cli`), or from PyPI
|
|
@@ -198,10 +199,18 @@ export async function usablePackageManager(dir, io = defaultIo) {
|
|
|
198
199
|
return { pm };
|
|
199
200
|
return { pm: 'npm', declared: pm };
|
|
200
201
|
}
|
|
201
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* The pack's `BinRunner`: `pythonBinRunner`'s for a Python pack; for a JVM
|
|
204
|
+
* pack (Java, Scala), which has no npm or Python environment, its `kindgiw` (the CLI
|
|
205
|
+
* version it pins), else the published CLI through npx; else the manager
|
|
206
|
+
* that runs here.
|
|
207
|
+
*/
|
|
202
208
|
export async function detectBinRunner(dir, language, io = defaultIo, env = process.env) {
|
|
203
209
|
if (language === 'python')
|
|
204
210
|
return await pythonBinRunner(dir, env, io);
|
|
211
|
+
// A JVM pack (Java, Scala) runs the CLI its kindgiw pins; without the wrapper, the published one.
|
|
212
|
+
if (isJvmLanguage(language))
|
|
213
|
+
return (await io.exists(join(dir, 'kindgiw'))) ? 'kindgiw' : 'path';
|
|
205
214
|
return (await usablePackageManager(dir, io)).pm;
|
|
206
215
|
}
|
|
207
216
|
/**
|
|
@@ -240,6 +249,11 @@ export function binCommand(runner, bin, args = []) {
|
|
|
240
249
|
case 'venv':
|
|
241
250
|
// The PyPI CLI's script in the app's own (activated) environment.
|
|
242
251
|
return { command: bin, args: [...args] };
|
|
252
|
+
case 'kindgiw':
|
|
253
|
+
// A Java pack's wrapper: the CLI version its kindgi.config.json pins.
|
|
254
|
+
return bin === 'kindgi'
|
|
255
|
+
? { command: './kindgiw', args: [...args] }
|
|
256
|
+
: { command: bin, args: [...args] };
|
|
243
257
|
case 'path':
|
|
244
258
|
// No npm project to install the CLI into (a Python pack): the published
|
|
245
259
|
// CLI through npx, within this CLI's minor (as Python packs pin
|
|
@@ -258,6 +272,10 @@ export function binDisplay(runner, bin, args = []) {
|
|
|
258
272
|
export function installCommand(pm) {
|
|
259
273
|
return `${pm} install`;
|
|
260
274
|
}
|
|
275
|
+
/** How a project runs one of its package.json scripts: `pnpm typecheck`, `npm run typecheck`. */
|
|
276
|
+
export function scriptCommand(pm, script) {
|
|
277
|
+
return pm === 'npm' || pm === 'bun' ? `${pm} run ${script}` : `${pm} ${script}`;
|
|
278
|
+
}
|
|
261
279
|
/**
|
|
262
280
|
* Protocol for depending on a local directory by symlink. npm has no
|
|
263
281
|
* `link:`; its `file:` symlinks directories (npm ≥ 7).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../src/package-manager.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../src/package-manager.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAqB,aAAa,EAAE,MAAM,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"cost": {
|
|
21
21
|
"promptUsdPer1kTokens": 0.004,
|
|
22
|
-
"completionUsdPer1kTokens": 0.02
|
|
22
|
+
"completionUsdPer1kTokens": 0.02,
|
|
23
|
+
"promptCacheCreationMultiplier": 1.25,
|
|
24
|
+
"promptCacheReadMultiplier": 0.05
|
|
23
25
|
},
|
|
24
26
|
"description": "Most capable Opus \u2014 long-running agentic and knowledge work."
|
|
25
27
|
},
|
|
@@ -32,7 +34,9 @@
|
|
|
32
34
|
"features": ["tool-use", "parallel-tool-use", "structured-output", "long-context"],
|
|
33
35
|
"cost": {
|
|
34
36
|
"promptUsdPer1kTokens": 0.002,
|
|
35
|
-
"completionUsdPer1kTokens": 0.01
|
|
37
|
+
"completionUsdPer1kTokens": 0.01,
|
|
38
|
+
"promptCacheCreationMultiplier": 1.25,
|
|
39
|
+
"promptCacheReadMultiplier": 0.05
|
|
36
40
|
},
|
|
37
41
|
"description": "Balanced performance and cost."
|
|
38
42
|
},
|
|
@@ -46,6 +50,8 @@
|
|
|
46
50
|
"cost": {
|
|
47
51
|
"promptUsdPer1kTokens": 0.0001,
|
|
48
52
|
"completionUsdPer1kTokens": 0.0005,
|
|
53
|
+
"promptCacheCreationMultiplier": 1.25,
|
|
54
|
+
"promptCacheReadMultiplier": 0.1,
|
|
49
55
|
"longContext": {
|
|
50
56
|
"thresholdTokens": 100000,
|
|
51
57
|
"promptUsdPer1kTokens": 0.0005,
|
|
@@ -61,7 +67,9 @@
|
|
|
61
67
|
"features": ["tool-use", "parallel-tool-use"],
|
|
62
68
|
"cost": {
|
|
63
69
|
"promptUsdPer1kTokens": 0.001,
|
|
64
|
-
"completionUsdPer1kTokens": 0.005
|
|
70
|
+
"completionUsdPer1kTokens": 0.005,
|
|
71
|
+
"promptCacheCreationMultiplier": 1.25,
|
|
72
|
+
"promptCacheReadMultiplier": 0.1
|
|
65
73
|
},
|
|
66
74
|
"description": "Fastest and cheapest \u2014 routing, classification, simple calls. Anthropic retires it on or after 2026-10-15: move to claude-haiku-5-5 before then."
|
|
67
75
|
}
|
|
@@ -12,8 +12,8 @@ description: >
|
|
|
12
12
|
kindgi-authoring-guardrails.
|
|
13
13
|
type: core
|
|
14
14
|
library: "@kindgi/sdk"
|
|
15
|
-
version: "0.4.
|
|
16
|
-
sdk_version: "0.1.
|
|
15
|
+
version: "0.4.5"
|
|
16
|
+
sdk_version: "0.1.5-rc.0"
|
|
17
17
|
pack_languages: [node]
|
|
18
18
|
sources:
|
|
19
19
|
- packages/agents/src/types.ts
|
|
@@ -160,6 +160,30 @@ export default defined.value;
|
|
|
160
160
|
retries the turn fails as before, with `toolRetries` on the error. A
|
|
161
161
|
tenant's `tool-errors` policy can lower these (fewer retries, fewer
|
|
162
162
|
kinds), never raise them.
|
|
163
|
+
- **`retrieval`** — what the agent reads from memory before each turn.
|
|
164
|
+
Empty = no memory. Each intent is
|
|
165
|
+
`{ types: ['acme.preference'], scope, mode?, limit? }`, with `scope`
|
|
166
|
+
one of `'same-user'`, `'same-conversation'`, `'same-project'`,
|
|
167
|
+
`'tenant'` (always within what the run may see), and `mode` absent
|
|
168
|
+
(newest first), `'keyword'`, `'semantic'` or `'both'`. Retrieved facts
|
|
169
|
+
reach the model as data in a `<memory>` block, never as instructions.
|
|
170
|
+
`semantic`/`both` need embeddings on the runtime
|
|
171
|
+
(`KINDGI_MEMORY_EMBEDDINGS`): without them a `semantic` intent fails
|
|
172
|
+
the turn (`semantic-unavailable`). `{ source: 'conversations', scope:
|
|
173
|
+
'same-user' }` recalls this agent's earlier conversations: the people's
|
|
174
|
+
own words only, unless `roles: ['user', 'agent']` (its own earlier
|
|
175
|
+
answers come back marked unverified). `same-segment`/`same-project`
|
|
176
|
+
recall other people's conversations, and publishing warns.
|
|
177
|
+
- **`memory`** — `{ remember: { types, scope, keepDays? } }` gives the
|
|
178
|
+
turn the built-in tool `kindgi_remember` (name it exactly so in the
|
|
179
|
+
instructions; built-ins have no dots). The model picks the type, the
|
|
180
|
+
text, an optional `key` and an expiry; never the scope. A fact wider
|
|
181
|
+
than one person, or text that reads like an instruction, waits for a
|
|
182
|
+
person's approval. Remembering is a tool call, so use a model with
|
|
183
|
+
reliable tool calling. `{ instructionTypes: ['acme.policy'] }` turns a
|
|
184
|
+
retrieved, verified fact of those types into an instruction
|
|
185
|
+
("Policies (verified)"). See
|
|
186
|
+
https://docs.kindgi.com/v0.1/guides/agents/give-an-agent-memory/.
|
|
163
187
|
|
|
164
188
|
## What a turn receives
|
|
165
189
|
|
|
@@ -15,8 +15,8 @@ description: >
|
|
|
15
15
|
kindgi-authoring-agents.
|
|
16
16
|
type: core
|
|
17
17
|
library: "@kindgi/sdk"
|
|
18
|
-
version: "0.3.
|
|
19
|
-
sdk_version: "0.1.
|
|
18
|
+
version: "0.3.8"
|
|
19
|
+
sdk_version: "0.1.5-rc.0"
|
|
20
20
|
pack_languages: [node]
|
|
21
21
|
sources:
|
|
22
22
|
- packages/guardrails/src/types.ts
|
|
@@ -55,7 +55,11 @@ before the response is stored.
|
|
|
55
55
|
- **Built-in checks** (`BUILT_IN_CHECK_IDS` in `@kindgi/guardrails`):
|
|
56
56
|
`must-cite`, `never-call-tool`, `max-tool-calls`, `output-matches`,
|
|
57
57
|
`tool-order`, `required-substring`, `forbidden-substring`. A guardrail
|
|
58
|
-
can name one of these instead of
|
|
58
|
+
can name one of these (`check: 'forbidden-substring'`) instead of
|
|
59
|
+
shipping its own check, and the runtime runs the built-in. Their ids
|
|
60
|
+
are reserved: a pack that ships its own check under one is refused
|
|
61
|
+
(`reserved-check-id`), so name yours `<pack>.checks.<name>`. See
|
|
62
|
+
"Using a built-in check" below for each one's `config`.
|
|
59
63
|
|
|
60
64
|
`@kindgi/sdk` exports `defineCheck` but no helper for the guardrail
|
|
61
65
|
itself: a pack file default-exports the declaration as a plain object.
|
|
@@ -119,6 +123,46 @@ How the pack tooling reads this file:
|
|
|
119
123
|
declares no config gets them all), and a config that doesn't fit
|
|
120
124
|
refused, naming where.
|
|
121
125
|
|
|
126
|
+
## Using a built-in check
|
|
127
|
+
|
|
128
|
+
Name the built-in as the guardrail's `check`, give its `config`, and ship
|
|
129
|
+
no check implementation:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
// guardrails/no-guarantees/index.ts
|
|
133
|
+
export default {
|
|
134
|
+
id: 'acme.no-guarantees',
|
|
135
|
+
name: 'Never promise a guarantee',
|
|
136
|
+
kind: 'zero-llm',
|
|
137
|
+
check: 'forbidden-substring',
|
|
138
|
+
config: { patterns: ['guaranteed', 'we promise'] },
|
|
139
|
+
action: { 'on-violation': 'halt' },
|
|
140
|
+
severity: 'error',
|
|
141
|
+
};
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Each built-in's `config` (tool lists hold tool ids, as in
|
|
145
|
+
`acme.fetch-precedent`; a setting without `?` is required):
|
|
146
|
+
|
|
147
|
+
| Check | Fails when | `config` |
|
|
148
|
+
| --- | --- | --- |
|
|
149
|
+
| `must-cite` | the answer is empty, or has fewer than `minCitations` matches of `sourcePattern` | `minCitations?: integer ≥ 1` (1), `sourcePattern?: string` (a regex; `[…]`-style citations by default) |
|
|
150
|
+
| `never-call-tool` | the turn called any tool in `tools` | `tools: (string \| { id, version? })[]`, one or more |
|
|
151
|
+
| `max-tool-calls` | the turn made more than `max` tool calls | `max?: integer ≥ 0` (10) |
|
|
152
|
+
| `output-matches` | the answer doesn't match `pattern` (with `negate: true`, it does) | `pattern: string` (a regex), `flags?: string` (letters `dgimsuyv`), `negate?: boolean` |
|
|
153
|
+
| `tool-order` | the tools in `sequence` weren't called in that order (others may come between) | `sequence: string[]`, one or more |
|
|
154
|
+
| `required-substring` | the answer is empty, or lacks any of `patterns` | `patterns: string[]`, one or more non-empty (plain text), `caseSensitive?: boolean` (false) |
|
|
155
|
+
| `forbidden-substring` | the answer contains any of `patterns` | `patterns: string[]`, one or more non-empty (plain text), `caseSensitive?: boolean` (false) |
|
|
156
|
+
|
|
157
|
+
A config the check doesn't take is refused: a required setting left out,
|
|
158
|
+
the wrong type, a setting the check doesn't know, or a regex that doesn't
|
|
159
|
+
compile. Registering it answers `422 guardrail-config-invalid` (each
|
|
160
|
+
problem in `details.issues`); deploying a pack with one fails with
|
|
161
|
+
`deployment-validation-failed`; one that still reaches a turn is a check
|
|
162
|
+
that can't run (`invalid-check-config`), so a `halt` guardrail stops the
|
|
163
|
+
turn. Each built-in's JSON Schema is its registered check's
|
|
164
|
+
`configSchema`.
|
|
165
|
+
|
|
122
166
|
## Validating a declaration in-process
|
|
123
167
|
|
|
124
168
|
`defineGuardrail(spec, checks)` from `@kindgi/guardrails` validates a
|
|
@@ -17,9 +17,9 @@ description: >
|
|
|
17
17
|
`kindgi secrets set` flow.
|
|
18
18
|
type: core
|
|
19
19
|
library: "@kindgi/sdk"
|
|
20
|
-
version: "0.3.
|
|
21
|
-
sdk_version: "0.1.
|
|
22
|
-
pack_languages: [node, python]
|
|
20
|
+
version: "0.3.2"
|
|
21
|
+
sdk_version: "0.1.5-rc.0"
|
|
22
|
+
pack_languages: [node, python, java, scala]
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
# Wiring an MCP server for a Kindgi pack
|
|
@@ -28,7 +28,8 @@ pack_languages: [node, python]
|
|
|
28
28
|
> (`@kindgi/cli`), not a global command. Run it through the project's
|
|
29
29
|
> package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
|
|
30
30
|
> `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
|
|
31
|
-
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
|
|
31
|
+
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`. A Java
|
|
32
|
+
> or Scala pack (`kindgi.config.json`) runs the CLI it pins: `./kindgiw …`.
|
|
32
33
|
> Commands below are written `kindgi …` for brevity.
|
|
33
34
|
|
|
34
35
|
If the user has an external resource (Postgres DB, GitHub org, Notion
|
|
@@ -89,7 +90,8 @@ Three moving parts:
|
|
|
89
90
|
(`"command": "pnpm", "args": ["exec", "kindgi", "mcp-launch", …]`;
|
|
90
91
|
npm: `npx --no kindgi …`) — never a global `kindgi`, never a
|
|
91
92
|
download. A Python pack has no Node project, so its entries run the
|
|
92
|
-
`kindgi` on `PATH` (`"command": "kindgi", "args": ["mcp-launch", …]`).
|
|
93
|
+
`kindgi` on `PATH` (`"command": "kindgi", "args": ["mcp-launch", …]`). A
|
|
94
|
+
Java or Scala pack's run the CLI it pins (`"command": "./kindgiw"`).
|
|
93
95
|
The file is safe to commit — it references secrets by NAME, not
|
|
94
96
|
value.
|
|
95
97
|
3. **The launcher** — `kindgi mcp-launch` is what the coding agent
|
|
@@ -23,9 +23,9 @@ description: >
|
|
|
23
23
|
kindgi-getting-started.
|
|
24
24
|
type: core
|
|
25
25
|
library: "@kindgi/sdk"
|
|
26
|
-
version: "0.9.
|
|
27
|
-
sdk_version: "0.1.
|
|
28
|
-
pack_languages: [node, python]
|
|
26
|
+
version: "0.9.11"
|
|
27
|
+
sdk_version: "0.1.5-rc.0"
|
|
28
|
+
pack_languages: [node, python, java, scala]
|
|
29
29
|
sources:
|
|
30
30
|
- packages/adapters/model-anthropic/src/provider.ts
|
|
31
31
|
- packages/adapters/model-gemini/src/provider.ts
|
|
@@ -41,7 +41,8 @@ sources:
|
|
|
41
41
|
> (`@kindgi/cli`), not a global command. Run it through the project's
|
|
42
42
|
> package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
|
|
43
43
|
> `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
|
|
44
|
-
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
|
|
44
|
+
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`. A Java
|
|
45
|
+
> or Scala pack (`kindgi.config.json`) runs the CLI it pins: `./kindgiw …`.
|
|
45
46
|
> Commands below are written `kindgi …` for brevity.
|
|
46
47
|
|
|
47
48
|
An **agent** is a versioned declaration; it needs a **provider** to run.
|
|
@@ -76,8 +77,9 @@ Three moving parts:
|
|
|
76
77
|
1. **API key on disk** — in `kindgi dev` (environment `local`) the dotenv
|
|
77
78
|
secret binding reads the project's own env files: `.env`, then
|
|
78
79
|
`.env.local` on top (change the list with `dev.envFiles` in
|
|
79
|
-
`kindgi.config.ts`,
|
|
80
|
-
pack's `pyproject.toml`
|
|
80
|
+
`kindgi.config.ts`, `envFiles` under `[tool.kindgi.dev]` in a Python
|
|
81
|
+
pack's `pyproject.toml`, or `dev.envFiles` in a Java or Scala pack's
|
|
82
|
+
`kindgi.config.json`). A key already in the app's `.env` just works.
|
|
81
83
|
`kindgi secrets set` (interactive, no-echo) writes `.env.local`. For
|
|
82
84
|
non-sensitive values (log levels, region names, feature flags),
|
|
83
85
|
`kindgi env set NAME VALUE --env=local` writes the same file with a
|
|
@@ -131,8 +133,9 @@ credential on argv.
|
|
|
131
133
|
kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5 (default), Haiku 5.5, Haiku 4.5
|
|
132
134
|
kindgi providers register --preset=anthropic --models=claude-sonnet-5-5 # just one
|
|
133
135
|
```
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
Before pinning a Claude model, check its status on Anthropic's model
|
|
137
|
+
deprecations page (https://platform.claude.com/docs/en/about-claude/model-deprecations): a turn routed to a retired model fails. Prefer the
|
|
138
|
+
preset's default. Each
|
|
136
139
|
preset names a default model (`metadata.defaultModel`, marked `(default)`
|
|
137
140
|
when it registers), which an agent with no preference gets. A preset
|
|
138
141
|
registered before 0.1.4 has none: unregister it and register it again.
|
|
@@ -164,12 +167,15 @@ providers: [
|
|
|
164
167
|
preset = "anthropic"
|
|
165
168
|
models = ["claude-sonnet-5-5"]
|
|
166
169
|
```
|
|
170
|
+
In a Java or Scala pack's `kindgi.config.json`, the same keys:
|
|
171
|
+
`"providers": [{"preset": "anthropic", "models": ["claude-sonnet-5-5"]}]`.
|
|
167
172
|
- A preset entry takes `models`, `project`, `secret` (the key's name, in place
|
|
168
|
-
of the preset's) and `maxOutputTokens`, spelled the same in `pyproject.toml
|
|
173
|
+
of the preset's) and `maxOutputTokens`, spelled the same in `pyproject.toml`
|
|
174
|
+
and `kindgi.config.json`;
|
|
169
175
|
a `spec` entry is a `--spec` body. A
|
|
170
176
|
key is always a secret's name (`secret_ref`); a credential in
|
|
171
177
|
`adapter_config` is refused.
|
|
172
|
-
- Each boot prints `Providers from kindgi.config.ts:` with one line each:
|
|
178
|
+
- Each boot prints `Providers from kindgi.config.ts:` (the pack's config file) with one line each:
|
|
173
179
|
`registered`, `unchanged`, `registered again (changed in kindgi.config.ts)`,
|
|
174
180
|
`unregistered (no longer in kindgi.config.ts)`, or ⚠ `not registered: <KEY>
|
|
175
181
|
is not in .env, .env.local` (set the key, then restart: the config isn't
|
|
@@ -535,7 +541,8 @@ Or skip step 2: `kindgi providers register --preset=gemini --project=<your-gcp-p
|
|
|
535
541
|
registers both models above.
|
|
536
542
|
Then pin it from an agent with `preferredProvider: 'gemini'` (and a model
|
|
537
543
|
with `preferredModel`; in Python, `preferred_provider="gemini"` and
|
|
538
|
-
`preferred_model
|
|
544
|
+
`preferred_model=…`; in Java, `.set("preferredProvider", "gemini")`), or let
|
|
545
|
+
the router pick by capability.
|
|
539
546
|
|
|
540
547
|
## How the router picks between multiple providers + models
|
|
541
548
|
|
|
@@ -550,7 +557,8 @@ tenant policy), then sorts survivors in this order:
|
|
|
550
557
|
- Only `preferredModel` set → promote any provider exposing that model.
|
|
551
558
|
- Only `preferredProvider` set → promote every model of that provider.
|
|
552
559
|
`defineAgent` takes both (`preferredProvider`, `preferredModel`), and
|
|
553
|
-
so does a Python `Agent` (`preferred_provider=`, `preferred_model=`)
|
|
560
|
+
so does a Python `Agent` (`preferred_provider=`, `preferred_model=`) and
|
|
561
|
+
a Java `Agent.define(…)` (`set("preferredProvider", …)`).
|
|
554
562
|
2. **`capability.prefer[]` weights.** If the agent's capability
|
|
555
563
|
declares `prefer: [{feature: 'thinking', weight: 3}, ...]`, tuples
|
|
556
564
|
with matching model features (or provider attributes) get higher
|
|
@@ -649,7 +657,8 @@ defineAgent({
|
|
|
649
657
|
be the FULL npm package name of the adapter — `"@kindgi/adapter-model-anthropic"`,
|
|
650
658
|
NOT `"anthropic"`. Adapters are registered with the runtime under
|
|
651
659
|
their full package names, and a short name matches none of them, so
|
|
652
|
-
the
|
|
660
|
+
registering is refused: the runtime has no adapter by that name
|
|
661
|
+
(`✗ /adapter_id: …`). The model adapters are
|
|
653
662
|
`@kindgi/adapter-model-anthropic`, `@kindgi/adapter-model-gemini`,
|
|
654
663
|
`@kindgi/adapter-model-openai-compat` and
|
|
655
664
|
`@kindgi/adapter-model-in-process`; `kindgi providers presets` shows
|
|
@@ -686,8 +695,9 @@ defineAgent({
|
|
|
686
695
|
Then re-register.
|
|
687
696
|
|
|
688
697
|
6. **Key not found by the runtime.** `kindgi dev` reads the env files
|
|
689
|
-
at the PACK ROOT (the directory with `kindgi.config.ts`,
|
|
690
|
-
pack's `pyproject.toml` with `[tool.kindgi]
|
|
698
|
+
at the PACK ROOT (the directory with `kindgi.config.ts`, a Python
|
|
699
|
+
pack's `pyproject.toml` with `[tool.kindgi]`, or a Java or Scala pack's
|
|
700
|
+
`kindgi.config.json`) — `.env` and
|
|
691
701
|
`.env.local`, or whatever `dev.envFiles` lists; the boot log prints
|
|
692
702
|
which files it found. A `KINDGI_`-prefixed name is Kindgi runtime
|
|
693
703
|
config and never resolves as a secret. Outside `kindgi dev`, the
|
|
@@ -716,6 +726,21 @@ defineAgent({
|
|
|
716
726
|
that names nothing registered, and the tenant's policy. `kindgi
|
|
717
727
|
providers list` shows what is registered.
|
|
718
728
|
|
|
729
|
+
10. **A setting the adapter can't use.** Registering checks the spec
|
|
730
|
+
against its adapter (no network call, no key read) and refuses what
|
|
731
|
+
it can't use: `422 provider-config-invalid`, nothing stored, one line
|
|
732
|
+
per problem with its JSON-pointer path:
|
|
733
|
+
```text
|
|
734
|
+
Error [invalid-request]: Provider "ollama" doesn't fit adapter @kindgi/adapter-model-openai-compat: adapter_config.api must be one of responses, chat-completions.
|
|
735
|
+
✗ /adapter_config/api: adapter_config.api must be one of responses, chat-completions.
|
|
736
|
+
```
|
|
737
|
+
Fix each `✗` line's setting and register again. A key the adapter
|
|
738
|
+
needs is checked too (`✗ /secret_ref: …`); whether the key works, or
|
|
739
|
+
the endpoint answers, isn't (the first turn finds out). A
|
|
740
|
+
registration stored before 0.1.5 wasn't checked: `kindgi doctor`
|
|
741
|
+
names its problems (`GET /v1/providers/<id>/check`); unregister it
|
|
742
|
+
and register it again.
|
|
743
|
+
|
|
719
744
|
## Verifying end-to-end
|
|
720
745
|
|
|
721
746
|
```sh
|
|
@@ -13,7 +13,7 @@ description: >
|
|
|
13
13
|
type: core
|
|
14
14
|
library: "@kindgi/sdk"
|
|
15
15
|
version: "0.4.4"
|
|
16
|
-
sdk_version: "0.1.
|
|
16
|
+
sdk_version: "0.1.5-rc.0"
|
|
17
17
|
pack_languages: [node]
|
|
18
18
|
sources:
|
|
19
19
|
- packages/tools/src/types.ts
|
|
@@ -132,6 +132,32 @@ const defined = defineTool({
|
|
|
132
132
|
|
|
133
133
|
The runtime resolves every declared secret on every call, for the call's tenant, in its env (`KINDGI_ENV`; in `kindgi dev`, `local`: the pack's `.env` and `.env.local`). It checks each value against its schema, and fails the call, naming the secret, when one is missing or doesn't match. Every declared secret is required, so in a runtime call `ctx.secrets` holds them all; it's optional in the type because a unit test builds its own context and passes `secrets: { CITATOR_KEY: '…' }`.
|
|
134
134
|
|
|
135
|
+
A value that differs per tenant, org or project but isn't secret (a base URL, a region, an account id) is an **env value**: declared in `needsSpec.env`, read from `ctx.env`:
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
const defined = defineTool({
|
|
139
|
+
// …id, description, version, input, output, effects…
|
|
140
|
+
needsSpec: {
|
|
141
|
+
env: {
|
|
142
|
+
ORDERS_BASE_URL: { type: 'string', pattern: '^https://' },
|
|
143
|
+
ORDERS_REGION: { type: 'string', enum: ['eu', 'us'], default: 'eu' },
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
handler: async ({ orderId }, ctx) => ({
|
|
147
|
+
url: `${ctx.env?.ORDERS_BASE_URL}/${ctx.env?.ORDERS_REGION}/orders/${orderId}`,
|
|
148
|
+
}),
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- **Which value a call gets:** its project's, else its org's, else the tenant's, in the runtime's env; a schema `default` makes a name optional. The values a call used are recorded with it, so a retry or a resume sees the same ones.
|
|
153
|
+
- **Setting them:** `kindgi env set ORDERS_REGION us --scope=project:<project-id> --env=local` (or `--scope=tenant`, for every project). Changing a value that's already set takes `--force`.
|
|
154
|
+
- **A declared value nobody set** stops the call before the tool runs. For a tool `acme-orders.needs-account` that declares `ACME_ACCOUNT_ID`, the message reads:
|
|
155
|
+
```text
|
|
156
|
+
precondition-failed: Tool "acme-orders.needs-account" was not run: env-value-missing: tool "acme-orders.needs-account" needs env value "ACME_ACCOUNT_ID" in env "local", and none is set for project e889c1f5-eae7-45dc-8669-5bd029a5d85c, its org, or the tenant. Set it: kindgi env set ACME_ACCOUNT_ID <value> --scope=project:e889c1f5-eae7-45dc-8669-5bd029a5d85c --env=local (or --scope=tenant, for every project)
|
|
157
|
+
```
|
|
158
|
+
- **Not secret:** env values are recorded with each run that uses them and shown in its journal. A credential is a secret (`needsSpec.secrets`), never an env value.
|
|
159
|
+
- **In a unit test:** pass `env: { … }` in the context `invokeTool` gets.
|
|
160
|
+
|
|
135
161
|
Everything else comes from the process environment: `process.env.CITATOR_URL`. The pack service runs with the pack's env files in `kindgi dev`, and with the container's environment in an image. Declare the names your code reads in `kindgi.config.ts`, `env: { required: ['CITATOR_URL'], optional: [...] }`: a deployment injects exactly those, a pack service missing a required one isn't ready and says which, and `kindgi dev` warns about it. Values per environment go in `environments.<name>.env`, secrets only as references.
|
|
136
162
|
|
|
137
163
|
## Declarative HTTP spec
|
|
@@ -14,9 +14,9 @@ description: >
|
|
|
14
14
|
diagnostic output into durable input for framework improvement.
|
|
15
15
|
type: core
|
|
16
16
|
library: "@kindgi/sdk"
|
|
17
|
-
version: "0.4.
|
|
18
|
-
sdk_version: "0.1.
|
|
19
|
-
pack_languages: [node, python]
|
|
17
|
+
version: "0.4.2"
|
|
18
|
+
sdk_version: "0.1.5-rc.0"
|
|
19
|
+
pack_languages: [node, python, java, scala]
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
# Capturing framework feedback
|
|
@@ -25,7 +25,8 @@ pack_languages: [node, python]
|
|
|
25
25
|
> (`@kindgi/cli`), not a global command. Run it through the project's
|
|
26
26
|
> package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
|
|
27
27
|
> `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
|
|
28
|
-
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
|
|
28
|
+
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`. A Java
|
|
29
|
+
> or Scala pack (`kindgi.config.json`) runs the CLI it pins: `./kindgiw …`.
|
|
29
30
|
> Commands below are written `kindgi …` for brevity.
|
|
30
31
|
|
|
31
32
|
You just spent time diagnosing a Kindgi-framework issue. That diagnostic
|