@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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Kindgi pack config — scaffolded by `kindgi init --template=minimal`.
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
pack: {
|
|
5
|
+
id: '{{PACK_ID}}',
|
|
6
|
+
version: '{{PACK_VERSION}}',
|
|
7
|
+
description: 'A minimal Kindgi pack.',
|
|
8
|
+
},
|
|
9
|
+
discovery: {
|
|
10
|
+
tools: 'tools/**/*.ts',
|
|
11
|
+
guardrails: 'guardrails/**/*.ts',
|
|
12
|
+
agents: 'agents/**/*.ts',
|
|
13
|
+
flows: 'flows/**/*.ts',
|
|
14
|
+
},
|
|
15
|
+
// ---------------------------------------------------------------
|
|
16
|
+
// Environments — one entry per deploy target (staging / production
|
|
17
|
+
// / preview / custom). Each names the build server endpoint, the
|
|
18
|
+
// signing key path (Ed25519 PEM, never leaves the developer's
|
|
19
|
+
// machine), the target registry (build server pushes here on your
|
|
20
|
+
// behalf), and the tenantId the Kindgi runtime scopes the
|
|
21
|
+
// deployment to. Consumed by `kindgi build` + `kindgi deploy`.
|
|
22
|
+
//
|
|
23
|
+
// Fill these in when you're ready to push a build off the laptop.
|
|
24
|
+
// Local `kindgi dev` does NOT read this block.
|
|
25
|
+
// ---------------------------------------------------------------
|
|
26
|
+
environments: {
|
|
27
|
+
staging: {
|
|
28
|
+
endpoint: 'https://api.staging.example.com',
|
|
29
|
+
build: 'http://localhost:8787', // your Kindgi build server
|
|
30
|
+
registry: 'ghcr.io/your-org',
|
|
31
|
+
signingKey: '~/.kindgi/keys/staging.pem',
|
|
32
|
+
tenantId: 'tenant-your-org-staging',
|
|
33
|
+
},
|
|
34
|
+
production: {
|
|
35
|
+
endpoint: 'https://api.example.com',
|
|
36
|
+
build: 'https://build.example.com',
|
|
37
|
+
registry: 'ghcr.io/your-org',
|
|
38
|
+
signingKey: '~/.kindgi/keys/production.pem',
|
|
39
|
+
tenantId: 'tenant-your-org-production',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
44
|
+
export default config;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PACK_NAME}}",
|
|
3
|
+
"version": "{{PACK_VERSION}}",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Kindgi pack — scaffolded by `kindgi init --template=minimal`.",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22.0.0"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest run"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@kindgi/sdk": "workspace:*",
|
|
17
|
+
"zod": "^4.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@kindgi/cli": "workspace:*",
|
|
21
|
+
"@types/node": "^22.0.0",
|
|
22
|
+
"typescript": "^5.7.3",
|
|
23
|
+
"vitest": "^3.0.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# pnpm 12+ reads settings from this file, not from `package.json`'s
|
|
2
|
+
# `pnpm` block. `allowBuilds` records, per dependency, whether pnpm runs
|
|
3
|
+
# its install script (true) or skips it (false); pnpm 11+ stops an install
|
|
4
|
+
# until each one has a decision. esbuild (the CLI's bundler, and vitest's
|
|
5
|
+
# transform) works without its script: its native binary comes from its
|
|
6
|
+
# `@esbuild/<platform>` package, so the script stays off.
|
|
7
|
+
allowBuilds:
|
|
8
|
+
esbuild: false
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2023",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2023", "DOM"],
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"verbatimModuleSyntax": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true
|
|
18
|
+
},
|
|
19
|
+
"include": [
|
|
20
|
+
"tools/**/*.ts",
|
|
21
|
+
"guardrails/**/*.ts",
|
|
22
|
+
"agents/**/*.ts",
|
|
23
|
+
"flows/**/*.ts",
|
|
24
|
+
"kindgi.config.ts"
|
|
25
|
+
],
|
|
26
|
+
"exclude": ["node_modules", "dist", ".kindgi"]
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Vitest configuration for {{PACK_NAME}}. Scaffolded by `kindgi init`.
|
|
2
|
+
// `kindgi test` shells out to the pack's local vitest install using
|
|
3
|
+
// this config — the CLI does NOT force a vitest version through.
|
|
4
|
+
|
|
5
|
+
import { defineConfig } from 'vitest/config';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
test: {
|
|
9
|
+
include: ['**/*.test.ts'],
|
|
10
|
+
exclude: ['node_modules/**', '.kindgi/**', 'dist/**'],
|
|
11
|
+
reporters: ['default'],
|
|
12
|
+
passWithNoTests: true,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This directory is a Kindgi pack written in Python (the `kindgi` package).
|
|
4
|
+
Tools are `@tool` functions, guardrail checks `@guardrail` functions; agents
|
|
5
|
+
(`Agent`) and flows (`Flow`) are data. Each lives at module level in a file
|
|
6
|
+
under `tools/`, `guardrails/`, `agents/` or `flows/`; a helper module there
|
|
7
|
+
starts with `_`. The config is `[tool.kindgi]` in `pyproject.toml`.
|
|
8
|
+
|
|
9
|
+
- `kindgi dev` boots Kindgi locally and runs this pack's code with its own
|
|
10
|
+
`.venv`, reloading on every save.
|
|
11
|
+
- `uv run pytest` runs the tests; a `Tool` or `Guardrail` is still callable.
|
|
12
|
+
- `uv run python -m kindgi.pack index --pack-dir .` shows what Kindgi sees.
|
|
13
|
+
- Agents answer through a model provider. `kindgi dev` gives a new pack
|
|
14
|
+
`dev-echo`, a fallback that calls the first tool and replies
|
|
15
|
+
"Tool responded: …" while no other provider fits. For Claude:
|
|
16
|
+
`kindgi providers register --preset=anthropic` (the key in `.env`
|
|
17
|
+
first); other providers and per-agent model choice:
|
|
18
|
+
`.claude/skills/kindgi-authoring-providers/SKILL.md`.
|
|
19
|
+
|
|
20
|
+
## Skills
|
|
21
|
+
|
|
22
|
+
`.claude/skills/` holds Kindgi's skills for Python packs: getting started,
|
|
23
|
+
tools, guardrails and agents in Python (`kindgi-python-*`), model providers,
|
|
24
|
+
MCP servers, framework feedback. Claude Code loads them on its own; other
|
|
25
|
+
coding agents can read them. `kindgi skills sync` refreshes them.
|
|
26
|
+
|
|
27
|
+
When you diagnose a framework bug (something in Kindgi itself, not in this
|
|
28
|
+
pack's code), append an entry to `FEEDBACK.md` at the pack root via
|
|
29
|
+
`kindgi feedback write` — see
|
|
30
|
+
`.claude/skills/kindgi-framework-feedback/SKILL.md`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# {{PACK_NAME}}
|
|
2
|
+
|
|
3
|
+
A sample Kindgi pack in Python — scaffolded by `kindgi init --template=python`.
|
|
4
|
+
|
|
5
|
+
Two tools (`echo`, `greet`), one guardrail (`response-not-empty`), one agent
|
|
6
|
+
that uses both tools and the guardrail, and one flow that runs the echo tool.
|
|
7
|
+
|
|
8
|
+
## Layout
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
{{PACK_NAME}}/
|
|
12
|
+
├── pyproject.toml # [tool.kindgi] — the pack's id and version
|
|
13
|
+
├── tools/echo.py # @tool — pydantic in, pydantic out
|
|
14
|
+
├── tools/greet.py # @tool
|
|
15
|
+
├── guardrails/response_not_empty.py # @guardrail — a zero-LLM check over the run
|
|
16
|
+
├── agents/echo_agent.py # Agent(...) — data
|
|
17
|
+
├── flows/echo_flow.py # Flow(...) — data
|
|
18
|
+
└── tests/test_tools.py # the tools and the check, called directly
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Run
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
uv sync # .venv with kindgi and the dev tools
|
|
25
|
+
uv run pytest
|
|
26
|
+
kindgi dev # boots Kindgi locally and runs this pack's code, reloading on save
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`kindgi dev` uses the pack's `.venv/bin/python` (or `dev.python` in
|
|
30
|
+
`[tool.kindgi]`). Then, from another terminal:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
kindgi runs start --agent={{PACK_ID}}.echo-agent --input='{"userMessage":"hi"}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Use a real model
|
|
37
|
+
|
|
38
|
+
`kindgi dev` gives a new pack `dev-echo`, a fallback provider that calls the
|
|
39
|
+
first tool and replies "Tool responded: …" — it answers only while no other
|
|
40
|
+
provider fits. To use Claude, with `kindgi dev` running, from another terminal:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
|
|
44
|
+
kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Claude takes over from dev-echo on the next turn; nothing to restart.
|
|
48
|
+
`--models=claude-haiku-4-5` registers one model only; `kindgi providers
|
|
49
|
+
presets` lists the presets (Gemini on Vertex AI too). Picking a model per
|
|
50
|
+
agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
|
|
51
|
+
|
|
52
|
+
## Build
|
|
53
|
+
|
|
54
|
+
`kindgi build --env=<name>` makes the pack's image: dependencies from `uv.lock`
|
|
55
|
+
(run `uv lock` first), the index built in the image, the pack service as its
|
|
56
|
+
entrypoint.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""{{PACK_ID}}.echo-agent — uses both tools; the response-not-empty guardrail guards its answer."""
|
|
2
|
+
|
|
3
|
+
from kindgi import Agent
|
|
4
|
+
|
|
5
|
+
from ..guardrails.response_not_empty import response_not_empty
|
|
6
|
+
from ..tools.echo import echo
|
|
7
|
+
from ..tools.greet import greet
|
|
8
|
+
|
|
9
|
+
echo_agent = Agent(
|
|
10
|
+
id="{{PACK_ID}}.echo-agent",
|
|
11
|
+
version="{{PACK_VERSION}}",
|
|
12
|
+
name="Echo Agent",
|
|
13
|
+
description="Uses the pack's echo and greet tools; the response-not-empty guardrail guards the output.",
|
|
14
|
+
instructions=(
|
|
15
|
+
"For each user message: if the user sends a name, invoke `{{PACK_ID}}.greet` with it. "
|
|
16
|
+
"Otherwise invoke `{{PACK_ID}}.echo` with the message text. Quote the tool result verbatim."
|
|
17
|
+
),
|
|
18
|
+
capabilities=[{"needs": [{"feature": "tool-use"}]}],
|
|
19
|
+
tools=[echo, greet],
|
|
20
|
+
guardrails=[response_not_empty],
|
|
21
|
+
conversation_policy={"historyLimit": 10},
|
|
22
|
+
budget={"maxSteps": 4, "maxCostUsd": 0.1, "maxWallMs": 60_000},
|
|
23
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""{{PACK_ID}}.echo-flow — runs the pack's echo tool, then ends."""
|
|
2
|
+
|
|
3
|
+
from kindgi import Flow
|
|
4
|
+
|
|
5
|
+
from ..tools.echo import echo
|
|
6
|
+
|
|
7
|
+
echo_flow = Flow(
|
|
8
|
+
id="{{PACK_ID}}.echo-flow",
|
|
9
|
+
version="{{PACK_VERSION}}",
|
|
10
|
+
name="Echo Flow",
|
|
11
|
+
description="Runs the pack's echo tool and terminates.",
|
|
12
|
+
nodes=[{"id": "echo", "kind": "tool", "ref": echo}],
|
|
13
|
+
edges=[
|
|
14
|
+
{"id": "e-start", "from": "$start", "to": "echo"},
|
|
15
|
+
{"id": "e-end", "from": "echo", "to": "$end"},
|
|
16
|
+
],
|
|
17
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""{{PACK_ID}}.response-not-empty — a zero-LLM guardrail: the run's answer has content."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
from kindgi import CheckResult, RunTrace, guardrail
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Config(BaseModel):
|
|
9
|
+
min_length: int = Field(1, alias="minLength", ge=0)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@guardrail(
|
|
13
|
+
id="{{PACK_ID}}.response-not-empty",
|
|
14
|
+
name="Response is non-empty",
|
|
15
|
+
check_id="{{PACK_ID}}.checks.response-not-empty",
|
|
16
|
+
on_violation="halt",
|
|
17
|
+
severity="error",
|
|
18
|
+
scope={"when": "runtime-only"},
|
|
19
|
+
)
|
|
20
|
+
def response_not_empty(config: Config, trace: RunTrace) -> CheckResult:
|
|
21
|
+
text = (trace.output or "").strip()
|
|
22
|
+
if len(text) < config.min_length:
|
|
23
|
+
return CheckResult(
|
|
24
|
+
passed=False,
|
|
25
|
+
reason=f"Response too short: {len(text)} chars, expected >= {config.min_length}.",
|
|
26
|
+
)
|
|
27
|
+
return CheckResult(passed=True)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "{{PACK_NAME}}"
|
|
3
|
+
version = "{{PACK_VERSION}}"
|
|
4
|
+
description = "A Kindgi pack — scaffolded by `kindgi init --template=python`."
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
|
+
dependencies = [{{KINDGI_REQUIREMENT}}]
|
|
7
|
+
|
|
8
|
+
[dependency-groups]
|
|
9
|
+
dev = ["pytest>=8"]
|
|
10
|
+
|
|
11
|
+
# The uv versions this pack works with: `kindgi build` installs it with the
|
|
12
|
+
# uv in Kindgi's image, which reads the uv.lock they write.
|
|
13
|
+
[tool.uv]
|
|
14
|
+
required-version = "{{UV_REQUIRED_VERSION}}"
|
|
15
|
+
{{KINDGI_PYTHON_SOURCE}}
|
|
16
|
+
# The pack: what `kindgi dev`, `kindgi build` and `python -m kindgi.pack` read.
|
|
17
|
+
[tool.kindgi.pack]
|
|
18
|
+
id = "{{PACK_ID}}"
|
|
19
|
+
version = "{{PACK_VERSION}}"
|
|
20
|
+
description = "A sample Kindgi pack in Python — two tools, one guardrail, one agent, one flow."
|
|
21
|
+
|
|
22
|
+
# Optional — the defaults are shown.
|
|
23
|
+
# [tool.kindgi.discovery]
|
|
24
|
+
# tools = "tools/**/*.py"
|
|
25
|
+
# guardrails = "guardrails/**/*.py"
|
|
26
|
+
# agents = "agents/**/*.py"
|
|
27
|
+
# flows = "flows/**/*.py"
|
|
28
|
+
|
|
29
|
+
# [tool.kindgi.dev]
|
|
30
|
+
# python = ["uv", "run", "python"] # default: .venv/bin/python, else python3
|
|
31
|
+
# envFiles = [".env", ".env.local"]
|
|
32
|
+
|
|
33
|
+
# One block per deploy target; `kindgi build --env=<name>` reads it.
|
|
34
|
+
# [tool.kindgi.environments.staging]
|
|
35
|
+
# endpoint = "https://api.staging.example.com"
|
|
36
|
+
# build = "http://localhost:4001"
|
|
37
|
+
# tenantId = "tenant-your-org-staging"
|
|
38
|
+
# signingKey = "~/.kindgi/keys/staging.pem"
|
|
39
|
+
|
|
40
|
+
[tool.pytest.ini_options]
|
|
41
|
+
testpaths = ["tests"]
|
|
42
|
+
pythonpath = ["."]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""The pack's tools and guardrail, called directly — `uv run pytest`."""
|
|
2
|
+
|
|
3
|
+
from kindgi import RunTrace
|
|
4
|
+
from tools.echo import EchoInput, echo
|
|
5
|
+
from tools.greet import GreetInput, greet
|
|
6
|
+
|
|
7
|
+
from guardrails.response_not_empty import Config, response_not_empty
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_echo_round_trips_the_message() -> None:
|
|
11
|
+
out = echo(EchoInput(message="hello"))
|
|
12
|
+
assert out.echo == "hello"
|
|
13
|
+
assert out.character_count == 5
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_greet_uses_the_default_greeting() -> None:
|
|
17
|
+
assert greet(GreetInput(name="Ada")).message == "Hello, Ada!"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_an_empty_answer_fails_the_guardrail() -> None:
|
|
21
|
+
trace = RunTrace(run_id="r", tenant_id="t", output=" ")
|
|
22
|
+
assert not response_not_empty(Config(), trace).passed
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""{{PACK_ID}}.echo — echoes the message back with a UTC timestamp and its length."""
|
|
2
|
+
|
|
3
|
+
from datetime import UTC, datetime
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
|
|
7
|
+
from kindgi import tool
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EchoInput(BaseModel):
|
|
11
|
+
message: str = Field(min_length=1, max_length=500)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Echo(BaseModel):
|
|
15
|
+
echo: str
|
|
16
|
+
echoed_at: str = Field(alias="echoedAt")
|
|
17
|
+
character_count: int = Field(alias="characterCount", ge=0)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@tool(id="{{PACK_ID}}.echo")
|
|
21
|
+
def echo(input: EchoInput) -> Echo:
|
|
22
|
+
"""Echoes the caller-provided message with a UTC timestamp and character count."""
|
|
23
|
+
return Echo(
|
|
24
|
+
echo=input.message,
|
|
25
|
+
echoedAt=datetime.now(UTC).isoformat(),
|
|
26
|
+
characterCount=len(input.message),
|
|
27
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""{{PACK_ID}}.greet — greets a named recipient."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
from kindgi import tool
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GreetInput(BaseModel):
|
|
9
|
+
name: str = Field(min_length=1, max_length=100)
|
|
10
|
+
greeting: str = Field("Hello", min_length=1, max_length=50)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Greeting(BaseModel):
|
|
14
|
+
message: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@tool(id="{{PACK_ID}}.greet")
|
|
18
|
+
def greet(input: GreetInput) -> Greeting:
|
|
19
|
+
"""Formats a greeting for the named recipient."""
|
|
20
|
+
return Greeting(message=f"{input.greeting}, {input.name}!")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This directory is a Kindgi pack. Author primitives via
|
|
4
|
+
`@kindgi/sdk` — `defineTool`, `defineAgent`, `defineCheck`,
|
|
5
|
+
`defineFlow`. Every export ships with JSDoc; hover them for
|
|
6
|
+
field-level docs. Iterate with `kindgi dev`; `kindgi --help` lists
|
|
7
|
+
the full CLI.
|
|
8
|
+
|
|
9
|
+
Agents answer through a model provider. `kindgi dev` gives a new pack
|
|
10
|
+
`dev-echo`, a fallback that calls the first tool and replies
|
|
11
|
+
"Tool responded: …" while no other provider fits. For Claude:
|
|
12
|
+
`kindgi providers register --preset=anthropic` (the key in `.env`
|
|
13
|
+
first); other providers and per-agent model choice:
|
|
14
|
+
`.claude/skills/kindgi-authoring-providers/SKILL.md`.
|
|
15
|
+
|
|
16
|
+
## For Claude Code sessions
|
|
17
|
+
|
|
18
|
+
When you diagnose a framework bug (something in Kindgi itself, not in
|
|
19
|
+
this pack's code), append an entry to `FEEDBACK.md` at the pack root
|
|
20
|
+
via `kindgi feedback write` — see
|
|
21
|
+
`.claude/skills/kindgi-framework-feedback/SKILL.md`. Mark items fixed
|
|
22
|
+
by adding a `> **Fixed:** <note>` line right after their header; the
|
|
23
|
+
file is a plain markdown list you edit directly.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# {{PACK_NAME}}
|
|
2
|
+
|
|
3
|
+
A sample Kindgi pack — scaffolded by `kindgi init --template=sample`.
|
|
4
|
+
|
|
5
|
+
Two tools (`echo`, `greet`), one guardrail (`response-not-empty`), one
|
|
6
|
+
agent that uses both tools + the guardrail, and one flow that stitches
|
|
7
|
+
the two tools into a workflow. It is compile-time-valid and ready to
|
|
8
|
+
run with `kindgi dev`.
|
|
9
|
+
|
|
10
|
+
## Layout
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{{PACK_NAME}}/
|
|
14
|
+
├── kindgi.config.ts # pack id + version + discovery patterns
|
|
15
|
+
├── package.json # depends on @kindgi/sdk + zod
|
|
16
|
+
├── tsconfig.json
|
|
17
|
+
├── tools/
|
|
18
|
+
│ ├── echo/index.ts # defineTool — Zod-authored echo
|
|
19
|
+
│ └── greet/index.ts # defineTool — Zod-authored greeting
|
|
20
|
+
├── guardrails/
|
|
21
|
+
│ └── response-not-empty/index.ts # defineCheck — response has content
|
|
22
|
+
├── agents/
|
|
23
|
+
│ └── echo-agent/index.ts # defineAgent — uses both tools + guardrail
|
|
24
|
+
└── flows/
|
|
25
|
+
└── echo-flow/index.ts # Flow — greet tool → echo agent step → declared output
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Run
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
pnpm install
|
|
32
|
+
pnpm typecheck # verify the pack compiles
|
|
33
|
+
kindgi dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`kindgi dev` bundles every primitive under the four folders above,
|
|
37
|
+
runs their code in a local pack service, starts the Kindgi runtime as a
|
|
38
|
+
Docker container (with a local Postgres), registers this pack, and
|
|
39
|
+
re-registers on every file save.
|
|
40
|
+
|
|
41
|
+
## Use a real model
|
|
42
|
+
|
|
43
|
+
`kindgi dev` gives a new pack `dev-echo`, a fallback provider that calls the
|
|
44
|
+
first tool and replies "Tool responded: …" — it answers only while no other
|
|
45
|
+
provider fits. To use Claude, with `kindgi dev` running, from another terminal:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
|
|
49
|
+
kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Claude takes over from dev-echo on the next turn; nothing to restart.
|
|
53
|
+
`--models=claude-haiku-4-5` registers one model only; `kindgi providers
|
|
54
|
+
presets` lists the presets (Gemini on Vertex AI too). Picking a model per
|
|
55
|
+
agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
|
|
56
|
+
|
|
57
|
+
## The four primitives (one file each)
|
|
58
|
+
|
|
59
|
+
| Kind | File | What it shows |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| Tool | `tools/echo/index.ts` | `defineTool` with Zod input/output; no `needs`; `effects: []`. |
|
|
62
|
+
| Tool | `tools/greet/index.ts` | Second Zod-authored tool — takes a name, returns a greeting. |
|
|
63
|
+
| Tool | `tools/fetch-httpbin/index.ts` | `defineTool({spec: {kind: 'http'}})` — declarative HTTP call, no imperative handler code. Hits httpbin.org so it works without credentials. |
|
|
64
|
+
| Guardrail | `guardrails/response-not-empty/index.ts` | `defineCheck` — zero-LLM check that a response payload is non-empty. |
|
|
65
|
+
| Agent | `agents/echo-agent/index.ts` | `defineAgent` — pulls in the local tools + the guardrail; uses `capabilities` for model routing. |
|
|
66
|
+
| Flow | `flows/echo-flow/index.ts` | `defineFlow` — a tool step fed from the run input, an agent step, a declared `output`. Run: `kindgi runs start --flow={{PACK_ID}}.echo-flow --input='{"name":"Ada"}'`. |
|
|
67
|
+
|
|
68
|
+
## Extend
|
|
69
|
+
|
|
70
|
+
Add more primitives following the same folder convention. `defineTool` +
|
|
71
|
+
`defineCheck` + `defineAgent` all come from `@kindgi/sdk/define`:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { defineTool, defineCheck, defineAgent, defineFlow } from '@kindgi/sdk/define';
|
|
75
|
+
import { z } from 'zod';
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Every `define*` export ships with JSDoc — hover it in your editor for
|
|
79
|
+
field-level docs.
|
|
80
|
+
|
|
81
|
+
## Note on `@kindgi/sdk` versioning
|
|
82
|
+
|
|
83
|
+
This template pins `@kindgi/sdk: "workspace:*"` because the SDK is not
|
|
84
|
+
yet published to npm. Until it is, add the pack to a pnpm workspace that
|
|
85
|
+
contains the Kindgi packages (`pnpm-workspace.yaml`).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// {{PACK_ID}}.echo-agent — pulls in both tools + the response-not-empty
|
|
2
|
+
// guardrail. The agent shape is pure metadata; every field is either a
|
|
3
|
+
// primitive or a reference to a registered substrate object.
|
|
4
|
+
|
|
5
|
+
import { defineAgent } from '@kindgi/sdk/define';
|
|
6
|
+
import type { AgentId, GuardrailId, Semver } from '@kindgi/sdk/types';
|
|
7
|
+
|
|
8
|
+
const defined = defineAgent({
|
|
9
|
+
id: '{{PACK_ID}}.echo-agent' as AgentId,
|
|
10
|
+
version: '{{PACK_VERSION}}' as Semver,
|
|
11
|
+
name: 'Echo Agent',
|
|
12
|
+
description:
|
|
13
|
+
'Uses the pack\'s echo + greet tools; the response-not-empty guardrail guards the output.',
|
|
14
|
+
instructions:
|
|
15
|
+
'For each user message: if the user sends a name, invoke `{{PACK_ID}}.greet` with it. Otherwise invoke `{{PACK_ID}}.echo` with the message text. Quote the tool result verbatim in your reply.',
|
|
16
|
+
capabilities: [{ needs: [{ feature: 'tool-use' as const }] }],
|
|
17
|
+
tools: [
|
|
18
|
+
{ id: '{{PACK_ID}}.echo', version: '{{PACK_VERSION}}' },
|
|
19
|
+
{ id: '{{PACK_ID}}.greet', version: '{{PACK_VERSION}}' },
|
|
20
|
+
],
|
|
21
|
+
retrieval: [],
|
|
22
|
+
guardrails: ['{{PACK_ID}}.response-not-empty' as GuardrailId],
|
|
23
|
+
parameters: [],
|
|
24
|
+
conversationPolicy: { historyLimit: 10 },
|
|
25
|
+
budget: { maxSteps: 4, maxCostUsd: 0.1, maxWallMs: 15_000 },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
if (defined.kind === 'err') {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`{{PACK_ID}}.echo-agent failed to compile: ${defined.error.message}`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default defined.value;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// {{PACK_ID}}.echo-flow — greets a name with the greet tool, then hands
|
|
2
|
+
// the greeting to the echo agent as an agent step, and returns both.
|
|
3
|
+
//
|
|
4
|
+
// It shows the parts most flows use:
|
|
5
|
+
// - a tool step whose input is mapped from the run input
|
|
6
|
+
// (`inputMapping` — `runInput.name`);
|
|
7
|
+
// - an agent step: the agent runs one turn as a child run, gets the
|
|
8
|
+
// step's input as structured input (`{{ input.text }}` in its
|
|
9
|
+
// instructions) and as its message, and its answer is
|
|
10
|
+
// `nodeOutputs.respond.text` (`.output.<field>` with a typed `output`);
|
|
11
|
+
// - a declared `output`, checked against its schema.
|
|
12
|
+
// The kindgi-authoring-flows skill covers branches, loops and the rest.
|
|
13
|
+
//
|
|
14
|
+
// Run it: kindgi runs start --flow={{PACK_ID}}.echo-flow --input='{"name":"Ada"}'
|
|
15
|
+
|
|
16
|
+
import { defineFlow } from '@kindgi/sdk/define';
|
|
17
|
+
|
|
18
|
+
const defined = defineFlow({
|
|
19
|
+
id: '{{PACK_ID}}.echo-flow',
|
|
20
|
+
version: '{{PACK_VERSION}}',
|
|
21
|
+
name: 'Echo Flow',
|
|
22
|
+
description: 'Greets a name, then has the echo agent respond to the greeting.',
|
|
23
|
+
nodes: [
|
|
24
|
+
{
|
|
25
|
+
id: 'greet',
|
|
26
|
+
kind: 'tool',
|
|
27
|
+
ref: '{{PACK_ID}}.greet',
|
|
28
|
+
inputMapping: { name: { path: 'runInput.name' } },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'respond',
|
|
32
|
+
kind: 'agent',
|
|
33
|
+
ref: '{{PACK_ID}}.echo-agent',
|
|
34
|
+
inputMapping: { text: { path: 'nodeOutputs.greet.message' } },
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
edges: [
|
|
38
|
+
{ id: 'e-start', from: '$start', to: 'greet' },
|
|
39
|
+
{ id: 'e-respond', from: 'greet', to: 'respond' },
|
|
40
|
+
{ id: 'e-end', from: 'respond', to: '$end' },
|
|
41
|
+
],
|
|
42
|
+
output: {
|
|
43
|
+
mapping: {
|
|
44
|
+
greeting: { path: 'nodeOutputs.greet.message' },
|
|
45
|
+
reply: { path: 'nodeOutputs.respond.text' },
|
|
46
|
+
},
|
|
47
|
+
schema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: { greeting: { type: 'string' }, reply: { type: 'string' } },
|
|
50
|
+
required: ['greeting', 'reply'],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (defined.kind === 'err') {
|
|
56
|
+
throw new Error(`{{PACK_ID}}.echo-flow failed to compile: ${defined.error.message}`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default defined.value;
|