@kindgi/cli 0.0.0-bootstrap.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +690 -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 +45 -0
- package/dist/build/bundle.d.ts.map +1 -0
- package/dist/build/bundle.js +121 -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 +196 -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 +586 -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 +48 -0
- package/dist/build/host-install.d.ts.map +1 -0
- package/dist/build/host-install.js +375 -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 +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +88 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/build.d.ts +39 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +872 -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 +44 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +1032 -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 +37 -0
- package/dist/commands/helpers.d.ts.map +1 -0
- package/dist/commands/helpers.js +93 -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 +455 -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 +202 -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 +221 -0
- package/dist/commands/runs.js.map +1 -0
- package/dist/commands/secrets.d.ts +21 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +750 -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 +153 -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 +17 -0
- package/dist/commands/unwired.d.ts.map +1 -0
- package/dist/commands/unwired.js +41 -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 +153 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +44 -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 +8 -0
- package/dist/dev/bundler.d.ts.map +1 -0
- package/dist/dev/bundler.js +154 -0
- package/dist/dev/bundler.js.map +1 -0
- package/dist/dev/defaults.d.ts +138 -0
- package/dist/dev/defaults.d.ts.map +1 -0
- package/dist/dev/defaults.js +691 -0
- package/dist/dev/defaults.js.map +1 -0
- package/dist/dev/docker-compose.dev.yml +56 -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 +32 -0
- package/dist/dev/pack-service.d.ts.map +1 -0
- package/dist/dev/pack-service.js +188 -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/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 +287 -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 +62 -0
- package/dist/dev/runtime-container.d.ts.map +1 -0
- package/dist/dev/runtime-container.js +164 -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 +13 -0
- package/dist/dev/runtime-image.d.ts.map +1 -0
- package/dist/dev/runtime-image.js +15 -0
- package/dist/dev/runtime-image.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 +107 -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 +74 -0
- package/dist/init/augment-scaffolder.d.ts.map +1 -0
- package/dist/init/augment-scaffolder.js +459 -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/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 +16 -0
- package/dist/init/template-files.d.ts.map +1 -0
- package/dist/init/template-files.js +38 -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 +106 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +198 -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 +82 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +99 -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 +253 -0
- package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +299 -0
- package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +291 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +289 -0
- package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +704 -0
- package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +288 -0
- package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +211 -0
- package/dist/sdk-skills/kindgi-getting-started/SKILL.md +181 -0
- package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +205 -0
- package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +322 -0
- package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +173 -0
- package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +299 -0
- package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +240 -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/.gitignore +8 -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/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 +6 -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/.gitignore +9 -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/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/.gitignore +8 -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/guardrails/response-not-empty/index.ts.tmpl +50 -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 +6 -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/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,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kindgi-python-getting-started
|
|
3
|
+
description: >
|
|
4
|
+
Getting a Python Kindgi pack running: what a pack is, scaffolding one
|
|
5
|
+
(`kindgi init <name> --template=python`) or adding `[tool.kindgi]` to
|
|
6
|
+
an existing Python app, `uv sync`, `kindgi dev`, the first agent run,
|
|
7
|
+
connecting a real model, flows, calling the Kindgi API from Python
|
|
8
|
+
(`kindgi.client`), and building an image. Load this when a Python
|
|
9
|
+
project has no `[tool.kindgi]` table yet and the user asks to "add
|
|
10
|
+
Kindgi", "make an agent", "set up a pack", or when you are orienting
|
|
11
|
+
in a Python pack (pyproject.toml with `[tool.kindgi]`) for the first
|
|
12
|
+
time. Authoring tools, guardrails and agents is covered by
|
|
13
|
+
kindgi-python-authoring-tools, kindgi-python-authoring-guardrails and
|
|
14
|
+
kindgi-python-authoring-agents; models by kindgi-authoring-providers.
|
|
15
|
+
type: core
|
|
16
|
+
library: "kindgi (Python)"
|
|
17
|
+
version: "0.1.0"
|
|
18
|
+
sdk_version: "0.1.0"
|
|
19
|
+
pack_languages: [python]
|
|
20
|
+
sources:
|
|
21
|
+
- sdks/python/README.md
|
|
22
|
+
- sdks/python/src/kindgi/pack/config.py
|
|
23
|
+
- sdks/python/src/kindgi/pack/discovery.py
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Getting started with Kindgi in Python
|
|
27
|
+
|
|
28
|
+
> **Running `kindgi`:** a Python pack has no Node project, so the
|
|
29
|
+
> `kindgi` CLI (a Node 22+ program) is the one on `PATH`. Python
|
|
30
|
+
> commands run in the pack's environment: `uv run …`.
|
|
31
|
+
|
|
32
|
+
## What a pack is
|
|
33
|
+
|
|
34
|
+
A **pack** is a project Kindgi indexes and runs. Its config is the
|
|
35
|
+
`[tool.kindgi]` table of `pyproject.toml`; its primitives live in four
|
|
36
|
+
folders, one or more per `.py` file, at module level:
|
|
37
|
+
|
|
38
|
+
- **Tools** (`tools/*.py`, `@tool`) — your Python code an agent or flow
|
|
39
|
+
calls.
|
|
40
|
+
- **Guardrails** (`guardrails/*.py`, `@guardrail`) — checks over an
|
|
41
|
+
agent's turn.
|
|
42
|
+
- **Agents** (`agents/*.py`, `Agent(...)`) — data: instructions, tools,
|
|
43
|
+
capabilities. The model runs in Kindgi.
|
|
44
|
+
- **Flows** (`flows/*.py`, `Flow(...)`) — data: steps (tool or agent
|
|
45
|
+
nodes) and the edges between them.
|
|
46
|
+
|
|
47
|
+
Kindgi runs the tools and checks in the pack's own Python process (the
|
|
48
|
+
pack service) and calls them over HTTP; everything else runs in the
|
|
49
|
+
Kindgi runtime. A module whose name starts with `_` is a helper, not a
|
|
50
|
+
primitive; `test_*.py`, `*_test.py` and `conftest.py` are skipped.
|
|
51
|
+
|
|
52
|
+
## Scaffold a new pack
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
kindgi init my-pack --template=python
|
|
56
|
+
cd my-pack
|
|
57
|
+
uv sync # .venv with the kindgi package
|
|
58
|
+
uv run pytest
|
|
59
|
+
kindgi dev # boots Kindgi locally and runs this pack, reloading on save
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`kindgi dev` needs Postgres: it starts one in Docker unless
|
|
63
|
+
`KINDGI_DATABASE_URL` points at yours. It runs the pack with
|
|
64
|
+
`.venv/bin/python` (or `dev.python` in `[tool.kindgi]`, e.g.
|
|
65
|
+
`["uv", "run", "python"]`), checks that interpreter can import
|
|
66
|
+
`kindgi`, and swaps the code on every save.
|
|
67
|
+
|
|
68
|
+
## Add Kindgi to an existing Python app
|
|
69
|
+
|
|
70
|
+
In the app's directory (where its `pyproject.toml` is):
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
kindgi init # --pack-id=<id> if the app's name doesn't make one
|
|
74
|
+
uv sync # or what it prints for Poetry / pip
|
|
75
|
+
kindgi dev
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`kindgi init` edits the app's `pyproject.toml` in place — your layout and
|
|
79
|
+
comments stay — appending the `[tool.kindgi]` tables (the pack id from
|
|
80
|
+
`[project].name`, or `[tool.poetry].name` in a Poetry 1 app; discovery
|
|
81
|
+
under `kindgi/`; in a Poetry app, `dev.python` runs `poetry run python`)
|
|
82
|
+
and adding `kindgi` to `[project].dependencies`; where it can't edit the
|
|
83
|
+
dependencies (Poetry 1, `dynamic`), it prints the command to run. It adds the `kindgi/tools`,
|
|
84
|
+
`guardrails`, `agents` and `flows` folders, these skills and `.gitignore`
|
|
85
|
+
entries. An app with a `package.json` too gets a TypeScript pack unless you
|
|
86
|
+
pass `--template=python`.
|
|
87
|
+
|
|
88
|
+
The pack root is on `sys.path`, so tools import the app's own packages by
|
|
89
|
+
name (`from acme.text import normalize`); inside `kindgi/`, import the pack's
|
|
90
|
+
modules relatively. Don't add an `__init__.py` to `kindgi/` — the folder
|
|
91
|
+
would then shadow the `kindgi` package. `kindgi dev` reads the app's `.env`
|
|
92
|
+
/ `.env.local` — keys already there reach the tools as environment
|
|
93
|
+
variables.
|
|
94
|
+
|
|
95
|
+
## Layout of the template
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
my-pack/
|
|
99
|
+
├── pyproject.toml # [tool.kindgi] — id, version, (discovery, dev, environments)
|
|
100
|
+
├── tools/echo.py, tools/greet.py # @tool
|
|
101
|
+
├── guardrails/response_not_empty.py # @guardrail
|
|
102
|
+
├── agents/echo_agent.py # Agent(...)
|
|
103
|
+
├── flows/echo_flow.py # Flow(...)
|
|
104
|
+
├── tests/test_tools.py # the tools and the check, called directly
|
|
105
|
+
├── README.md
|
|
106
|
+
└── .claude/skills/ # these skills (`kindgi skills sync` refreshes them)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The `[tool.kindgi]` keys are the ones `kindgi.config.ts` takes —
|
|
110
|
+
`pack`, `discovery`, `dev`, `env`, `environments` — spelled the same.
|
|
111
|
+
|
|
112
|
+
## First run
|
|
113
|
+
|
|
114
|
+
With `kindgi dev` running, from another terminal in the pack directory:
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
kindgi runs start --agent=my-pack.echo-agent --input='{"userMessage":"Ada"}'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The answer comes from `dev-echo`, a **fallback** provider a new pack
|
|
121
|
+
gets: no model, no key — it calls the first tool and replies "Tool
|
|
122
|
+
responded: …", and the turn carries a `fallback-provider` warning. For
|
|
123
|
+
a real model, put the key in `.env` and register a provider:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt
|
|
127
|
+
kindgi providers register --preset=anthropic
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
It takes over at the next turn. Details and other providers:
|
|
131
|
+
`kindgi-authoring-providers`.
|
|
132
|
+
|
|
133
|
+
`uv run python -m kindgi.pack index --pack-dir .` prints what Kindgi
|
|
134
|
+
sees (the index); `kindgi dev` reports a broken file with its path and
|
|
135
|
+
keeps serving the rest.
|
|
136
|
+
|
|
137
|
+
## Flows
|
|
138
|
+
|
|
139
|
+
A flow is data: nodes and edges (`flow.schema.json`). A node's `ref` may
|
|
140
|
+
be the `Tool` object:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
# flows/record.py
|
|
144
|
+
from kindgi import Flow
|
|
145
|
+
|
|
146
|
+
from ..tools.ledger import record_expense
|
|
147
|
+
|
|
148
|
+
record = Flow(
|
|
149
|
+
id="acme.ledger.record-flow",
|
|
150
|
+
version="0.1.0",
|
|
151
|
+
nodes=[{"id": "record", "kind": "tool", "ref": record_expense}],
|
|
152
|
+
edges=[
|
|
153
|
+
{"id": "e-start", "from": "$start", "to": "record"},
|
|
154
|
+
{"id": "e-end", "from": "record", "to": "$end"},
|
|
155
|
+
],
|
|
156
|
+
)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
A node gets its single upstream node's output (the run input after
|
|
160
|
+
`$start`), or what its `inputMapping` says: each key a `{"literal": …}`
|
|
161
|
+
or a `{"path": …}` rooted at `runInput`, `state` or
|
|
162
|
+
`nodeOutputs.<nodeId>`. The indexer checks every flow against the
|
|
163
|
+
schema. Run one with `kindgi runs start --flow=<id> --input='{…}'`;
|
|
164
|
+
branches, loops and agent steps → `kindgi-python-authoring-flows`.
|
|
165
|
+
|
|
166
|
+
## Calling Kindgi from Python
|
|
167
|
+
|
|
168
|
+
`kindgi.client` covers the whole API:
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from kindgi.client import Kindgi
|
|
172
|
+
|
|
173
|
+
client = Kindgi() # KINDGI_API_URL + KINDGI_API_TOKEN, or Kindgi(url, token=…)
|
|
174
|
+
run = client.runs.start(agent="my-pack.echo-agent", input={"userMessage": "Ada"})
|
|
175
|
+
print(run.status, run.output["response"]["content"])
|
|
176
|
+
for event in client.runs.stream(str(run.id)):
|
|
177
|
+
print(event.kind)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`AsyncKindgi` is the asyncio twin. `kindgi dev` prints the URL and the
|
|
181
|
+
token; `.kindgirc.json` in the pack holds them for the CLI.
|
|
182
|
+
|
|
183
|
+
## Build an image
|
|
184
|
+
|
|
185
|
+
`kindgi build --env=<name>` (an `[tool.kindgi.environments.<name>]`
|
|
186
|
+
block) builds the pack's image. Its dependencies install from the pack's
|
|
187
|
+
lockfile, frozen, main dependencies only: `uv.lock` (run `uv lock`
|
|
188
|
+
first), or in a Poetry app `poetry.lock` (`poetry lock`; the image brings
|
|
189
|
+
its own pinned Poetry). The index is built in the image; the pack service
|
|
190
|
+
is its entrypoint. An app with only `requirements.txt` can't build yet.
|
|
191
|
+
|
|
192
|
+
Debian packages the code needs (OCR, PDF tools, `libmagic`, …) are
|
|
193
|
+
declared in `pyproject.toml`; the image installs them, for the build and
|
|
194
|
+
at run time:
|
|
195
|
+
|
|
196
|
+
```toml
|
|
197
|
+
[tool.kindgi.image]
|
|
198
|
+
system-packages = ["tesseract-ocr", "poppler-utils"] # names, or name=version
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The variables the code reads from `os.environ` (a database URL, a bucket)
|
|
202
|
+
are declared too, names only. A deployed pack service missing a `required`
|
|
203
|
+
one isn't ready, and its `/readyz` names it:
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[tool.kindgi.env]
|
|
207
|
+
required = ["DATABASE_URL"]
|
|
208
|
+
optional = ["SENTRY_DSN"]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
A `[tool.uv] required-version` that excludes the image's uv stops the
|
|
212
|
+
build before anything uploads, with the range to use.
|
|
213
|
+
|
|
214
|
+
## Two things need the human
|
|
215
|
+
|
|
216
|
+
- **The pack id and version** in `[tool.kindgi.pack]`. The id prefixes
|
|
217
|
+
every primitive (`<pack-id>.<name>`); pick it once.
|
|
218
|
+
- **Model credentials.** Ask for the key; never invent or hard-code one.
|
|
219
|
+
|
|
220
|
+
## Next
|
|
221
|
+
|
|
222
|
+
- A tool → `kindgi-python-authoring-tools`.
|
|
223
|
+
- A guardrail → `kindgi-python-authoring-guardrails`.
|
|
224
|
+
- An agent → `kindgi-python-authoring-agents`.
|
|
225
|
+
- A flow → `kindgi-python-authoring-flows`.
|
|
226
|
+
- A real model → `kindgi-authoring-providers`.
|
|
227
|
+
- An external resource (a database) for the coding agent →
|
|
228
|
+
`kindgi-authoring-mcp-servers`.
|
|
229
|
+
|
|
230
|
+
## Keeping skills up to date
|
|
231
|
+
|
|
232
|
+
`kindgi skills sync` refreshes `.claude/skills/` from the CLI's copy
|
|
233
|
+
(local edits are kept unless `--force`); `kindgi dev` says when they are
|
|
234
|
+
out of date.
|
|
235
|
+
|
|
236
|
+
## When the framework itself is the problem
|
|
237
|
+
|
|
238
|
+
If the bug is in Kindgi or the `kindgi` package and not in the pack's
|
|
239
|
+
code, load `kindgi-framework-feedback` and file it with
|
|
240
|
+
`kindgi feedback write`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SIGINT / SIGTERM → an AbortSignal long-lived commands (`kindgi dev`)
|
|
3
|
+
* watch to shut down cleanly: close watchers, stop the api-server, tear
|
|
4
|
+
* down the bundled containers.
|
|
5
|
+
*
|
|
6
|
+
* The listener stays registered (`on`, never `once`), so a dependency
|
|
7
|
+
* that re-raises a signal when it finds itself the only listener left
|
|
8
|
+
* (`signal-exit` v3 does) can't cut the graceful shutdown short. A second
|
|
9
|
+
* signal forces the exit, the usual Ctrl+C-twice contract.
|
|
10
|
+
*/
|
|
11
|
+
export interface SignalSource {
|
|
12
|
+
on(event: 'SIGINT' | 'SIGTERM', listener: () => void): unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function createStopSignal(source: SignalSource, forceExit: (code: number) => void): AbortSignal;
|
|
15
|
+
//# sourceMappingURL=stop-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-signal.d.ts","sourceRoot":"","sources":["../src/stop-signal.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC;CAChE;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAChC,WAAW,CAYb"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Copyright (C) 2026 Kindgi Inc.
|
|
3
|
+
export function createStopSignal(source, forceExit) {
|
|
4
|
+
const controller = new AbortController();
|
|
5
|
+
const onSignal = () => {
|
|
6
|
+
if (!controller.signal.aborted) {
|
|
7
|
+
controller.abort();
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
forceExit(130);
|
|
11
|
+
};
|
|
12
|
+
source.on('SIGINT', onSignal);
|
|
13
|
+
source.on('SIGTERM', onSignal);
|
|
14
|
+
return controller.signal;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=stop-signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-signal.js","sourceRoot":"","sources":["../src/stop-signal.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAiBjC,MAAM,UAAU,gBAAgB,CAC9B,MAAoB,EACpB,SAAiC;IAEjC,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,GAAS,EAAE;QAC1B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QACD,SAAS,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC,MAAM,CAAC;AAC3B,CAAC"}
|
|
@@ -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,69 @@
|
|
|
1
|
+
# {{PACK_NAME}}
|
|
2
|
+
|
|
3
|
+
A Kindgi pack — scaffolded by `kindgi init --template=minimal`.
|
|
4
|
+
|
|
5
|
+
Empty by design: the four discovery folders exist but ship no primitives.
|
|
6
|
+
Author your first via `defineTool` / `defineAgent` / `defineCheck` /
|
|
7
|
+
`defineFlow` from `@kindgi/sdk` — hover the exports for JSDoc.
|
|
8
|
+
|
|
9
|
+
## Layout
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
{{PACK_NAME}}/
|
|
13
|
+
├── kindgi.config.ts # pack id + version + discovery patterns
|
|
14
|
+
├── package.json # depends on @kindgi/sdk + zod
|
|
15
|
+
├── tsconfig.json
|
|
16
|
+
├── .claude/skills/ # SDK skills — Claude Code auto-loads per task
|
|
17
|
+
├── tools/ # place `<name>/index.ts` per tool
|
|
18
|
+
├── agents/ # place `<name>/index.ts` per agent
|
|
19
|
+
├── guardrails/ # place `<name>/index.ts` per check
|
|
20
|
+
└── flows/ # place `<name>/index.ts` per flow
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## AI coding assistants
|
|
24
|
+
|
|
25
|
+
`.claude/skills/` is auto-populated at `kindgi init` with per-primitive
|
|
26
|
+
guides: `kindgi-authoring-tools`, `kindgi-authoring-agents`,
|
|
27
|
+
`kindgi-authoring-guardrails`, `kindgi-getting-started` — plus
|
|
28
|
+
`kindgi-authoring-providers` (a real model), `kindgi-authoring-mcp-servers`
|
|
29
|
+
and `kindgi-framework-feedback`. Claude Code
|
|
30
|
+
loads them on-demand based on what you're editing — no configuration
|
|
31
|
+
needed. Read them directly if you want the mental model without an
|
|
32
|
+
assistant in the loop.
|
|
33
|
+
|
|
34
|
+
## Run
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pnpm install
|
|
38
|
+
pnpm typecheck # verify the pack compiles
|
|
39
|
+
kindgi dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The api-server ships with a built-in `demo.echo-agent` you can hit to
|
|
43
|
+
verify boot before authoring anything:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
kindgi runs start --agent=demo.echo-agent --input='{"userMessage":"hi"}'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Use a real model
|
|
50
|
+
|
|
51
|
+
`kindgi dev` gives a new pack `dev-echo`, a fallback provider that calls the
|
|
52
|
+
first tool and replies "Tool responded: …" — it answers only while no other
|
|
53
|
+
provider fits. To use Claude, with `kindgi dev` running, from another terminal:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
|
|
57
|
+
kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Claude takes over from dev-echo on the next turn; nothing to restart.
|
|
61
|
+
`--models=claude-haiku-4-5` registers one model only; `kindgi providers
|
|
62
|
+
presets` lists the presets (Gemini on Vertex AI too). Picking a model per
|
|
63
|
+
agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
|
|
64
|
+
|
|
65
|
+
## Note on `@kindgi/sdk` versioning
|
|
66
|
+
|
|
67
|
+
This template pins `@kindgi/sdk: "workspace:*"` because the SDK is not
|
|
68
|
+
yet published to npm. Until it is, add the pack to a pnpm workspace that
|
|
69
|
+
contains the Kindgi packages (`pnpm-workspace.yaml`).
|
|
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,6 @@
|
|
|
1
|
+
# pnpm 12+ reads settings from this file, not from `package.json`'s
|
|
2
|
+
# `pnpm` block. `allowBuilds` grants postinstall permission to
|
|
3
|
+
# specific dependencies — esbuild ships a native binary via
|
|
4
|
+
# postinstall that the vitest transform pipeline depends on.
|
|
5
|
+
allowBuilds:
|
|
6
|
+
esbuild: true
|
|
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
|
+
)
|