@kindgi/cli 0.0.0-bootstrap.0 → 0.1.1
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/LICENSE +201 -0
- package/README.md +738 -1
- package/dist/build/apt.d.ts +16 -0
- package/dist/build/apt.d.ts.map +1 -0
- package/dist/build/apt.js +50 -0
- package/dist/build/apt.js.map +1 -0
- package/dist/build/bundle.d.ts +48 -0
- package/dist/build/bundle.d.ts.map +1 -0
- package/dist/build/bundle.js +125 -0
- package/dist/build/bundle.js.map +1 -0
- package/dist/build/containerfile.d.ts +27 -0
- package/dist/build/containerfile.d.ts.map +1 -0
- package/dist/build/containerfile.js +197 -0
- package/dist/build/containerfile.js.map +1 -0
- package/dist/build/context-files.d.ts +24 -0
- package/dist/build/context-files.d.ts.map +1 -0
- package/dist/build/context-files.js +99 -0
- package/dist/build/context-files.js.map +1 -0
- package/dist/build/defaults.d.ts +66 -0
- package/dist/build/defaults.d.ts.map +1 -0
- package/dist/build/defaults.js +597 -0
- package/dist/build/defaults.js.map +1 -0
- package/dist/build/envelope.d.ts +72 -0
- package/dist/build/envelope.d.ts.map +1 -0
- package/dist/build/envelope.js +76 -0
- package/dist/build/envelope.js.map +1 -0
- package/dist/build/host-install.d.ts +100 -0
- package/dist/build/host-install.d.ts.map +1 -0
- package/dist/build/host-install.js +443 -0
- package/dist/build/host-install.js.map +1 -0
- package/dist/build/image-config.d.ts +32 -0
- package/dist/build/image-config.d.ts.map +1 -0
- package/dist/build/image-config.js +129 -0
- package/dist/build/image-config.js.map +1 -0
- package/dist/build/integrity.d.ts +51 -0
- package/dist/build/integrity.d.ts.map +1 -0
- package/dist/build/integrity.js +75 -0
- package/dist/build/integrity.js.map +1 -0
- package/dist/build/node-image.d.ts +18 -0
- package/dist/build/node-image.d.ts.map +1 -0
- package/dist/build/node-image.js +46 -0
- package/dist/build/node-image.js.map +1 -0
- package/dist/build/pack-root.d.ts +69 -0
- package/dist/build/pack-root.d.ts.map +1 -0
- package/dist/build/pack-root.js +102 -0
- package/dist/build/pack-root.js.map +1 -0
- package/dist/build/poetry-requirements.d.ts +5 -0
- package/dist/build/poetry-requirements.d.ts.map +1 -0
- package/dist/build/poetry-requirements.js +8 -0
- package/dist/build/poetry-requirements.js.map +1 -0
- package/dist/build/python-image.d.ts +40 -0
- package/dist/build/python-image.d.ts.map +1 -0
- package/dist/build/python-image.js +197 -0
- package/dist/build/python-image.js.map +1 -0
- package/dist/build/runners.d.ts +259 -0
- package/dist/build/runners.d.ts.map +1 -0
- package/dist/build/runners.js +4 -0
- package/dist/build/runners.js.map +1 -0
- package/dist/build/version-specifier.d.ts +2 -0
- package/dist/build/version-specifier.d.ts.map +1 -0
- package/dist/build/version-specifier.js +70 -0
- package/dist/build/version-specifier.js.map +1 -0
- package/dist/cli-package.d.ts +15 -0
- package/dist/cli-package.d.ts.map +1 -0
- package/dist/cli-package.js +37 -0
- package/dist/cli-package.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/adapters.d.ts +3 -0
- package/dist/commands/adapters.d.ts.map +1 -0
- package/dist/commands/adapters.js +148 -0
- package/dist/commands/adapters.js.map +1 -0
- package/dist/commands/agents.d.ts +3 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +82 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/approvals.d.ts +3 -0
- package/dist/commands/approvals.d.ts.map +1 -0
- package/dist/commands/approvals.js +92 -0
- package/dist/commands/approvals.js.map +1 -0
- package/dist/commands/artifacts.d.ts +3 -0
- package/dist/commands/artifacts.d.ts.map +1 -0
- package/dist/commands/artifacts.js +87 -0
- package/dist/commands/artifacts.js.map +1 -0
- package/dist/commands/auth.d.ts +25 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +283 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/build.d.ts +46 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +902 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/capabilities.d.ts +3 -0
- package/dist/commands/capabilities.d.ts.map +1 -0
- package/dist/commands/capabilities.js +38 -0
- package/dist/commands/capabilities.js.map +1 -0
- package/dist/commands/conversations.d.ts +3 -0
- package/dist/commands/conversations.d.ts.map +1 -0
- package/dist/commands/conversations.js +75 -0
- package/dist/commands/conversations.js.map +1 -0
- package/dist/commands/deploy.d.ts +7 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +697 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dev.d.ts +43 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +1110 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/env.d.ts +27 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +816 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/feedback.d.ts +33 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +374 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/flows.d.ts +3 -0
- package/dist/commands/flows.d.ts.map +1 -0
- package/dist/commands/flows.js +60 -0
- package/dist/commands/flows.js.map +1 -0
- package/dist/commands/guardrails.d.ts +3 -0
- package/dist/commands/guardrails.d.ts.map +1 -0
- package/dist/commands/guardrails.js +89 -0
- package/dist/commands/guardrails.js.map +1 -0
- package/dist/commands/health.d.ts +8 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +40 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/helpers.d.ts +48 -0
- package/dist/commands/helpers.d.ts.map +1 -0
- package/dist/commands/helpers.js +110 -0
- package/dist/commands/helpers.js.map +1 -0
- package/dist/commands/index.d.ts +7 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +90 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +46 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +454 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/key.d.ts +3 -0
- package/dist/commands/key.d.ts.map +1 -0
- package/dist/commands/key.js +322 -0
- package/dist/commands/key.js.map +1 -0
- package/dist/commands/mcp.d.ts +43 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +433 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/memory.d.ts +3 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +82 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/observations.d.ts +3 -0
- package/dist/commands/observations.d.ts.map +1 -0
- package/dist/commands/observations.js +27 -0
- package/dist/commands/observations.js.map +1 -0
- package/dist/commands/proposals.d.ts +3 -0
- package/dist/commands/proposals.d.ts.map +1 -0
- package/dist/commands/proposals.js +116 -0
- package/dist/commands/proposals.js.map +1 -0
- package/dist/commands/provenance.d.ts +3 -0
- package/dist/commands/provenance.d.ts.map +1 -0
- package/dist/commands/provenance.js +53 -0
- package/dist/commands/provenance.js.map +1 -0
- package/dist/commands/providers.d.ts +3 -0
- package/dist/commands/providers.d.ts.map +1 -0
- package/dist/commands/providers.js +212 -0
- package/dist/commands/providers.js.map +1 -0
- package/dist/commands/reviewers.d.ts +3 -0
- package/dist/commands/reviewers.d.ts.map +1 -0
- package/dist/commands/reviewers.js +78 -0
- package/dist/commands/reviewers.js.map +1 -0
- package/dist/commands/runs.d.ts +3 -0
- package/dist/commands/runs.d.ts.map +1 -0
- package/dist/commands/runs.js +223 -0
- package/dist/commands/runs.js.map +1 -0
- package/dist/commands/secrets.d.ts +18 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +702 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/skills.d.ts +64 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +430 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/test.d.ts +5 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +181 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/tokens.d.ts +3 -0
- package/dist/commands/tokens.d.ts.map +1 -0
- package/dist/commands/tokens.js +33 -0
- package/dist/commands/tokens.js.map +1 -0
- package/dist/commands/tools.d.ts +3 -0
- package/dist/commands/tools.d.ts.map +1 -0
- package/dist/commands/tools.js +162 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/types.d.ts +54 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +4 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/unwired.d.ts +22 -0
- package/dist/commands/unwired.d.ts.map +1 -0
- package/dist/commands/unwired.js +52 -0
- package/dist/commands/unwired.js.map +1 -0
- package/dist/commands/version.d.ts +8 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +41 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/config.d.ts +42 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +83 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +162 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +45 -0
- package/dist/context.js.map +1 -0
- package/dist/deploy/defaults.d.ts +14 -0
- package/dist/deploy/defaults.d.ts.map +1 -0
- package/dist/deploy/defaults.js +37 -0
- package/dist/deploy/defaults.js.map +1 -0
- package/dist/deploy/envelope-loader.d.ts +24 -0
- package/dist/deploy/envelope-loader.d.ts.map +1 -0
- package/dist/deploy/envelope-loader.js +141 -0
- package/dist/deploy/envelope-loader.js.map +1 -0
- package/dist/deploy/post.d.ts +48 -0
- package/dist/deploy/post.d.ts.map +1 -0
- package/dist/deploy/post.js +210 -0
- package/dist/deploy/post.js.map +1 -0
- package/dist/deploy/response.d.ts +42 -0
- package/dist/deploy/response.d.ts.map +1 -0
- package/dist/deploy/response.js +128 -0
- package/dist/deploy/response.js.map +1 -0
- package/dist/deploy/runners.d.ts +218 -0
- package/dist/deploy/runners.d.ts.map +1 -0
- package/dist/deploy/runners.js +4 -0
- package/dist/deploy/runners.js.map +1 -0
- package/dist/dev/bundler.d.ts +10 -0
- package/dist/dev/bundler.d.ts.map +1 -0
- package/dist/dev/bundler.js +235 -0
- package/dist/dev/bundler.js.map +1 -0
- package/dist/dev/defaults.d.ts +140 -0
- package/dist/dev/defaults.d.ts.map +1 -0
- package/dist/dev/defaults.js +709 -0
- package/dist/dev/defaults.js.map +1 -0
- package/dist/dev/dev-only-imports.d.ts +15 -0
- package/dist/dev/dev-only-imports.d.ts.map +1 -0
- package/dist/dev/dev-only-imports.js +57 -0
- package/dist/dev/dev-only-imports.js.map +1 -0
- package/dist/dev/docker-compose.dev.yml +68 -0
- package/dist/dev/index-child.d.ts +2 -0
- package/dist/dev/index-child.d.ts.map +1 -0
- package/dist/dev/index-child.js +53 -0
- package/dist/dev/index-child.js.map +1 -0
- package/dist/dev/pack-code.d.ts +36 -0
- package/dist/dev/pack-code.d.ts.map +1 -0
- package/dist/dev/pack-code.js +129 -0
- package/dist/dev/pack-code.js.map +1 -0
- package/dist/dev/pack-env.d.ts +13 -0
- package/dist/dev/pack-env.d.ts.map +1 -0
- package/dist/dev/pack-env.js +36 -0
- package/dist/dev/pack-env.js.map +1 -0
- package/dist/dev/pack-service.d.ts +40 -0
- package/dist/dev/pack-service.d.ts.map +1 -0
- package/dist/dev/pack-service.js +189 -0
- package/dist/dev/pack-service.js.map +1 -0
- package/dist/dev/paths.d.ts +22 -0
- package/dist/dev/paths.d.ts.map +1 -0
- package/dist/dev/paths.js +35 -0
- package/dist/dev/paths.js.map +1 -0
- package/dist/dev/postgres-container.d.ts +77 -0
- package/dist/dev/postgres-container.d.ts.map +1 -0
- package/dist/dev/postgres-container.js +346 -0
- package/dist/dev/postgres-container.js.map +1 -0
- package/dist/dev/python-builder.d.ts +16 -0
- package/dist/dev/python-builder.d.ts.map +1 -0
- package/dist/dev/python-builder.js +122 -0
- package/dist/dev/python-builder.js.map +1 -0
- package/dist/dev/register.d.ts +71 -0
- package/dist/dev/register.d.ts.map +1 -0
- package/dist/dev/register.js +54 -0
- package/dist/dev/register.js.map +1 -0
- package/dist/dev/runners.d.ts +312 -0
- package/dist/dev/runners.d.ts.map +1 -0
- package/dist/dev/runners.js +4 -0
- package/dist/dev/runners.js.map +1 -0
- package/dist/dev/runtime-container.d.ts +71 -0
- package/dist/dev/runtime-container.d.ts.map +1 -0
- package/dist/dev/runtime-container.js +173 -0
- package/dist/dev/runtime-container.js.map +1 -0
- package/dist/dev/runtime-env.d.ts +62 -0
- package/dist/dev/runtime-env.d.ts.map +1 -0
- package/dist/dev/runtime-env.js +100 -0
- package/dist/dev/runtime-env.js.map +1 -0
- package/dist/dev/runtime-image.d.ts +26 -0
- package/dist/dev/runtime-image.d.ts.map +1 -0
- package/dist/dev/runtime-image.js +44 -0
- package/dist/dev/runtime-image.js.map +1 -0
- package/dist/dev/runtime-registry.d.ts +73 -0
- package/dist/dev/runtime-registry.d.ts.map +1 -0
- package/dist/dev/runtime-registry.js +111 -0
- package/dist/dev/runtime-registry.js.map +1 -0
- package/dist/env/defaults.d.ts +3 -0
- package/dist/env/defaults.d.ts.map +1 -0
- package/dist/env/defaults.js +22 -0
- package/dist/env/defaults.js.map +1 -0
- package/dist/env/pack-env-plan.d.ts +70 -0
- package/dist/env/pack-env-plan.d.ts.map +1 -0
- package/dist/env/pack-env-plan.js +236 -0
- package/dist/env/pack-env-plan.js.map +1 -0
- package/dist/env/parser.d.ts +9 -0
- package/dist/env/parser.d.ts.map +1 -0
- package/dist/env/parser.js +11 -0
- package/dist/env/parser.js.map +1 -0
- package/dist/env/project-env.d.ts +34 -0
- package/dist/env/project-env.d.ts.map +1 -0
- package/dist/env/project-env.js +45 -0
- package/dist/env/project-env.js.map +1 -0
- package/dist/env/runners.d.ts +22 -0
- package/dist/env/runners.d.ts.map +1 -0
- package/dist/env/runners.js +4 -0
- package/dist/env/runners.js.map +1 -0
- package/dist/env/writer.d.ts +7 -0
- package/dist/env/writer.d.ts.map +1 -0
- package/dist/env/writer.js +9 -0
- package/dist/env/writer.js.map +1 -0
- package/dist/errors.d.ts +31 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +111 -0
- package/dist/errors.js.map +1 -0
- package/dist/help.d.ts +5 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +61 -0
- package/dist/help.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/init/augment-scaffolder.d.ts +86 -0
- package/dist/init/augment-scaffolder.d.ts.map +1 -0
- package/dist/init/augment-scaffolder.js +538 -0
- package/dist/init/augment-scaffolder.js.map +1 -0
- package/dist/init/dependency-specs.d.ts +58 -0
- package/dist/init/dependency-specs.d.ts.map +1 -0
- package/dist/init/dependency-specs.js +153 -0
- package/dist/init/dependency-specs.js.map +1 -0
- package/dist/init/gitignore-patcher.d.ts +23 -0
- package/dist/init/gitignore-patcher.d.ts.map +1 -0
- package/dist/init/gitignore-patcher.js +103 -0
- package/dist/init/gitignore-patcher.js.map +1 -0
- package/dist/init/mode-detect.d.ts +34 -0
- package/dist/init/mode-detect.d.ts.map +1 -0
- package/dist/init/mode-detect.js +115 -0
- package/dist/init/mode-detect.js.map +1 -0
- package/dist/init/package-json-patcher.d.ts +36 -0
- package/dist/init/package-json-patcher.d.ts.map +1 -0
- package/dist/init/package-json-patcher.js +128 -0
- package/dist/init/package-json-patcher.js.map +1 -0
- package/dist/init/pnpm-workspace-patcher.d.ts +55 -0
- package/dist/init/pnpm-workspace-patcher.d.ts.map +1 -0
- package/dist/init/pnpm-workspace-patcher.js +248 -0
- package/dist/init/pnpm-workspace-patcher.js.map +1 -0
- package/dist/init/pyproject-patcher.d.ts +56 -0
- package/dist/init/pyproject-patcher.d.ts.map +1 -0
- package/dist/init/pyproject-patcher.js +324 -0
- package/dist/init/pyproject-patcher.js.map +1 -0
- package/dist/init/python-augment.d.ts +22 -0
- package/dist/init/python-augment.d.ts.map +1 -0
- package/dist/init/python-augment.js +300 -0
- package/dist/init/python-augment.js.map +1 -0
- package/dist/init/template-files.d.ts +18 -0
- package/dist/init/template-files.d.ts.map +1 -0
- package/dist/init/template-files.js +53 -0
- package/dist/init/template-files.js.map +1 -0
- package/dist/key/defaults.d.ts +3 -0
- package/dist/key/defaults.d.ts.map +1 -0
- package/dist/key/defaults.js +60 -0
- package/dist/key/defaults.js.map +1 -0
- package/dist/key/fingerprint.d.ts +6 -0
- package/dist/key/fingerprint.d.ts.map +1 -0
- package/dist/key/fingerprint.js +25 -0
- package/dist/key/fingerprint.js.map +1 -0
- package/dist/key/paths.d.ts +30 -0
- package/dist/key/paths.d.ts.map +1 -0
- package/dist/key/paths.js +51 -0
- package/dist/key/paths.js.map +1 -0
- package/dist/key/runners.d.ts +60 -0
- package/dist/key/runners.d.ts.map +1 -0
- package/dist/key/runners.js +4 -0
- package/dist/key/runners.js.map +1 -0
- package/dist/main.d.ts +113 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +199 -0
- package/dist/main.js.map +1 -0
- package/dist/mcp/launcher.d.ts +143 -0
- package/dist/mcp/launcher.d.ts.map +1 -0
- package/dist/mcp/launcher.js +393 -0
- package/dist/mcp/launcher.js.map +1 -0
- package/dist/mcp/preset-loader.d.ts +29 -0
- package/dist/mcp/preset-loader.d.ts.map +1 -0
- package/dist/mcp/preset-loader.js +217 -0
- package/dist/mcp/preset-loader.js.map +1 -0
- package/dist/mcp/preset-types.d.ts +71 -0
- package/dist/mcp/preset-types.d.ts.map +1 -0
- package/dist/mcp/preset-types.js +4 -0
- package/dist/mcp/preset-types.js.map +1 -0
- package/dist/mcp/presets/README.md +68 -0
- package/dist/mcp/presets/postgres.json +15 -0
- package/dist/output.d.ts +26 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +46 -0
- package/dist/output.js.map +1 -0
- package/dist/pack-config.d.ts +37 -0
- package/dist/pack-config.d.ts.map +1 -0
- package/dist/pack-config.js +65 -0
- package/dist/pack-config.js.map +1 -0
- package/dist/package-manager.d.ts +33 -0
- package/dist/package-manager.d.ts.map +1 -0
- package/dist/package-manager.js +129 -0
- package/dist/package-manager.js.map +1 -0
- package/dist/parse.d.ts +88 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +100 -0
- package/dist/parse.js.map +1 -0
- package/dist/providers/preset-loader.d.ts +47 -0
- package/dist/providers/preset-loader.d.ts.map +1 -0
- package/dist/providers/preset-loader.js +107 -0
- package/dist/providers/preset-loader.js.map +1 -0
- package/dist/providers/presets/anthropic.json +47 -0
- package/dist/providers/presets/gemini.json +40 -0
- package/dist/reference.d.ts +28 -0
- package/dist/reference.d.ts.map +1 -0
- package/dist/reference.js +52 -0
- package/dist/reference.js.map +1 -0
- package/dist/sdk-package.d.ts +9 -0
- package/dist/sdk-package.d.ts.map +1 -0
- package/dist/sdk-package.js +20 -0
- package/dist/sdk-package.js.map +1 -0
- package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +252 -0
- package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +302 -0
- package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +297 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +289 -0
- package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +705 -0
- package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +298 -0
- package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +211 -0
- package/dist/sdk-skills/kindgi-getting-started/SKILL.md +189 -0
- package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +205 -0
- package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +325 -0
- package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +176 -0
- package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +305 -0
- package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +242 -0
- package/dist/stop-signal.d.ts +15 -0
- package/dist/stop-signal.d.ts.map +1 -0
- package/dist/stop-signal.js +16 -0
- package/dist/stop-signal.js.map +1 -0
- package/dist/templates/minimal/.nvmrc +1 -0
- package/dist/templates/minimal/AGENTS.md +23 -0
- package/dist/templates/minimal/README.md.tmpl +69 -0
- package/dist/templates/minimal/agents/.gitkeep +0 -0
- package/dist/templates/minimal/flows/.gitkeep +0 -0
- package/dist/templates/minimal/gitignore +8 -0
- package/dist/templates/minimal/guardrails/.gitkeep +0 -0
- package/dist/templates/minimal/kindgi.config.ts.tmpl +44 -0
- package/dist/templates/minimal/package.json.tmpl +25 -0
- package/dist/templates/minimal/pnpm-workspace.yaml +8 -0
- package/dist/templates/minimal/tools/.gitkeep +0 -0
- package/dist/templates/minimal/tsconfig.json.tmpl +27 -0
- package/dist/templates/minimal/vitest.config.ts.tmpl +14 -0
- package/dist/templates/python/AGENTS.md +30 -0
- package/dist/templates/python/README.md.tmpl +56 -0
- package/dist/templates/python/agents/echo_agent.py.tmpl +23 -0
- package/dist/templates/python/flows/echo_flow.py.tmpl +17 -0
- package/dist/templates/python/gitignore +9 -0
- package/dist/templates/python/guardrails/response_not_empty.py.tmpl +27 -0
- package/dist/templates/python/pyproject.toml.tmpl +42 -0
- package/dist/templates/python/tests/test_tools.py.tmpl +22 -0
- package/dist/templates/python/tools/echo.py.tmpl +27 -0
- package/dist/templates/python/tools/greet.py.tmpl +20 -0
- package/dist/templates/sample/.nvmrc +1 -0
- package/dist/templates/sample/AGENTS.md +23 -0
- package/dist/templates/sample/README.md.tmpl +85 -0
- package/dist/templates/sample/agents/echo-agent/index.ts.tmpl +34 -0
- package/dist/templates/sample/flows/echo-flow/index.ts.tmpl +59 -0
- package/dist/templates/sample/gitignore +8 -0
- package/dist/templates/sample/guardrails/response-not-empty/index.ts.tmpl +58 -0
- package/dist/templates/sample/kindgi.config.ts.tmpl +41 -0
- package/dist/templates/sample/package.json.tmpl +25 -0
- package/dist/templates/sample/pnpm-workspace.yaml +8 -0
- package/dist/templates/sample/tools/echo/index.test.ts.tmpl +31 -0
- package/dist/templates/sample/tools/echo/index.ts.tmpl +37 -0
- package/dist/templates/sample/tools/fetch-httpbin/index.ts.tmpl +60 -0
- package/dist/templates/sample/tools/greet/index.ts.tmpl +35 -0
- package/dist/templates/sample/tsconfig.json.tmpl +27 -0
- package/dist/templates/sample/vitest.config.ts.tmpl +14 -0
- package/dist/terminal-input.d.ts +17 -0
- package/dist/terminal-input.d.ts.map +1 -0
- package/dist/terminal-input.js +88 -0
- package/dist/terminal-input.js.map +1 -0
- package/dist/test/defaults.d.ts +3 -0
- package/dist/test/defaults.d.ts.map +1 -0
- package/dist/test/defaults.js +104 -0
- package/dist/test/defaults.js.map +1 -0
- package/dist/test/runners.d.ts +60 -0
- package/dist/test/runners.d.ts.map +1 -0
- package/dist/test/runners.js +4 -0
- package/dist/test/runners.js.map +1 -0
- package/dist/version-info.d.ts +9 -0
- package/dist/version-info.d.ts.map +1 -0
- package/dist/version-info.js +27 -0
- package/dist/version-info.js.map +1 -0
- package/dist/write-fully.d.ts +13 -0
- package/dist/write-fully.d.ts.map +1 -0
- package/dist/write-fully.js +17 -0
- package/dist/write-fully.js.map +1 -0
- package/package.json +63 -4
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kindgi-authoring-providers
|
|
3
|
+
description: >
|
|
4
|
+
Wire an LLM model provider so a Kindgi pack's agents
|
|
5
|
+
can actually call a real model. Covers four paths — hosted via
|
|
6
|
+
Anthropic native adapter, Gemini on Vertex AI (Google Application
|
|
7
|
+
Default Credentials, no API key), hosted via the OpenAI-compat adapter
|
|
8
|
+
(works with OpenAI + Groq + Together + Fireworks + OpenRouter +
|
|
9
|
+
Ollama + vLLM + any other OpenAI-compatible endpoint), and local
|
|
10
|
+
via the in-process ONNX adapter — plus the credential flow (in
|
|
11
|
+
`kindgi dev` the key lives in the project's env files — `.env`, then
|
|
12
|
+
`.env.local` — added by hand or with `kindgi secrets set`'s no-echo
|
|
13
|
+
prompt; the Kindgi runtime reads it through the dotenv secret binding
|
|
14
|
+
at agent-turn time). One provider row exposes one
|
|
15
|
+
connection with one or more models under `metadata.models[]`; the
|
|
16
|
+
router picks the (provider, model) tuple per invocation. Load this
|
|
17
|
+
when the user asks to "register a provider", "use Claude / GPT /
|
|
18
|
+
Groq / Llama / Gemini", "wire Anthropic", "use Vertex", "set up an API key for the agent",
|
|
19
|
+
or when an agent has been authored but the pack has no provider
|
|
20
|
+
registered yet. Authoring agents themselves is covered by
|
|
21
|
+
kindgi-authoring-agents; getting-started is covered by
|
|
22
|
+
kindgi-getting-started.
|
|
23
|
+
type: core
|
|
24
|
+
library: "@kindgi/sdk"
|
|
25
|
+
version: "0.9.2"
|
|
26
|
+
sdk_version: "0.1.1"
|
|
27
|
+
pack_languages: [node, python]
|
|
28
|
+
sources:
|
|
29
|
+
- packages/adapters/model-anthropic/src/provider.ts
|
|
30
|
+
- packages/adapters/model-gemini/src/provider.ts
|
|
31
|
+
- packages/adapters/model-openai-compat/src/provider.ts
|
|
32
|
+
- packages/adapters/model-in-process/src/provider.ts
|
|
33
|
+
- packages/api/src/routes/providers.ts
|
|
34
|
+
- packages/secrets-dotenv/src/index.ts
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# Wiring a model provider for a Kindgi pack
|
|
38
|
+
|
|
39
|
+
> **Running `kindgi`:** in a Node project the CLI is a devDependency
|
|
40
|
+
> (`@kindgi/cli`), not a global command. Run it through the project's
|
|
41
|
+
> package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
|
|
42
|
+
> `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
|
|
43
|
+
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
|
|
44
|
+
> Commands below are written `kindgi …` for brevity.
|
|
45
|
+
|
|
46
|
+
An **agent** is a versioned declaration; it needs a **provider** to run.
|
|
47
|
+
The provider is what turns the agent's messages into an LLM call.
|
|
48
|
+
`kindgi dev` ships with a stub `dev-echo` provider that only echoes
|
|
49
|
+
canned strings — fine for verifying the harness, useless for a real
|
|
50
|
+
agent turn. It is a **fallback** provider: it answers only when no other
|
|
51
|
+
registered provider fits the agent, so registering a real one takes over
|
|
52
|
+
with nothing else to change. This skill covers wiring a real one.
|
|
53
|
+
|
|
54
|
+
## Mental model
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Project .env / .env.local dotenv SecretBinding runtime ProviderRegistry
|
|
58
|
+
───────────────────────── ───────────────────── ────────────────────────
|
|
59
|
+
ANTHROPIC_API_KEY=sk-... → resolve('local', hydrated per tenant on first
|
|
60
|
+
'ANTHROPIC_API_KEY') access; each row =
|
|
61
|
+
{ metadata, adapter_id,
|
|
62
|
+
secret_ref?,
|
|
63
|
+
adapter_config? }
|
|
64
|
+
│ │
|
|
65
|
+
▼ ▼
|
|
66
|
+
adapter factory ──── resolves apiKey lazily via closure
|
|
67
|
+
│
|
|
68
|
+
▼
|
|
69
|
+
ModelProvider ────── router picks a (provider, model)
|
|
70
|
+
tuple when an agent's
|
|
71
|
+
capabilities.needs matches
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Three moving parts:
|
|
75
|
+
1. **API key on disk** — in `kindgi dev` (environment `local`) the dotenv
|
|
76
|
+
secret binding reads the project's own env files: `.env`, then
|
|
77
|
+
`.env.local` on top (change the list with `dev.envFiles` in
|
|
78
|
+
`kindgi.config.ts`, or `envFiles` under `[tool.kindgi.dev]` in a Python
|
|
79
|
+
pack's `pyproject.toml`). A key already in the app's `.env` just works.
|
|
80
|
+
`kindgi secrets set` (interactive, no-echo) writes `.env.local`. For
|
|
81
|
+
non-sensitive values (log levels, region names, feature flags),
|
|
82
|
+
`kindgi env set NAME VALUE --env=local` writes the same file with a
|
|
83
|
+
positional value — never route real secrets through it. `KINDGI_*`
|
|
84
|
+
names configure Kindgi itself and are never resolvable as secrets.
|
|
85
|
+
2. **Provider registration** — `kindgi providers register --spec=@provider.json` (`POST /v1/providers`)
|
|
86
|
+
3. **Agent's `capabilities.needs`** — matched at the (provider, model) tuple level at turn time
|
|
87
|
+
|
|
88
|
+
**Registration body:** `{ metadata, adapter_id, secret_ref?, adapter_config? }`.
|
|
89
|
+
`secret_ref` points at the credential; `adapter_config` holds the adapter's
|
|
90
|
+
non-secret connection settings (a cloud project, a base URL) as flat string,
|
|
91
|
+
number or boolean values. Both are stored with the provider and handed to the
|
|
92
|
+
runtime; `kindgi providers list` / `get` show only `metadata`. Never put a
|
|
93
|
+
credential in `adapter_config`.
|
|
94
|
+
|
|
95
|
+
**Shape rule:** `ProviderMetadata.id` names the CONNECTION (e.g. `anthropic`,
|
|
96
|
+
`groq`, `local-onnx`); per-model fields (`name`, `contextWindow`, `cost`,
|
|
97
|
+
`features`) live inside `metadata.models[]`. One row can expose many models
|
|
98
|
+
under the same API key.
|
|
99
|
+
|
|
100
|
+
**Fallbacks:** `"fallback": true` in `metadata` makes a provider a
|
|
101
|
+
fallback — the router considers it only when no other provider satisfies
|
|
102
|
+
the agent's capability, and the turn's result then carries a
|
|
103
|
+
`fallback-provider` warning. `dev-echo` is one; a cheap local model can be
|
|
104
|
+
yours.
|
|
105
|
+
|
|
106
|
+
## Path A — Hosted, native Anthropic
|
|
107
|
+
|
|
108
|
+
Best fidelity to Anthropic's API (prompt caching, latest models, tool
|
|
109
|
+
use, structured output). Requires an `ANTHROPIC_API_KEY`.
|
|
110
|
+
|
|
111
|
+
**Step 1 — set the key:**
|
|
112
|
+
```sh
|
|
113
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant
|
|
114
|
+
# Prompts interactively (echo disabled). Paste the key, press enter.
|
|
115
|
+
```
|
|
116
|
+
Writes to `.env.local` at the pack root via the dotenv secret binding —
|
|
117
|
+
or add `ANTHROPIC_API_KEY=…` to `.env` / `.env.local` yourself; `kindgi
|
|
118
|
+
dev` reads both. If the pack lives inside an app whose `.env` already
|
|
119
|
+
has the key, there is nothing to do. Keep env files gitignored. For pipelines/CI, pipe the value with
|
|
120
|
+
`echo -n "$KEY" | kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant --from-stdin`,
|
|
121
|
+
or read from a mode-0600 file with `--from-file <path>`. Never pass a
|
|
122
|
+
credential on argv.
|
|
123
|
+
|
|
124
|
+
**Step 2 — register it, from the preset:**
|
|
125
|
+
```sh
|
|
126
|
+
kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
|
|
127
|
+
kindgi providers register --preset=anthropic --models=claude-haiku-4-5 # just one
|
|
128
|
+
```
|
|
129
|
+
The preset carries the models, context windows and current prices
|
|
130
|
+
(`kindgi providers presets` lists the presets and when their prices were
|
|
131
|
+
checked). In a pack it refuses until the key is in the pack's env files —
|
|
132
|
+
step 1. That's all for Anthropic; go to step 4. The rest of this path is
|
|
133
|
+
the same registration by hand, for a spec of your own.
|
|
134
|
+
|
|
135
|
+
**Step 2 (by hand) — write `provider.json`** at the pack root. One connection,
|
|
136
|
+
three models — matches how the Anthropic SDK actually works (the API
|
|
137
|
+
key is per-vendor; the model is per-call):
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"metadata": {
|
|
141
|
+
"id": "anthropic",
|
|
142
|
+
"region": "us-east-1",
|
|
143
|
+
"models": [
|
|
144
|
+
{
|
|
145
|
+
"name": "claude-opus-5-5",
|
|
146
|
+
"contextWindow": 1000000,
|
|
147
|
+
"features": ["tool-use", "structured-output"],
|
|
148
|
+
"cost": {
|
|
149
|
+
"promptUsdPer1kTokens": 0.004,
|
|
150
|
+
"completionUsdPer1kTokens": 0.02
|
|
151
|
+
},
|
|
152
|
+
"description": "Most capable Opus — long-running agentic and knowledge work."
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "claude-sonnet-5-5",
|
|
156
|
+
"contextWindow": 1000000,
|
|
157
|
+
"features": ["tool-use", "structured-output"],
|
|
158
|
+
"cost": {
|
|
159
|
+
"promptUsdPer1kTokens": 0.002,
|
|
160
|
+
"completionUsdPer1kTokens": 0.01
|
|
161
|
+
},
|
|
162
|
+
"description": "Balanced performance/cost."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "claude-haiku-4-5",
|
|
166
|
+
"contextWindow": 200000,
|
|
167
|
+
"features": ["tool-use"],
|
|
168
|
+
"cost": {
|
|
169
|
+
"promptUsdPer1kTokens": 0.001,
|
|
170
|
+
"completionUsdPer1kTokens": 0.005
|
|
171
|
+
},
|
|
172
|
+
"description": "Fastest and cheapest — routing, classification, simple calls."
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"description": "Anthropic Claude via native adapter."
|
|
176
|
+
},
|
|
177
|
+
"adapter_id": "@kindgi/adapter-model-anthropic",
|
|
178
|
+
"secret_ref": { "envName": "local", "name": "ANTHROPIC_API_KEY" }
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
> ⚠ **Units gotcha:** the field is `promptUsdPer1kTokens` (per THOUSAND
|
|
183
|
+
> tokens), but every vendor pricing page (Anthropic, OpenAI, Groq)
|
|
184
|
+
> advertises rates PER MILLION. Divide by 1000 before you paste. Sonnet
|
|
185
|
+
> 5.5 is "$2 / MTok input" → `0.002`, "$10 / MTok output" → `0.01`. A
|
|
186
|
+
> misplaced factor makes real cost look 1000× real; a $0.15 budget
|
|
187
|
+
> blows in the first turn.
|
|
188
|
+
|
|
189
|
+
**Step 3 — register:**
|
|
190
|
+
```sh
|
|
191
|
+
kindgi providers register --spec=@provider.json
|
|
192
|
+
```
|
|
193
|
+
Returns `{providerId: "anthropic"}` on success. Idempotent in the sense
|
|
194
|
+
that re-registering the same id returns `provider-already-registered`;
|
|
195
|
+
unregister first if the config actually changed.
|
|
196
|
+
|
|
197
|
+
**Step 4 — verify:**
|
|
198
|
+
```sh
|
|
199
|
+
kindgi providers list
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Step 5 — run:** any agent whose `capabilities: [{needs: [{feature:
|
|
203
|
+
'tool-use'}]}]` is now routed to a (`anthropic`, `<one of the models>`)
|
|
204
|
+
tuple. The router picks by score; prefer a provider with
|
|
205
|
+
`preferredProvider` and pin a model with a `models: { allow: [...] }`
|
|
206
|
+
capability requirement (see "How the router picks…" below).
|
|
207
|
+
|
|
208
|
+
Nothing to switch off: `dev-echo` is a fallback, so the new provider
|
|
209
|
+
answers every agent it satisfies. A turn that still lands on dev-echo
|
|
210
|
+
carries a `fallback-provider` warning — see mistake 9.
|
|
211
|
+
|
|
212
|
+
## Path B — Hosted via OpenAI-compat
|
|
213
|
+
|
|
214
|
+
Works with **any** OpenAI-compatible endpoint. Same adapter, different
|
|
215
|
+
`baseURL`:
|
|
216
|
+
|
|
217
|
+
| Provider | baseURL |
|
|
218
|
+
|---|---|
|
|
219
|
+
| OpenAI | `https://api.openai.com/v1` |
|
|
220
|
+
| Groq | `https://api.groq.com/openai/v1` |
|
|
221
|
+
| Together | `https://api.together.xyz/v1` |
|
|
222
|
+
| Fireworks | `https://api.fireworks.ai/inference/v1` |
|
|
223
|
+
| OpenRouter | `https://openrouter.ai/api/v1` |
|
|
224
|
+
| DeepSeek | `https://api.deepseek.com/v1` |
|
|
225
|
+
| LiteLLM proxy | `http://localhost:4000/v1` |
|
|
226
|
+
|
|
227
|
+
The connection carries the `baseURL` (in `adapter_config`);
|
|
228
|
+
each endpoint is a separate provider row because each has its own API
|
|
229
|
+
key + region. Within one row, list every model that endpoint exposes.
|
|
230
|
+
|
|
231
|
+
**Step 1 — set the key:**
|
|
232
|
+
```sh
|
|
233
|
+
kindgi secrets set GROQ_API_KEY --env=local --scope=tenant
|
|
234
|
+
# Interactive prompt; paste and enter.
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Step 2 — `provider.json`** (Groq, exposing two Llama variants):
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"metadata": {
|
|
241
|
+
"id": "groq",
|
|
242
|
+
"region": "us-central-1",
|
|
243
|
+
"models": [
|
|
244
|
+
{
|
|
245
|
+
"name": "llama-3.3-70b-versatile",
|
|
246
|
+
"contextWindow": 128000,
|
|
247
|
+
"features": ["tool-use"],
|
|
248
|
+
"cost": {
|
|
249
|
+
"promptUsdPer1kTokens": 0.00059,
|
|
250
|
+
"completionUsdPer1kTokens": 0.00079
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "llama-3.1-8b-instant",
|
|
255
|
+
"contextWindow": 128000,
|
|
256
|
+
"features": ["tool-use"],
|
|
257
|
+
"cost": {
|
|
258
|
+
"promptUsdPer1kTokens": 0.00005,
|
|
259
|
+
"completionUsdPer1kTokens": 0.00008
|
|
260
|
+
},
|
|
261
|
+
"description": "Fast + cheap tier — routing, classification."
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"description": "Groq-hosted Llama via OpenAI-compat."
|
|
265
|
+
},
|
|
266
|
+
"adapter_id": "@kindgi/adapter-model-openai-compat",
|
|
267
|
+
"secret_ref": { "envName": "local", "name": "GROQ_API_KEY" },
|
|
268
|
+
"adapter_config": { "baseURL": "https://api.groq.com/openai/v1" }
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Steps 3–5** same as Path A.
|
|
273
|
+
|
|
274
|
+
## Path C — Local via in-process ONNX
|
|
275
|
+
|
|
276
|
+
> ⚠️ **Dev-only.** The in-process ONNX adapter writes weights to
|
|
277
|
+
> `~/.cache/huggingface/hub/` — a per-machine cache with no production
|
|
278
|
+
> recipe (no volume-mount recipe, no image-bake pattern, no offline
|
|
279
|
+
> mode, no SHA pinning). Good for local dev, smoke tests, and CI
|
|
280
|
+
> runners that keep the same disk between runs. **Do not ship packs
|
|
281
|
+
> that rely on this adapter to production.** Use hosted providers
|
|
282
|
+
> (Path A) or Ollama (Path B) instead.
|
|
283
|
+
|
|
284
|
+
No API key. No network. Bundled with the framework — the adapter ships
|
|
285
|
+
`smollm2-360m` by default (~273 MB weights, cached at
|
|
286
|
+
`~/.cache/huggingface/hub/models--HuggingFaceTB--SmolLM2-360M-Instruct/`
|
|
287
|
+
after `kindgi adapters prepare`).
|
|
288
|
+
|
|
289
|
+
**Not for reasoning-heavy agents.** SmolLM 360M is fine for smoke
|
|
290
|
+
tests, canary agents, dev/CI. Real work needs a hosted model or a
|
|
291
|
+
larger local model via Ollama (Path B).
|
|
292
|
+
|
|
293
|
+
**`provider.json`** (single-model):
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"metadata": {
|
|
297
|
+
"id": "local-onnx",
|
|
298
|
+
"region": "in-process",
|
|
299
|
+
"models": [
|
|
300
|
+
{
|
|
301
|
+
"name": "smollm2-360m",
|
|
302
|
+
"contextWindow": 2048,
|
|
303
|
+
"features": ["tool-use"],
|
|
304
|
+
"cost": {
|
|
305
|
+
"promptUsdPer1kTokens": 0,
|
|
306
|
+
"completionUsdPer1kTokens": 0
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"description": "Local ONNX smollm2-360m — dev + smoke tests."
|
|
311
|
+
},
|
|
312
|
+
"adapter_id": "@kindgi/adapter-model-in-process"
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Multi-model variant — the in-process adapter loads each pipeline lazily,
|
|
317
|
+
so listing several models keeps memory low until they're actually
|
|
318
|
+
invoked:
|
|
319
|
+
|
|
320
|
+
```json
|
|
321
|
+
{
|
|
322
|
+
"metadata": {
|
|
323
|
+
"id": "local-onnx",
|
|
324
|
+
"region": "in-process",
|
|
325
|
+
"models": [
|
|
326
|
+
{ "name": "smollm2-135m", "contextWindow": 2048, "features": [],
|
|
327
|
+
"cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } },
|
|
328
|
+
{ "name": "smollm2-360m", "contextWindow": 2048, "features": ["tool-use"],
|
|
329
|
+
"cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } },
|
|
330
|
+
{ "name": "qwen3-0.6b", "contextWindow": 32768, "features": ["tool-use", "long-context"],
|
|
331
|
+
"cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } }
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"adapter_id": "@kindgi/adapter-model-in-process"
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
No `secret_ref` needed. Register + **prepare** + run:
|
|
339
|
+
```sh
|
|
340
|
+
kindgi providers register --spec=@provider.json
|
|
341
|
+
kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-360m
|
|
342
|
+
kindgi runs start --agent=<agent-id> --input='{...}'
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Always `prepare` before `runs start`.** It downloads the ONNX weights
|
|
346
|
+
(~273 MB for smollm2-360m, ~30s on a typical connection) and streams
|
|
347
|
+
per-file progress. Skipping it works — the first model call downloads
|
|
348
|
+
lazily — but that stalls a request path on a multi-hundred-MB
|
|
349
|
+
fetch with no observability, which is bad in dev and unacceptable in
|
|
350
|
+
production. Skip only for scripted teardown where the model is already
|
|
351
|
+
cached (`~/.cache/huggingface/hub/models--HuggingFaceTB--SmolLM2-360M-Instruct/`).
|
|
352
|
+
|
|
353
|
+
`prepare` is idempotent: subsequent invocations are cache hits and
|
|
354
|
+
return almost instantly, so put it in every `kindgi dev` boot script.
|
|
355
|
+
|
|
356
|
+
Multi-model providers: prepare each model separately.
|
|
357
|
+
```sh
|
|
358
|
+
kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-135m
|
|
359
|
+
kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-360m
|
|
360
|
+
kindgi adapters prepare @kindgi/adapter-model-in-process --model=qwen3-0.6b
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Local via Ollama (via Path B)
|
|
364
|
+
|
|
365
|
+
For bigger local models — Ollama runs them, we point at the OpenAI-compat
|
|
366
|
+
endpoint it exposes:
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"metadata": {
|
|
371
|
+
"id": "ollama",
|
|
372
|
+
"region": "local",
|
|
373
|
+
"models": [
|
|
374
|
+
{
|
|
375
|
+
"name": "llama3",
|
|
376
|
+
"contextWindow": 8192,
|
|
377
|
+
"features": ["tool-use"],
|
|
378
|
+
"cost": {
|
|
379
|
+
"promptUsdPer1kTokens": 0,
|
|
380
|
+
"completionUsdPer1kTokens": 0
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
"description": "Local Ollama Llama 3 8B."
|
|
385
|
+
},
|
|
386
|
+
"adapter_id": "@kindgi/adapter-model-openai-compat",
|
|
387
|
+
"adapter_config": { "baseURL": "http://localhost:11434/v1" }
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Ollama doesn't check a key, so the row has no `secret_ref`: without one,
|
|
392
|
+
the adapter sends a placeholder key, as local servers expect.
|
|
393
|
+
|
|
394
|
+
**Any model you serve yourself** (Ollama, vLLM, llama.cpp's
|
|
395
|
+
`llama-server`, LM Studio) must do two things for an agent:
|
|
396
|
+
- **Call tools in the OpenAI format.** Serve it with tool calling on
|
|
397
|
+
(vLLM `--enable-auto-tool-choice --tool-call-parser <the model's>`,
|
|
398
|
+
`llama-server --jinja`), and pick a model that supports tools.
|
|
399
|
+
- **Answer without its thinking.** A thinking model (Qwen and others)
|
|
400
|
+
writes its reasoning first unless asked not to, and a typed answer then
|
|
401
|
+
isn't JSON (`output-schema-violation`). Turn thinking off on the server
|
|
402
|
+
(vLLM `--default-chat-template-kwargs '{"enable_thinking": false}'`,
|
|
403
|
+
`llama-server --reasoning off`), or, for a shared server you can't
|
|
404
|
+
reconfigure, per request from the provider row:
|
|
405
|
+
`"extraBody.chat_template_kwargs.enable_thinking": false` in
|
|
406
|
+
`adapter_config`. `adapter_config` is flat: one key per request field,
|
|
407
|
+
dots nest.
|
|
408
|
+
|
|
409
|
+
Assumes Ollama is installed + the model is pulled (`ollama pull llama3`).
|
|
410
|
+
See ollama.com for install / hardware requirements — Llama 3 8B needs
|
|
411
|
+
~8GB RAM, Llama 3 70B needs ~48GB VRAM or ~140GB RAM.
|
|
412
|
+
|
|
413
|
+
## Path D — Gemini on Vertex AI
|
|
414
|
+
|
|
415
|
+
Gemini through Google Cloud's Vertex AI. No API key: the adapter uses
|
|
416
|
+
**Google Application Default Credentials** — your `gcloud` login on a
|
|
417
|
+
laptop, the attached service account on Cloud Run (and other Google Cloud
|
|
418
|
+
runtimes). The same registration works in both.
|
|
419
|
+
|
|
420
|
+
**Step 1 — credentials:**
|
|
421
|
+
```sh
|
|
422
|
+
gcloud auth application-default login # once per laptop
|
|
423
|
+
```
|
|
424
|
+
The account (locally) or the service account (deployed) needs the
|
|
425
|
+
**Vertex AI User** role (`roles/aiplatform.user`) in the project. Running
|
|
426
|
+
outside Google Cloud: put a service-account key (its JSON) in a secret
|
|
427
|
+
(`kindgi secrets set GEMINI_SA_KEY --env=local --scope=tenant`) and add
|
|
428
|
+
`"secret_ref": { "envName": "local", "name": "GEMINI_SA_KEY" }`.
|
|
429
|
+
|
|
430
|
+
**Step 2 — `provider.json`:**
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"metadata": {
|
|
434
|
+
"id": "gemini",
|
|
435
|
+
"region": "global",
|
|
436
|
+
"models": [
|
|
437
|
+
{
|
|
438
|
+
"name": "gemini-2.5-pro",
|
|
439
|
+
"contextWindow": 1048576,
|
|
440
|
+
"features": ["tool-use"],
|
|
441
|
+
"maxOutputTokens": 8192,
|
|
442
|
+
"cost": {
|
|
443
|
+
"promptUsdPer1kTokens": 0.00125,
|
|
444
|
+
"completionUsdPer1kTokens": 0.01,
|
|
445
|
+
"longContext": {
|
|
446
|
+
"thresholdTokens": 200000,
|
|
447
|
+
"promptUsdPer1kTokens": 0.0025,
|
|
448
|
+
"completionUsdPer1kTokens": 0.015
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "gemini-2.5-flash",
|
|
454
|
+
"contextWindow": 1048576,
|
|
455
|
+
"features": ["tool-use"],
|
|
456
|
+
"cost": { "promptUsdPer1kTokens": 0.0003, "completionUsdPer1kTokens": 0.0025 }
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
"adapter_id": "@kindgi/adapter-model-gemini",
|
|
461
|
+
"adapter_config": { "project": "<your-gcp-project-id>" }
|
|
462
|
+
}
|
|
463
|
+
```
|
|
464
|
+
- `adapter_config.project` is required: the Google Cloud project Vertex
|
|
465
|
+
bills and authorises against.
|
|
466
|
+
- `metadata.region` is the Vertex location: `global`, or a region such as
|
|
467
|
+
`us-central1` or `northamerica-northeast1` when data must stay in one
|
|
468
|
+
place. `unspecified` means `global`. Different locations are different
|
|
469
|
+
provider rows.
|
|
470
|
+
- Rates are per 1K tokens, from Google's published pricing; check them
|
|
471
|
+
before relying on budgets. Thinking tokens bill as output.
|
|
472
|
+
`longContext` switches the whole call to the higher rates past the
|
|
473
|
+
threshold; `cachedPromptMultiplier` (default 0.25) prices cached
|
|
474
|
+
prompt tokens.
|
|
475
|
+
|
|
476
|
+
**Step 3 — register and check:**
|
|
477
|
+
```sh
|
|
478
|
+
kindgi providers register --spec=@provider.json
|
|
479
|
+
kindgi providers list
|
|
480
|
+
```
|
|
481
|
+
Or skip step 2: `kindgi providers register --preset=gemini --project=<your-gcp-project-id>`
|
|
482
|
+
registers both models above.
|
|
483
|
+
Then pin it from an agent with `preferredProvider: 'gemini'` (and a model
|
|
484
|
+
with `preferredModel`; in Python, `preferred_provider="gemini"` and
|
|
485
|
+
`preferred_model=…`), or let the router pick by capability.
|
|
486
|
+
|
|
487
|
+
## How the router picks between multiple providers + models
|
|
488
|
+
|
|
489
|
+
When an agent turn fires, the router expands each registered provider
|
|
490
|
+
into one entry per model (`metadata.models[]`), filters the resulting
|
|
491
|
+
(provider, model) tuples against the agent's `capabilities.needs` (and
|
|
492
|
+
tenant policy), then sorts survivors in this order:
|
|
493
|
+
|
|
494
|
+
1. **Preferred provider / model.** Tuples matching the agent's
|
|
495
|
+
`preferredProvider` and `preferredModel` are promoted to the front.
|
|
496
|
+
- Both set → promote the exact tuple.
|
|
497
|
+
- Only `preferredModel` set → promote any provider exposing that model.
|
|
498
|
+
- Only `preferredProvider` set → promote every model of that provider.
|
|
499
|
+
`defineAgent` takes both (`preferredProvider`, `preferredModel`), and
|
|
500
|
+
so does a Python `Agent` (`preferred_provider=`, `preferred_model=`).
|
|
501
|
+
2. **`capability.prefer[]` weights.** If the agent's capability
|
|
502
|
+
declares `prefer: [{feature: 'thinking', weight: 3}, ...]`, tuples
|
|
503
|
+
with matching model features (or provider attributes) get higher
|
|
504
|
+
scores. Sorted by summed score, descending.
|
|
505
|
+
3. **Deterministic lexical tiebreak.** When scores tie, tuples sort by
|
|
506
|
+
`(providerId, modelName)` alphabetically — replay-safe and stable.
|
|
507
|
+
|
|
508
|
+
**Practical rule:** preferences are soft — they rank, they don't
|
|
509
|
+
exclude. To guarantee which model runs, make it a hard requirement in
|
|
510
|
+
the capability: `{ models: { allow: ['claude-sonnet-5-5'] } }` (and
|
|
511
|
+
`{ providers: { allow: ['anthropic'] } }` to pin the connection). If no
|
|
512
|
+
registered tuple satisfies it, the turn fails with
|
|
513
|
+
`capability-routing-failed` instead of silently using another model.
|
|
514
|
+
|
|
515
|
+
**A/B testing a specific agent across models within one Anthropic
|
|
516
|
+
registration:**
|
|
517
|
+
|
|
518
|
+
```ts
|
|
519
|
+
// agents/weather-agent-sonnet/index.ts
|
|
520
|
+
defineAgent({
|
|
521
|
+
id: 'my-pack.weather-agent-sonnet',
|
|
522
|
+
// …same name, instructions, tools, retrieval and guardrails as the opus variant
|
|
523
|
+
capabilities: [
|
|
524
|
+
{ needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-sonnet-5-5'] } }] },
|
|
525
|
+
],
|
|
526
|
+
preferredProvider: 'anthropic',
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
// agents/weather-agent-opus/index.ts
|
|
530
|
+
defineAgent({
|
|
531
|
+
id: 'my-pack.weather-agent-opus',
|
|
532
|
+
// …
|
|
533
|
+
capabilities: [
|
|
534
|
+
{ needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-opus-5-5'] } }] },
|
|
535
|
+
],
|
|
536
|
+
preferredProvider: 'anthropic',
|
|
537
|
+
});
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
The same pair in a Python pack (`kindgi.Agent`; module-level, one file each):
|
|
541
|
+
|
|
542
|
+
```python
|
|
543
|
+
# agents/weather_agent_sonnet.py
|
|
544
|
+
weather_agent_sonnet = Agent(
|
|
545
|
+
id="my-pack.weather-agent-sonnet",
|
|
546
|
+
# …same version, name, instructions, tools and guardrails as the opus variant
|
|
547
|
+
capabilities=[
|
|
548
|
+
{"needs": [{"feature": "tool-use"}, {"models": {"allow": ["claude-sonnet-5-5"]}}]},
|
|
549
|
+
],
|
|
550
|
+
preferred_provider="anthropic",
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
# agents/weather_agent_opus.py
|
|
554
|
+
weather_agent_opus = Agent(
|
|
555
|
+
id="my-pack.weather-agent-opus",
|
|
556
|
+
# …
|
|
557
|
+
capabilities=[
|
|
558
|
+
{"needs": [{"feature": "tool-use"}, {"models": {"allow": ["claude-opus-5-5"]}}]},
|
|
559
|
+
],
|
|
560
|
+
preferred_provider="anthropic",
|
|
561
|
+
)
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
Both agents share the tool + instructions; only the pinned model
|
|
565
|
+
differs. One Anthropic provider registration + one API key covers
|
|
566
|
+
both. Register the provider once, then invoke each agent to compare
|
|
567
|
+
outputs on the same inputs.
|
|
568
|
+
|
|
569
|
+
**A/B testing across vendors:**
|
|
570
|
+
|
|
571
|
+
```ts
|
|
572
|
+
defineAgent({
|
|
573
|
+
id: 'my-pack.weather-agent-groq',
|
|
574
|
+
// …
|
|
575
|
+
capabilities: [
|
|
576
|
+
{ needs: [{ feature: 'tool-use' }, { models: { allow: ['llama-3.3-70b-versatile'] } }] },
|
|
577
|
+
],
|
|
578
|
+
preferredProvider: 'groq',
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
defineAgent({
|
|
582
|
+
id: 'my-pack.weather-agent-anthropic',
|
|
583
|
+
// …
|
|
584
|
+
capabilities: [
|
|
585
|
+
{ needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-sonnet-5-5'] } }] },
|
|
586
|
+
],
|
|
587
|
+
preferredProvider: 'anthropic',
|
|
588
|
+
});
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
## Common mistakes
|
|
592
|
+
|
|
593
|
+
0. **`adapter_id` uses the short name.** The `adapter_id` field must
|
|
594
|
+
be the FULL npm package name of the adapter — `"@kindgi/adapter-model-anthropic"`,
|
|
595
|
+
NOT `"anthropic"`. Adapters are registered with the runtime under
|
|
596
|
+
their full package names, and a short name matches none of them, so
|
|
597
|
+
the registration fails. The model adapters are
|
|
598
|
+
`@kindgi/adapter-model-anthropic`, `@kindgi/adapter-model-gemini`,
|
|
599
|
+
`@kindgi/adapter-model-openai-compat` and
|
|
600
|
+
`@kindgi/adapter-model-in-process`; `kindgi providers presets` shows
|
|
601
|
+
the id each preset uses.
|
|
602
|
+
|
|
603
|
+
1. **`envName` mismatch between the setter (`kindgi secrets set` or `env set`) and `provider.json`.**
|
|
604
|
+
Both writers use `--env=<name>` (default `local`): `local` is the
|
|
605
|
+
project's env files (`.env`, `.env.local`), any other name is
|
|
606
|
+
`.env.<envName>`. If your `provider.json` has
|
|
607
|
+
`"secret_ref": {"envName": "production", ...}`, the SecretBinding
|
|
608
|
+
refuses to cross-resolve — you get `secret-not-found` at agent-turn
|
|
609
|
+
time. Match them.
|
|
610
|
+
|
|
611
|
+
2. **Missing `features` on the model.** Agent declares
|
|
612
|
+
`capabilities: [{needs: [{feature: 'tool-use'}]}]`; at least one
|
|
613
|
+
model inside `metadata.models[]` must list `"features":
|
|
614
|
+
["tool-use"]` or the router filters every tuple out. If `kindgi
|
|
615
|
+
runs start` returns "no provider satisfies capability", check the
|
|
616
|
+
per-model `features` list — not a provider-level field anymore.
|
|
617
|
+
|
|
618
|
+
3. **Empty `models[]`.** Registration rejects with `empty-models`. Every
|
|
619
|
+
provider row must expose at least one model. Duplicate `name` within
|
|
620
|
+
the same array is also rejected (`duplicate-model-name`).
|
|
621
|
+
|
|
622
|
+
4. **Setting `secret_ref` for the in-process adapter.** `in-process`
|
|
623
|
+
ignores `secret_ref` — no key needed. Leaving it in is harmless but
|
|
624
|
+
noisy.
|
|
625
|
+
|
|
626
|
+
5. **Registering the same provider id twice with different config.**
|
|
627
|
+
Returns `409 provider-already-registered`. Unregister first:
|
|
628
|
+
```sh
|
|
629
|
+
kindgi providers unregister <provider-id>
|
|
630
|
+
```
|
|
631
|
+
Then re-register.
|
|
632
|
+
|
|
633
|
+
6. **Key not found by the runtime.** `kindgi dev` reads the env files
|
|
634
|
+
at the PACK ROOT (the directory with `kindgi.config.ts`, or a Python
|
|
635
|
+
pack's `pyproject.toml` with `[tool.kindgi]`) — `.env` and
|
|
636
|
+
`.env.local`, or whatever `dev.envFiles` lists; the boot log prints
|
|
637
|
+
which files it found. A `KINDGI_`-prefixed name is Kindgi runtime
|
|
638
|
+
config and never resolves as a secret. Outside `kindgi dev`, the
|
|
639
|
+
runtime resolves secrets through the deployment's `SecretBinding`
|
|
640
|
+
(a KMS- or database-backed store, for example).
|
|
641
|
+
|
|
642
|
+
7. **Forgetting to restart `kindgi dev` after registering a provider.**
|
|
643
|
+
You don't need to — provider registrations go to the running runtime
|
|
644
|
+
over HTTP (`POST /v1/providers`), which invalidates the tenant's
|
|
645
|
+
cached provider set. The next `kindgi runs start` sees the new
|
|
646
|
+
provider.
|
|
647
|
+
|
|
648
|
+
8. **Compound `preferredProvider` strings.** `preferredProvider` is a
|
|
649
|
+
provider (connection) id such as `'anthropic'`; the model is a
|
|
650
|
+
separate choice. A value like `'anthropic-claude-sonnet-5-5'`
|
|
651
|
+
(vendor + model baked together) matches no provider id, so the hint
|
|
652
|
+
does nothing. Pin the model with a `models: { allow: [...] }`
|
|
653
|
+
requirement instead.
|
|
654
|
+
|
|
655
|
+
9. **Replies still come from dev-echo** (`Tool responded: …`; the turn's
|
|
656
|
+
result has a `fallback-provider` warning). dev-echo is a fallback: it
|
|
657
|
+
answers only when no registered provider satisfies the agent. So your
|
|
658
|
+
provider doesn't — check its models' `features` against the agent's
|
|
659
|
+
`capabilities.needs` (mistake 2), a `models` / `providers` allow-list
|
|
660
|
+
that names nothing registered, and the tenant's policy. `kindgi
|
|
661
|
+
providers list` shows what is registered.
|
|
662
|
+
|
|
663
|
+
## Verifying end-to-end
|
|
664
|
+
|
|
665
|
+
```sh
|
|
666
|
+
# 0. Run the runtime (in its own terminal)
|
|
667
|
+
kindgi dev
|
|
668
|
+
|
|
669
|
+
# 1. Set the key (interactive, no-echo prompt)
|
|
670
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant
|
|
671
|
+
|
|
672
|
+
# 2. Register the provider (one row, all models)
|
|
673
|
+
kindgi providers register --preset=anthropic # or --spec=@provider.json
|
|
674
|
+
|
|
675
|
+
# 3. Confirm it's there (list shows nested models per provider)
|
|
676
|
+
kindgi providers list
|
|
677
|
+
|
|
678
|
+
# 4. Run an agent that needs `tool-use`
|
|
679
|
+
kindgi runs start \
|
|
680
|
+
--agent=my-pack.some-agent \
|
|
681
|
+
--input='{"userMessage": "test"}'
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
If the run completes with `status: "completed"`, the whole chain works
|
|
685
|
+
end-to-end. If it fails with `secret-not-found`, check point (1). If it
|
|
686
|
+
fails with "no provider satisfies capability", check point (2). If it
|
|
687
|
+
completes with dev-echo's canned reply, see mistake 9.
|
|
688
|
+
|
|
689
|
+
## References
|
|
690
|
+
|
|
691
|
+
- `packages/adapters/model-anthropic/src/provider.ts` — Anthropic adapter
|
|
692
|
+
- `packages/adapters/model-openai-compat/src/provider.ts` — Universal adapter, full list of tested endpoints in header comment
|
|
693
|
+
- `packages/adapters/model-in-process/src/provider.ts` — Local ONNX adapter
|
|
694
|
+
- `packages/api/src/routes/providers.ts` — `POST /v1/providers` route
|
|
695
|
+
- `packages/secrets-dotenv/src/index.ts` — Dev-mode secret binding
|
|
696
|
+
|
|
697
|
+
## When the framework itself is the problem
|
|
698
|
+
|
|
699
|
+
If you diagnose that the bug lives in Kindgi/`@kindgi/sdk` itself
|
|
700
|
+
(silent registration failure masking a real error, an unknown adapter
|
|
701
|
+
reported as the wrong error, adapter regression, router picking
|
|
702
|
+
the wrong provider or wrong model) — not in your pack's provider spec —
|
|
703
|
+
load the `kindgi-framework-feedback` skill and file a structured report
|
|
704
|
+
with `kindgi feedback write`. That diagnostic is high-signal input the
|
|
705
|
+
maintainers can act on; don't let it disappear into the transcript.
|