@kindgi/cli 0.1.10 → 0.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -32
- package/dist/build/containerfile.d.ts +2 -0
- package/dist/build/containerfile.d.ts.map +1 -1
- package/dist/build/containerfile.js +14 -3
- package/dist/build/containerfile.js.map +1 -1
- package/dist/build/defaults.d.ts +2 -0
- package/dist/build/defaults.d.ts.map +1 -1
- package/dist/build/defaults.js +8 -0
- package/dist/build/defaults.js.map +1 -1
- package/dist/build/hosted.d.ts +2 -9
- package/dist/build/hosted.d.ts.map +1 -1
- package/dist/build/hosted.js +4 -2
- package/dist/build/hosted.js.map +1 -1
- package/dist/build/pack-blocks.d.ts +51 -0
- package/dist/build/pack-blocks.d.ts.map +1 -0
- package/dist/build/pack-blocks.js +98 -0
- package/dist/build/pack-blocks.js.map +1 -0
- package/dist/build/runners.d.ts +5 -1
- package/dist/build/runners.d.ts.map +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/adapters.d.ts.map +1 -1
- package/dist/commands/adapters.js +12 -6
- package/dist/commands/adapters.js.map +1 -1
- package/dist/commands/agents.js +8 -8
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +159 -34
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +1 -1
- package/dist/commands/blocks.js.map +1 -1
- package/dist/commands/build.d.ts +17 -6
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +136 -89
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/connection-apps.d.ts +3 -0
- package/dist/commands/connection-apps.d.ts.map +1 -0
- package/dist/commands/connection-apps.js +239 -0
- package/dist/commands/connection-apps.js.map +1 -0
- package/dist/commands/connections.d.ts +44 -0
- package/dist/commands/connections.d.ts.map +1 -0
- package/dist/commands/connections.js +385 -0
- package/dist/commands/connections.js.map +1 -0
- package/dist/commands/conversations.js +1 -1
- package/dist/commands/conversations.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +178 -97
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +10 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +177 -87
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +8 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/env-scoped.d.ts.map +1 -1
- package/dist/commands/env-scoped.js +37 -22
- package/dist/commands/env-scoped.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +35 -22
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/eval-runs.js +6 -6
- package/dist/commands/eval-runs.js.map +1 -1
- package/dist/commands/eval-suites.js +9 -9
- package/dist/commands/eval-suites.js.map +1 -1
- package/dist/commands/exports.d.ts.map +1 -1
- package/dist/commands/exports.js +35 -9
- package/dist/commands/exports.js.map +1 -1
- package/dist/commands/feedback.d.ts.map +1 -1
- package/dist/commands/feedback.js +4 -3
- package/dist/commands/feedback.js.map +1 -1
- package/dist/commands/gate-policies.d.ts.map +1 -1
- package/dist/commands/gate-policies.js +7 -7
- package/dist/commands/gate-policies.js.map +1 -1
- package/dist/commands/helpers.d.ts +9 -0
- package/dist/commands/helpers.d.ts.map +1 -1
- package/dist/commands/helpers.js +20 -0
- package/dist/commands/helpers.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +8 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +57 -45
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/judge-classes.js +4 -4
- package/dist/commands/judge-classes.js.map +1 -1
- package/dist/commands/judging-queue.d.ts +3 -0
- package/dist/commands/judging-queue.d.ts.map +1 -0
- package/dist/commands/judging-queue.js +105 -0
- package/dist/commands/judging-queue.js.map +1 -0
- package/dist/commands/judging-rules.d.ts +3 -0
- package/dist/commands/judging-rules.d.ts.map +1 -0
- package/dist/commands/judging-rules.js +351 -0
- package/dist/commands/judging-rules.js.map +1 -0
- package/dist/commands/judgments.d.ts.map +1 -1
- package/dist/commands/judgments.js +78 -36
- package/dist/commands/judgments.js.map +1 -1
- package/dist/commands/key.d.ts.map +1 -1
- package/dist/commands/key.js +107 -9
- package/dist/commands/key.js.map +1 -1
- package/dist/commands/license.d.ts.map +1 -1
- package/dist/commands/license.js +80 -23
- package/dist/commands/license.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +4 -4
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/people.js +8 -14
- package/dist/commands/people.js.map +1 -1
- package/dist/commands/promote.js +1 -1
- package/dist/commands/promote.js.map +1 -1
- package/dist/commands/proposals.d.ts.map +1 -1
- package/dist/commands/proposals.js +83 -30
- package/dist/commands/proposals.js.map +1 -1
- package/dist/commands/run-waits.d.ts +68 -19
- package/dist/commands/run-waits.d.ts.map +1 -1
- package/dist/commands/run-waits.js +82 -8
- package/dist/commands/run-waits.js.map +1 -1
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +70 -30
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/schedules.d.ts.map +1 -1
- package/dist/commands/schedules.js +35 -12
- package/dist/commands/schedules.js.map +1 -1
- package/dist/commands/secrets-copy.d.ts.map +1 -1
- package/dist/commands/secrets-copy.js +20 -12
- package/dist/commands/secrets-copy.js.map +1 -1
- package/dist/commands/secrets.d.ts.map +1 -1
- package/dist/commands/secrets.js +13 -8
- package/dist/commands/secrets.js.map +1 -1
- package/dist/commands/sign-in.js +2 -2
- package/dist/commands/sign-in.js.map +1 -1
- package/dist/commands/sites.d.ts.map +1 -1
- package/dist/commands/sites.js +13 -6
- package/dist/commands/sites.js.map +1 -1
- package/dist/commands/skills.d.ts +54 -3
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +169 -38
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/tokens.d.ts.map +1 -1
- package/dist/commands/tokens.js +9 -1
- package/dist/commands/tokens.js.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +9 -8
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/commands/webhooks.js +62 -24
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +18 -3
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +12 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +2 -0
- package/dist/context.js.map +1 -1
- package/dist/deploy/pack-blocks-gate.d.ts +12 -0
- package/dist/deploy/pack-blocks-gate.d.ts.map +1 -0
- package/dist/deploy/pack-blocks-gate.js +34 -0
- package/dist/deploy/pack-blocks-gate.js.map +1 -0
- package/dist/deploy/post.d.ts +9 -0
- package/dist/deploy/post.d.ts.map +1 -1
- package/dist/deploy/post.js +20 -3
- package/dist/deploy/post.js.map +1 -1
- package/dist/dev/defaults.d.ts.map +1 -1
- package/dist/dev/defaults.js +8 -1
- package/dist/dev/defaults.js.map +1 -1
- package/dist/dev/dev-only-imports.d.ts +7 -4
- package/dist/dev/dev-only-imports.d.ts.map +1 -1
- package/dist/dev/dev-only-imports.js +5 -5
- package/dist/dev/dev-only-imports.js.map +1 -1
- package/dist/dev/log-view.d.ts +4 -4
- package/dist/dev/log-view.d.ts.map +1 -1
- package/dist/dev/log-view.js +4 -4
- package/dist/dev/log-view.js.map +1 -1
- package/dist/dev/pack-service.d.ts +7 -1
- package/dist/dev/pack-service.d.ts.map +1 -1
- package/dist/dev/pack-service.js +36 -3
- package/dist/dev/pack-service.js.map +1 -1
- package/dist/dev/preview-expiry.d.ts +6 -7
- package/dist/dev/preview-expiry.d.ts.map +1 -1
- package/dist/dev/preview-expiry.js +7 -8
- package/dist/dev/preview-expiry.js.map +1 -1
- package/dist/dev/providers.d.ts +2 -1
- package/dist/dev/providers.d.ts.map +1 -1
- package/dist/dev/providers.js +28 -12
- package/dist/dev/providers.js.map +1 -1
- package/dist/dev/runners.d.ts +19 -0
- package/dist/dev/runners.d.ts.map +1 -1
- package/dist/dev/runtime-container.js +2 -3
- package/dist/dev/runtime-container.js.map +1 -1
- package/dist/dev/runtime-env.d.ts +2 -1
- package/dist/dev/runtime-env.d.ts.map +1 -1
- package/dist/dev/runtime-env.js +5 -5
- package/dist/dev/runtime-env.js.map +1 -1
- package/dist/dev/runtime-image.d.ts +14 -4
- package/dist/dev/runtime-image.d.ts.map +1 -1
- package/dist/dev/runtime-image.js +16 -4
- package/dist/dev/runtime-image.js.map +1 -1
- package/dist/dev/runtime-registry.d.ts +10 -2
- package/dist/dev/runtime-registry.d.ts.map +1 -1
- package/dist/dev/runtime-registry.js +30 -6
- package/dist/dev/runtime-registry.js.map +1 -1
- package/dist/dev/sandbox/index.js +1 -1
- package/dist/dev/sandbox/notices.d.ts +2 -0
- package/dist/dev/sandbox/notices.d.ts.map +1 -1
- package/dist/dev/sandbox/notices.js +5 -2
- package/dist/dev/sandbox/notices.js.map +1 -1
- package/dist/env/defaults.d.ts.map +1 -1
- package/dist/env/defaults.js +3 -1
- package/dist/env/defaults.js.map +1 -1
- package/dist/env/pack-env-plan.d.ts +4 -0
- package/dist/env/pack-env-plan.d.ts.map +1 -1
- package/dist/env/pack-env-plan.js +8 -2
- package/dist/env/pack-env-plan.js.map +1 -1
- package/dist/exports/create.d.ts +2 -0
- package/dist/exports/create.d.ts.map +1 -1
- package/dist/exports/create.js +10 -2
- package/dist/exports/create.js.map +1 -1
- package/dist/exports/plan.d.ts.map +1 -1
- package/dist/exports/plan.js +20 -0
- package/dist/exports/plan.js.map +1 -1
- package/dist/feedback/store.d.ts.map +1 -1
- package/dist/feedback/store.js +8 -19
- package/dist/feedback/store.js.map +1 -1
- package/dist/help.d.ts +6 -0
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +35 -1
- package/dist/help.js.map +1 -1
- package/dist/init/agent-access.d.ts +3 -2
- package/dist/init/agent-access.d.ts.map +1 -1
- package/dist/init/agent-access.js +5 -1
- package/dist/init/agent-access.js.map +1 -1
- package/dist/init/augment-scaffolder.d.ts +7 -0
- package/dist/init/augment-scaffolder.d.ts.map +1 -1
- package/dist/init/augment-scaffolder.js +15 -14
- package/dist/init/augment-scaffolder.js.map +1 -1
- package/dist/init/dependency-specs.d.ts +1 -0
- package/dist/init/dependency-specs.d.ts.map +1 -1
- package/dist/init/dependency-specs.js +27 -7
- package/dist/init/dependency-specs.js.map +1 -1
- package/dist/init/java-augment.d.ts +3 -0
- package/dist/init/java-augment.d.ts.map +1 -1
- package/dist/init/java-augment.js +16 -15
- package/dist/init/java-augment.js.map +1 -1
- package/dist/init/python-augment.d.ts +3 -0
- package/dist/init/python-augment.d.ts.map +1 -1
- package/dist/init/python-augment.js +15 -14
- package/dist/init/python-augment.js.map +1 -1
- package/dist/init/scala-augment.d.ts +8 -1
- package/dist/init/scala-augment.d.ts.map +1 -1
- package/dist/init/scala-augment.js +32 -17
- package/dist/init/scala-augment.js.map +1 -1
- package/dist/key/defaults.d.ts.map +1 -1
- package/dist/key/defaults.js +6 -1
- package/dist/key/defaults.js.map +1 -1
- package/dist/key/runners.d.ts +4 -1
- package/dist/key/runners.d.ts.map +1 -1
- package/dist/license/protocol.d.ts +3 -2
- package/dist/license/protocol.d.ts.map +1 -1
- package/dist/license/protocol.js +3 -2
- package/dist/license/protocol.js.map +1 -1
- package/dist/license/renew.d.ts +6 -0
- package/dist/license/renew.d.ts.map +1 -1
- package/dist/license/renew.js +9 -6
- package/dist/license/renew.js.map +1 -1
- package/dist/main.d.ts +10 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +19 -5
- package/dist/main.js.map +1 -1
- package/dist/output.d.ts +6 -0
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +8 -0
- package/dist/output.js.map +1 -1
- package/dist/parse.d.ts +1 -1
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +1 -1
- package/dist/parse.js.map +1 -1
- package/dist/private-file.d.ts +23 -0
- package/dist/private-file.d.ts.map +1 -0
- package/dist/private-file.js +65 -0
- package/dist/private-file.js.map +1 -0
- package/dist/progress-head.d.ts +13 -0
- package/dist/progress-head.d.ts.map +1 -0
- package/dist/progress-head.js +30 -0
- package/dist/progress-head.js.map +1 -0
- package/dist/progress-lines.d.ts +29 -0
- package/dist/progress-lines.d.ts.map +1 -0
- package/dist/progress-lines.js +35 -0
- package/dist/progress-lines.js.map +1 -0
- package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +6 -6
- package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +2 -2
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +3 -3
- package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +39 -6
- package/dist/sdk-skills/kindgi-fix-corrections/SKILL.md +262 -0
- package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-getting-started/SKILL.md +43 -9
- package/dist/sdk-skills/kindgi-java-authoring-agents/SKILL.md +5 -5
- package/dist/sdk-skills/kindgi-java-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-java-authoring-guardrails/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-java-authoring-tools/SKILL.md +91 -9
- package/dist/sdk-skills/kindgi-java-getting-started/SKILL.md +38 -9
- package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +4 -4
- package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +43 -8
- package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +39 -11
- package/dist/sdk-skills/kindgi-scala-authoring-agents/SKILL.md +5 -5
- package/dist/sdk-skills/kindgi-scala-authoring-flows/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-scala-authoring-guardrails/SKILL.md +1 -1
- package/dist/sdk-skills/kindgi-scala-authoring-tools/SKILL.md +82 -7
- package/dist/sdk-skills/kindgi-scala-getting-started/SKILL.md +38 -9
- package/dist/sdk-skills/kindgi-using/SKILL.md +50 -21
- package/dist/templates/drupal/AGENTS.md +2 -1
- package/dist/templates/follow-up/.nvmrc +1 -0
- package/dist/templates/follow-up/AGENTS.md +83 -0
- package/dist/templates/follow-up/README.md.tmpl +111 -0
- package/dist/templates/follow-up/agents/follow-up/index.test.ts.tmpl +26 -0
- package/dist/templates/follow-up/agents/follow-up/index.ts.tmpl +53 -0
- package/dist/templates/follow-up/gitignore +8 -0
- package/dist/templates/follow-up/kindgi.config.ts.tmpl +45 -0
- package/dist/templates/follow-up/package.json.tmpl +30 -0
- package/dist/templates/follow-up/pnpm-workspace.yaml +9 -0
- package/dist/templates/follow-up/tools/gmail-send/index.test.ts.tmpl +60 -0
- package/dist/templates/follow-up/tools/gmail-send/index.ts.tmpl +14 -0
- package/dist/templates/follow-up/tsconfig.json.tmpl +27 -0
- package/dist/templates/follow-up/vitest.config.ts.tmpl +14 -0
- package/dist/templates/java/AGENTS.md +2 -1
- package/dist/templates/minimal/AGENTS.md +2 -1
- package/dist/templates/python/AGENTS.md +2 -1
- package/dist/templates/sample/AGENTS.md +2 -1
- package/dist/templates/scala/AGENTS.md +2 -1
- package/dist/templates/woocommerce/AGENTS.md +12 -3
- package/dist/templates/woocommerce/README.md.tmpl +29 -5
- package/dist/templates/woocommerce/agents/store-agent/index.test.ts.tmpl +38 -7
- package/dist/templates/woocommerce/agents/store-agent/index.ts.tmpl +7 -12
- package/dist/templates/woocommerce/blocks/store-agent-prompt.json.tmpl +10 -0
- package/dist/templates/woocommerce/blocks/store-agent-prompt.liquid.tmpl +7 -0
- package/dist/templates/woocommerce/kindgi.config.ts.tmpl +1 -0
- package/dist/value-target.d.ts +4 -2
- package/dist/value-target.d.ts.map +1 -1
- package/dist/value-target.js +8 -5
- package/dist/value-target.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a command's lines go (`kindgi build`'s, `kindgi deploy`'s): each to
|
|
3
|
+
* `progress` as it comes when the CLI streams them, else kept for the
|
|
4
|
+
* result's stderr (`kept`). `quiet` leaves out each `line`, never a
|
|
5
|
+
* `problem`: an error or a warning is said either way.
|
|
6
|
+
*/
|
|
7
|
+
export interface ProgressLines {
|
|
8
|
+
readonly line: (s: string) => void;
|
|
9
|
+
/** A line that's an error or a warning: said under `quiet` too, as `kindgi dev` does. */
|
|
10
|
+
readonly problem: (s: string) => void;
|
|
11
|
+
readonly kept: () => string;
|
|
12
|
+
}
|
|
13
|
+
export declare function progressLines(progress: ((text: string) => void) | undefined, quiet: boolean): ProgressLines;
|
|
14
|
+
/** A line a command says, and whether it's an error or a warning: said under `--quiet` too. */
|
|
15
|
+
export interface SaidLine {
|
|
16
|
+
readonly text: string;
|
|
17
|
+
readonly problem: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `lines` as a result's stderr, each ending in a newline. Under `quiet`,
|
|
21
|
+
* only the errors and warnings, so a blank line that sets notes apart is
|
|
22
|
+
* a note too.
|
|
23
|
+
*/
|
|
24
|
+
export declare function renderLines(lines: readonly SaidLine[], quiet: boolean): string;
|
|
25
|
+
/** A note: left out under `--quiet`. */
|
|
26
|
+
export declare const note: (text: string) => SaidLine;
|
|
27
|
+
/** An error or a warning: said under `--quiet` too. */
|
|
28
|
+
export declare const warning: (text: string) => SaidLine;
|
|
29
|
+
//# sourceMappingURL=progress-lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-lines.d.ts","sourceRoot":"","sources":["../src/progress-lines.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC9C,KAAK,EAAE,OAAO,GACb,aAAa,CAaf;AAED,+FAA+F;AAC/F,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAK9E;AAED,wCAAwC;AACxC,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,QAAsC,CAAC;AAE3E,uDAAuD;AACvD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,KAAG,QAAqC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Copyright (C) 2026 Kindgi Inc.
|
|
3
|
+
export function progressLines(progress, quiet) {
|
|
4
|
+
const kept = [];
|
|
5
|
+
const say = (s) => {
|
|
6
|
+
if (progress === undefined)
|
|
7
|
+
kept.push(s);
|
|
8
|
+
else
|
|
9
|
+
progress(`${s}\n`);
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
line: (s) => {
|
|
13
|
+
if (!quiet)
|
|
14
|
+
say(s);
|
|
15
|
+
},
|
|
16
|
+
problem: say,
|
|
17
|
+
kept: () => (kept.length === 0 ? '' : `${kept.join('\n')}\n`),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* `lines` as a result's stderr, each ending in a newline. Under `quiet`,
|
|
22
|
+
* only the errors and warnings, so a blank line that sets notes apart is
|
|
23
|
+
* a note too.
|
|
24
|
+
*/
|
|
25
|
+
export function renderLines(lines, quiet) {
|
|
26
|
+
return lines
|
|
27
|
+
.filter((l) => !quiet || l.problem)
|
|
28
|
+
.map((l) => `${l.text}\n`)
|
|
29
|
+
.join('');
|
|
30
|
+
}
|
|
31
|
+
/** A note: left out under `--quiet`. */
|
|
32
|
+
export const note = (text) => ({ text, problem: false });
|
|
33
|
+
/** An error or a warning: said under `--quiet` too. */
|
|
34
|
+
export const warning = (text) => ({ text, problem: true });
|
|
35
|
+
//# sourceMappingURL=progress-lines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-lines.js","sourceRoot":"","sources":["../src/progress-lines.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAejC,MAAM,UAAU,aAAa,CAC3B,QAA8C,EAC9C,KAAc;IAEd,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,GAAG,GAAG,CAAC,CAAS,EAAQ,EAAE;QAC9B,IAAI,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;YACpC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC;IACF,OAAO;QACL,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;YACV,IAAI,CAAC,KAAK;gBAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;KAC9D,CAAC;AACJ,CAAC;AAQD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAA0B,EAAE,KAAc;IACpE,OAAO,KAAK;SACT,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;SACzB,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,wCAAwC;AACxC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAY,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAE3E,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAY,EAAY,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -13,7 +13,7 @@ description: >
|
|
|
13
13
|
type: core
|
|
14
14
|
library: "@kindgi/sdk"
|
|
15
15
|
version: "0.4.8"
|
|
16
|
-
sdk_version: "0.
|
|
16
|
+
sdk_version: "0.2.0-rc.0"
|
|
17
17
|
pack_languages: [node]
|
|
18
18
|
sources:
|
|
19
19
|
- packages/agents/src/types.ts
|
|
@@ -138,9 +138,9 @@ export default defined.value;
|
|
|
138
138
|
`hitl.separateApprover` (`true`, or `{ overrides: { '<tool id>': true } }`)
|
|
139
139
|
makes a tool's approval need someone other than whoever asked.
|
|
140
140
|
- **`budget`** — per-turn ceiling. `maxSteps` caps model-call cycles
|
|
141
|
-
(default 8); `maxCostUsd` caps model spend; `maxWallMs`
|
|
142
|
-
time (default 120 000). Exceeding steps or cost fails the
|
|
143
|
-
`budget-exceeded`; running out of wall time aborts it
|
|
141
|
+
(default 8, at most 32); `maxCostUsd` caps model spend; `maxWallMs`
|
|
142
|
+
caps wall time (default 120 000). Exceeding steps or cost fails the
|
|
143
|
+
turn with `budget-exceeded`; running out of wall time aborts it
|
|
144
144
|
(`agent-turn-aborted`, reason `timeout`).
|
|
145
145
|
|
|
146
146
|
- **`output`** — optional typed result: `{ schema, name?, maxRepairs? }`
|
|
@@ -189,7 +189,7 @@ export default defined.value;
|
|
|
189
189
|
reliable tool calling. `{ instructionTypes: ['acme.policy'] }` turns a
|
|
190
190
|
retrieved, verified fact of those types into an instruction
|
|
191
191
|
("Policies (verified)"). See
|
|
192
|
-
https://docs.kindgi.com/v0.
|
|
192
|
+
https://docs.kindgi.com/v0.2/guides/agents/give-an-agent-memory/.
|
|
193
193
|
|
|
194
194
|
## What a turn receives
|
|
195
195
|
|
|
@@ -282,7 +282,7 @@ concerns, not author-time.
|
|
|
282
282
|
|
|
283
283
|
- Type surface: `hover any @kindgi/sdk/define export` in your editor
|
|
284
284
|
for full JSDoc.
|
|
285
|
-
- API reference: https://docs.kindgi.com/v0.
|
|
285
|
+
- API reference: https://docs.kindgi.com/v0.2/reference/typescript/sdk/kindgi/sdk/define/ (every `define*` spec, field by field).
|
|
286
286
|
- Common patterns: the `sample` template's `agents/echo-agent`
|
|
287
287
|
demonstrates the smallest tool-calling shape.
|
|
288
288
|
|
|
@@ -18,7 +18,7 @@ description: >
|
|
|
18
18
|
type: core
|
|
19
19
|
library: "@kindgi/sdk"
|
|
20
20
|
version: "0.3.10"
|
|
21
|
-
sdk_version: "0.
|
|
21
|
+
sdk_version: "0.2.0-rc.0"
|
|
22
22
|
pack_languages: [node]
|
|
23
23
|
sources:
|
|
24
24
|
- packages/guardrails/src/types.ts
|
|
@@ -371,7 +371,7 @@ ready for the stricter enforcement.
|
|
|
371
371
|
- Type surface: hover any `@kindgi/sdk/define` export for full JSDoc;
|
|
372
372
|
`Guardrail`, `defineGuardrail` and the built-in checks are in
|
|
373
373
|
`@kindgi/guardrails`.
|
|
374
|
-
- API reference: https://docs.kindgi.com/v0.
|
|
374
|
+
- API reference: https://docs.kindgi.com/v0.2/reference/typescript/sdk/kindgi/sdk/define/
|
|
375
375
|
- Built-in check implementations: `packages/guardrails/src/checks.ts`.
|
|
376
376
|
|
|
377
377
|
## When the framework itself is the problem
|
|
@@ -27,7 +27,7 @@ description: >
|
|
|
27
27
|
type: core
|
|
28
28
|
library: "@kindgi/sdk"
|
|
29
29
|
version: "0.9.17"
|
|
30
|
-
sdk_version: "0.
|
|
30
|
+
sdk_version: "0.2.0-rc.0"
|
|
31
31
|
pack_languages: [node, python, java, scala]
|
|
32
32
|
sources:
|
|
33
33
|
- packages/adapters/model-anthropic/src/provider.ts
|
|
@@ -151,7 +151,7 @@ kindgi deploy --hosted --env=prod
|
|
|
151
151
|
presets` for `azure-openai`'s settings.
|
|
152
152
|
|
|
153
153
|
The whole flow, from signing the CLI in to going live:
|
|
154
|
-
https://docs.kindgi.com/v0.
|
|
154
|
+
https://docs.kindgi.com/v0.2/hosted/deploy-your-agent/#your-model-key-and-its-provider
|
|
155
155
|
|
|
156
156
|
## Path A — Hosted, native Anthropic
|
|
157
157
|
|
|
@@ -705,7 +705,7 @@ moved to `isolated` that signs in as the runtime isn't used there: a turn
|
|
|
705
705
|
that needs it fails with `422 capability-routing-failed`. Unregister it, and
|
|
706
706
|
register it again with a key.
|
|
707
707
|
|
|
708
|
-
Docs: https://docs.kindgi.com/v0.
|
|
708
|
+
Docs: https://docs.kindgi.com/v0.2/guides/models/#with-a-bedrock-api-key
|
|
709
709
|
|
|
710
710
|
## How the router picks between multiple providers + models
|
|
711
711
|
|
|
@@ -13,7 +13,7 @@ description: >
|
|
|
13
13
|
type: core
|
|
14
14
|
library: "@kindgi/sdk"
|
|
15
15
|
version: "0.4.13"
|
|
16
|
-
sdk_version: "0.
|
|
16
|
+
sdk_version: "0.2.0-rc.0"
|
|
17
17
|
pack_languages: [node]
|
|
18
18
|
sources:
|
|
19
19
|
- packages/tools/src/types.ts
|
|
@@ -124,7 +124,7 @@ The output side is the reverse: the advertised output schema requires every fiel
|
|
|
124
124
|
ctx.log?.info('refund issued', { orderId, amountCents });
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
Put values in `fields`, never in the message. Log ids, amounts and outcomes, never what a person typed (a refund's reason, a message, an address): the log is read by whoever operates the runtime, not only by the person the data is about. Docs: https://docs.kindgi.com/v0.
|
|
127
|
+
Put values in `fields`, never in the message. Log ids, amounts and outcomes, never what a person typed (a refund's reason, a message, an address): the log is read by whoever operates the runtime, not only by the person the data is about. Docs: https://docs.kindgi.com/v0.2/guides/tools/write-a-tool/#log-from-a-tool
|
|
128
128
|
|
|
129
129
|
### Configuration and secrets
|
|
130
130
|
|
|
@@ -172,6 +172,38 @@ const defined = defineTool({
|
|
|
172
172
|
|
|
173
173
|
Everything else comes from the process environment: `process.env.CITATOR_URL`. The pack service runs with the pack's env files in `kindgi dev` (less any secret stored with `kindgi secrets set`, which a tool declares and reads from `ctx.secrets`, and any model provider's key, which no tool gets), and with the container's environment in an image. Declare the names your code reads in `kindgi.config.ts`, `env: { required: ['CITATOR_URL'], optional: [...] }`: a deployment injects exactly those, a pack service missing a required one isn't ready and says which, and `kindgi dev` warns about it. In an image the pack service also drops every variable the pack doesn't declare before your code loads (`kindgi dev` keeps them), so an undeclared name works locally and is unset once deployed: declare every name the code reads. Values per environment go in `environments.<name>.env`, secrets only as references.
|
|
174
174
|
|
|
175
|
+
### Connections to other apps
|
|
176
|
+
|
|
177
|
+
A tool that acts in another app as a person or as the company (sending mail, opening an issue) declares a **connection**, never a secret holding someone's token, and reads the call's short-lived token from `ctx.connections` (runtime 0.2.0 or later):
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import { ConnectionRejectedError, defineTool } from '@kindgi/sdk/define';
|
|
181
|
+
|
|
182
|
+
const defined = defineTool({
|
|
183
|
+
// …id, description, version, input, output, effects…
|
|
184
|
+
needsSpec: {
|
|
185
|
+
connections: { mail: { app: 'google', permissions: ['gmail.send'], as: 'person' } },
|
|
186
|
+
},
|
|
187
|
+
handler: async (input, ctx) => {
|
|
188
|
+
const mail = ctx.connections?.mail;
|
|
189
|
+
const res = await fetch(url, { headers: { authorization: `Bearer ${mail?.accessToken}` } });
|
|
190
|
+
if (res.status === 401) throw new ConnectionRejectedError('mail');
|
|
191
|
+
// …
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
- **Whose connection:** `as: 'person'` is the connection of the person the run acts as (whoever started it, or the owner of the schedule or webhook that did); `as: 'company'` is the company's. The runtime picks it from the run, never from the input or the model. A run that acts as nobody (a service account's, an event's) fails a `'person'` call with `connection-needs-a-person`.
|
|
197
|
+
- **The token:** `accessToken` is current for this call only. Never keep, print, log or return it; it never reaches the journal. `account.label` says whose account it is (`ana@acme.com`).
|
|
198
|
+
- **A 401 from the app:** throw `new ConnectionRejectedError('mail')`, with the connection's name (a second argument can say what the app answered, never the token), or your own error with it as its `cause`. The runtime renews the token once and runs the call again; refused again, the call fails with `connection-rejected`.
|
|
199
|
+
- **An HTTP tool** sends the token with no code: `authorization: { kind: 'connection', connection: 'mail' }`.
|
|
200
|
+
- **Ready-made tools:** for Gmail, Outlook, GitHub and LinkedIn, include one from `@kindgi/connections` instead of writing it. Each is a factory, and the pack names its id; there's no default, because a tool id is the tenant's, filed under the first project that publishes it. A tool folder's `index.ts` is one line, `export default gmailSend({ id: 'acme.gmail.send' })` (`@kindgi/connections/google/tools`); `githubIssuesList`, `githubLabelsList` and `githubIssuesAddLabels` come from `@kindgi/connections/github/tools`, `outlookSend`, `outlookMessagesList` and `outlookMessageGet` from `@kindgi/connections/microsoft/tools`, and `linkedinPost` from `@kindgi/connections/linkedin/tools`. Agents and approval settings use the pack's id.
|
|
201
|
+
- **Your own calls to an app's API:** `appFetch(ctx, { entry, connection, toolId, url, method, headers, body })` from `@kindgi/connections/app-fetch` sends the connection's token as the only `Authorization`, paces calls by the entry's `rateLimits` (`toolId` is what its `costs` charge; 1 when not listed), tries a busy answer again, and throws a 401 as `ConnectionRejectedError`.
|
|
202
|
+
- **Unattended runs:** in a run no person started, a tool that uses an `as: 'person'` connection waits for that person's yes, unless it's marked `mutating: false` (mark read-only tools so). The agent's `conversationPolicy.hitl` can't lift it; only a trigger's `toolsAllowedUnattended` can, which a project admin sets, as for `needsApprovalWhenUnattended` (below).
|
|
203
|
+
- **In a unit test:** `ctx.connections` is optional in the type; build a context with `toolContextForTest({ connections: { mail: { accessToken: 'test', account: { id: '1', label: 'ana@acme.com' }, … } } })` (`@kindgi/sdk/define`).
|
|
204
|
+
|
|
205
|
+
Docs: https://docs.kindgi.com/v0.2/guides/connections/use-a-connection/
|
|
206
|
+
|
|
175
207
|
## Declarative HTTP spec
|
|
176
208
|
|
|
177
209
|
```ts
|
|
@@ -231,6 +263,7 @@ The kinds are `reads`, `writes`, `deletes`, `network`, `spawns-run`, `emits-even
|
|
|
231
263
|
|
|
232
264
|
- **An agent's call waits** for a person's yes, whatever the agent's `conversationPolicy.hitl.tools` says. The agent's rules can't lift it: agents are reused, and the tool's author knows what it does.
|
|
233
265
|
- **A flow's tool step that calls it is refused.** Put the tool behind an agent step instead, whose call waits.
|
|
266
|
+
- **A trigger can lift both, for its own runs only.** A project admin names the tool in a webhook trigger's or a schedule's `toolsAllowedUnattended` (`--allow-unattended=<tool-id>` on `kindgi webhooks` and `kindgi schedules`). In that trigger's runs, the tool is then as in a run a person started. The tenant's approval rules still apply.
|
|
234
267
|
|
|
235
268
|
In a run a person started (signed in, or with their own API key), the agent's rules decide, as for any tool. Absent means `false`. Declare it on a tool that moves money or changes something people rely on:
|
|
236
269
|
|
|
@@ -240,9 +273,9 @@ In a run a person started (signed in, or with their own API key), the agent's ru
|
|
|
240
273
|
needsApprovalWhenUnattended: true,
|
|
241
274
|
```
|
|
242
275
|
|
|
243
|
-
Docs: https://docs.kindgi.com/v0.
|
|
276
|
+
Docs: https://docs.kindgi.com/v0.2/guides/approvals/ask-before-a-tool-runs/#when-no-person-started-the-run
|
|
244
277
|
|
|
245
|
-
A step can run more than once (resumed after an approval, retried after a failure, run again after a crash), so a tool that writes uses `ctx.idempotencyKey`: the same every time this call runs, different for every other call. Pass it to the system you write to (an `Idempotency-Key` header, a client reference, a unique column) or look for it there first, and a refund never goes out twice. Not `ctx.requestId`: a model's call id is only unique within one of its answers. The key is absent outside a run and from a runtime before 0.1.6. Docs: https://docs.kindgi.com/v0.
|
|
278
|
+
A step can run more than once (resumed after an approval, retried after a failure, run again after a crash), so a tool that writes uses `ctx.idempotencyKey`: the same every time this call runs, different for every other call. Pass it to the system you write to (an `Idempotency-Key` header, a client reference, a unique column) or look for it there first, and a refund never goes out twice. Not `ctx.requestId`: a model's call id is only unique within one of its answers. The key is absent outside a run and from a runtime before 0.1.6. Docs: https://docs.kindgi.com/v0.2/guides/tools/write-a-tool/#make-a-side-effect-happen-once
|
|
246
279
|
|
|
247
280
|
## Tool id convention
|
|
248
281
|
|
|
@@ -381,7 +414,7 @@ run start via `semver.maxSatisfying`. No implicit `:latest`.
|
|
|
381
414
|
folder, `~/.aws`) or any `.env*` file, and gets `EPERM` there. A tool that
|
|
382
415
|
needs a path names it in `kindgi.config.ts`: `dev: { sandbox: { allowRead: ['~/.aws'] } }`.
|
|
383
416
|
Never set `KINDGI_DEV_SANDBOX=off` or `dev.sandbox: false` to get past it
|
|
384
|
-
(https://docs.kindgi.com/v0.
|
|
417
|
+
(https://docs.kindgi.com/v0.2/guides/secrets/dev-sandbox/).
|
|
385
418
|
|
|
386
419
|
12. **Importing a Next.js module that has `import 'server-only'`.** Outside
|
|
387
420
|
Next.js that line stops the module from loading, so the tool fails
|
|
@@ -436,7 +469,7 @@ run start via `semver.maxSatisfying`. No implicit `:latest`.
|
|
|
436
469
|
- Type surface: `hover any @kindgi/sdk/define export` in your editor
|
|
437
470
|
for full JSDoc — every field on `DefineToolSpec` / `ToolManifest`
|
|
438
471
|
documents purpose, when to set it, and gotchas.
|
|
439
|
-
- API reference: https://docs.kindgi.com/v0.
|
|
472
|
+
- API reference: https://docs.kindgi.com/v0.2/reference/typescript/sdk/kindgi/sdk/define/ (every `define*` spec, field by field).
|
|
440
473
|
- Common patterns: check the `sample` template (`kindgi init
|
|
441
474
|
--template=sample`) for working examples of both authoring modes.
|
|
442
475
|
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kindgi-fix-corrections
|
|
3
|
+
description: >
|
|
4
|
+
Turn the experts' corrections of a Kindgi agent into fixes. Load this when
|
|
5
|
+
the person says "fix what the experts corrected", "the agent keeps getting
|
|
6
|
+
<X> wrong, correct it", "turn the refund agent's corrections into changes",
|
|
7
|
+
or points you at an agent's "no" judgments. The loop: pull the runs an
|
|
8
|
+
expert marked wrong, read why, and sort each correction to where it belongs
|
|
9
|
+
— a rule in code, a setting, an approval rule, or the agent's instructions —
|
|
10
|
+
add a pack test per correction, then publish and ask a person to make the
|
|
11
|
+
new version live, naming the corrections it fixes. Making a version live
|
|
12
|
+
and approving it stay with the person, and a correction that would loosen
|
|
13
|
+
anything — raise a limit, widen a window, drop a check — goes to the owner,
|
|
14
|
+
not the agent.
|
|
15
|
+
type: core
|
|
16
|
+
library: "@kindgi/sdk"
|
|
17
|
+
version: "0.1.0"
|
|
18
|
+
sdk_version: "0.2.0-rc.0"
|
|
19
|
+
pack_languages: [node, python, java, scala]
|
|
20
|
+
sources:
|
|
21
|
+
- packages/cli/src/commands/judgments.ts
|
|
22
|
+
- packages/cli/src/commands/runs.ts
|
|
23
|
+
- packages/cli/src/commands/blocks.ts
|
|
24
|
+
- packages/cli/src/commands/agents.ts
|
|
25
|
+
- packages/cli/src/commands/eval-runs.ts
|
|
26
|
+
- packages/cli/src/commands/test.ts
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Fixing what the experts corrected
|
|
30
|
+
|
|
31
|
+
> **Running `kindgi`:** in a Node project the CLI is a devDependency
|
|
32
|
+
> (`@kindgi/cli`), not a global command. Run it through the project's
|
|
33
|
+
> package manager — `pnpm exec kindgi …`, `npx --no -- kindgi …` (npm),
|
|
34
|
+
> `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
|
|
35
|
+
> `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`. A Java
|
|
36
|
+
> or Scala pack (`kindgi.config.json`) runs the CLI it pins: `./kindgiw …`.
|
|
37
|
+
> Commands below are written `kindgi …` for brevity.
|
|
38
|
+
|
|
39
|
+
An expert — a support lead, a claims reviewer, an editor — marks a run's
|
|
40
|
+
answer wrong and says why. Your job is to turn those corrections into
|
|
41
|
+
changes to the agent, each at the layer where it belongs, so the agent
|
|
42
|
+
stops making the mistake and a person can see the mistake is gone.
|
|
43
|
+
|
|
44
|
+
A correction is not always a prompt change. A store's "never refund
|
|
45
|
+
shipping" belongs in the refund tool's code, where it's checked every time,
|
|
46
|
+
not in instructions a model may or may not follow. Sorting each correction
|
|
47
|
+
to the right layer is your call, not Kindgi's: Kindgi gives you the
|
|
48
|
+
corrections and the tools to change each layer.
|
|
49
|
+
|
|
50
|
+
## What stays with the person
|
|
51
|
+
|
|
52
|
+
1. **Never loosen a rule — a loosening correction goes to the owner.** Some
|
|
53
|
+
corrections ask for a policy *looser* than the one in force: with a 14-day
|
|
54
|
+
return window, "should have refunded — 20 days is fine for us" wants the
|
|
55
|
+
window widened; others want a limit raised, a check dropped, or a tool to
|
|
56
|
+
stop asking for approval. This skill makes none of those — it hands the
|
|
57
|
+
correction to the owner, quoted, and lets them decide. A refusal the
|
|
58
|
+
*current* rule already allows is not a loosening: the agent applied the rule
|
|
59
|
+
wrong ("should have refunded — it was inside the 14 days"), nothing about the
|
|
60
|
+
policy changes, so you fix it like any other correction — in code with a
|
|
61
|
+
test, or in the instructions through Improve. The corrections you make carry
|
|
62
|
+
out a rule the agent got wrong, tighten a rule, or change how the agent talks
|
|
63
|
+
— never loosen the policy.
|
|
64
|
+
2. **Making a version live is the person's.** You publish a new version and
|
|
65
|
+
*ask* for it with `kindgi agents promote … --reason`. When the scope's
|
|
66
|
+
release gate policy has `approvals`, the promotion waits for a second person
|
|
67
|
+
(`pending-approval`) — don't try to get around it.
|
|
68
|
+
3. **The pulled runs hold real conversations.** A run you pull is a real
|
|
69
|
+
customer's. Keep it out of git. Write every pack test with invented data
|
|
70
|
+
— made-up order ids, amounts and names — never a customer's words or
|
|
71
|
+
details. Never paste a whole run, or any customer's data, into the pack,
|
|
72
|
+
a commit, or a message.
|
|
73
|
+
|
|
74
|
+
## Step 1 — Pull the corrections
|
|
75
|
+
|
|
76
|
+
The corrections are the agent's "no" judgments. Start from the version the
|
|
77
|
+
agent is running now, so you don't re-fix something an earlier version already
|
|
78
|
+
fixed:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
kindgi agents live acme-store.refunds --project=<project-id>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`agents live` shows the version a run would use for the project (and
|
|
85
|
+
`agents live-versions` lists every scope with a live version). List that
|
|
86
|
+
version's "no" judgments — and, as you work through them, newer versions':
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
kindgi judgments list --agent=acme-store.refunds --agent-version=1.0.3 --verdict=no
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- `--agent-version` (it needs `--agent`) scopes to one version — the live one,
|
|
93
|
+
to start. Older versions' corrections may already be fixed; without a version
|
|
94
|
+
you get every version's.
|
|
95
|
+
- `--verdict=no` keeps only the corrections. (Leave it off to see what the
|
|
96
|
+
experts confirmed as right, too.)
|
|
97
|
+
- `--class=<judge-class-id>` keeps only one judge class — use it to take
|
|
98
|
+
only the experts' corrections once the project names its experts.
|
|
99
|
+
|
|
100
|
+
Kindgi doesn't hand out corrections: two people's coding agents can pull the
|
|
101
|
+
same "no" judgments, so agree outside Kindgi who takes which before you start.
|
|
102
|
+
|
|
103
|
+
Read each one in full for the reason the expert gave and the run it's on:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
kindgi judgments show <judgment-id>
|
|
107
|
+
kindgi runs get <run-id>
|
|
108
|
+
kindgi runs journal <run-id>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`runs get` is the run's snapshot; `runs journal` is its durable record,
|
|
112
|
+
step by step, where the agent's tool calls and their arguments are. Between
|
|
113
|
+
the correction's reason and the run, you have what the agent did and what it
|
|
114
|
+
should have done.
|
|
115
|
+
|
|
116
|
+
An expert can also have said exactly what the run should have done (runtime
|
|
117
|
+
0.2.0 or later): the judgment then has a `correction`, with `calls` (each
|
|
118
|
+
`{ tool, args }`, with only the argument fields that matter) and `notCalled`
|
|
119
|
+
(the tools it shouldn't have called). Take those as what the pack test
|
|
120
|
+
asserts. It's the expert's: never record or change a correction yourself.
|
|
121
|
+
Test cases built from the run check each new version against it.
|
|
122
|
+
|
|
123
|
+
## Step 2 — Sort each correction to its layer
|
|
124
|
+
|
|
125
|
+
| The expert wrote | Where it belongs | How you change it |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| "Never refund shipping", "final sale: no refund", "over 50 on a first order, ask a person" | a rule in **code** — the tool checks it every time; a cap sends the case to a tool that always asks | edit the tool and add a test (your language's `kindgi-authoring-tools`), then `kindgi deploy` |
|
|
128
|
+
| "Our return window is 14 days, not 30" | a **setting** the owner can change | publish the settings block, derive a version that pins it (Step 4) |
|
|
129
|
+
| "Always have a person approve a refund" | an **approval rule** — a tenant policy that makes a tool always ask; it keys on the tool, not its arguments | a person sets it (the owner or the approver); point them to it, don't change it in code |
|
|
130
|
+
| "Store credit before cash", "too stiff", "say when the money arrives" | the agent's **instructions** | leave it to Improve, run on the test cases (`kindgi proposals improve`, the improve guide) |
|
|
131
|
+
|
|
132
|
+
If a correction fits none of these, treat it as a code rule when it must
|
|
133
|
+
hold every time, and as instructions when it's a matter of judgment.
|
|
134
|
+
|
|
135
|
+
## Step 3 — Make the change, with a test per correction
|
|
136
|
+
|
|
137
|
+
Make each change in the layer you sorted it to, and add **one pack test per
|
|
138
|
+
correction** so the mistake can't come back:
|
|
139
|
+
|
|
140
|
+
- **Code (a tool):** add the check in the tool, and a test that the corrected
|
|
141
|
+
case is now refused or handled right (the 20-day-old order is refused, the
|
|
142
|
+
final-sale item isn't refunded). Follow your pack's language:
|
|
143
|
+
`kindgi-authoring-tools` (TypeScript), `kindgi-python-authoring-tools`,
|
|
144
|
+
`kindgi-java-authoring-tools`, or `kindgi-scala-authoring-tools`. Run the
|
|
145
|
+
pack's tests the way that skill shows — `kindgi test` wraps `vitest` for a
|
|
146
|
+
Node pack; a Python, Java or Scala pack runs its own test runner.
|
|
147
|
+
- **A setting:** decide the key, its limits and its default, and publish the
|
|
148
|
+
settings block (Step 4). Add a test that the tool reads the setting and
|
|
149
|
+
acts on it.
|
|
150
|
+
- **Instructions for Improve:** you don't write the prompt — you make sure the
|
|
151
|
+
corrected cases are in the test cases, then let an Improve run try wordings
|
|
152
|
+
on them (`kindgi proposals improve`). It writes a *suggested* change only
|
|
153
|
+
when a wording does better on those cases, and a person
|
|
154
|
+
decides whether to take it; nothing is applied on its own.
|
|
155
|
+
|
|
156
|
+
Write tests with invented data (Step 1, rule 3). A correction that belongs
|
|
157
|
+
to the owner (a setting they'd rather own) or an approver (an approval rule)
|
|
158
|
+
is theirs to make — say so, and give them the one command or the console
|
|
159
|
+
page, don't do it for them.
|
|
160
|
+
|
|
161
|
+
## Step 4 — Publish, and ask to make it live
|
|
162
|
+
|
|
163
|
+
For a **setting** change, publish the block, then derive a new agent version
|
|
164
|
+
that pins it — no code change:
|
|
165
|
+
|
|
166
|
+
```sh
|
|
167
|
+
kindgi blocks publish acme.store-policy \
|
|
168
|
+
--block-version=1.0.1 --project=<project-id> \
|
|
169
|
+
--settings=@store-policy.json --schema=@store-policy.schema.json
|
|
170
|
+
kindgi agents derive acme-store.refunds \
|
|
171
|
+
--from=1.0.3 --setting=acme.store-policy=1.0.1 --label="return window 14 days"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
- `blocks publish` takes `--block-version` (a semver, not `--version`) and a
|
|
175
|
+
required `--project`. `--settings` is the block's values; `--schema`
|
|
176
|
+
constrains them. (`--prompt` publishes a prompt block instead; the two are
|
|
177
|
+
mutually exclusive.)
|
|
178
|
+
- `agents derive --setting=<block-id>=<version>` re-pins a block the version
|
|
179
|
+
*already* references to its new version (repeat `--setting`/`--prompt` for
|
|
180
|
+
several). It makes the first free patch after the agent's highest version and
|
|
181
|
+
prints it — read that version from its output rather than assuming one. If it
|
|
182
|
+
answers `reused`, an identical version already exists: use that, don't derive
|
|
183
|
+
again.
|
|
184
|
+
|
|
185
|
+
For a **code** change, `kindgi deploy` publishes the new version with the
|
|
186
|
+
changed tool.
|
|
187
|
+
|
|
188
|
+
Deriving needs `publish` on the agent, `blocks publish` needs `write` on the
|
|
189
|
+
project, and promoting needs `promote` — the permission that makes a version
|
|
190
|
+
live, which an agent's admins hold.
|
|
191
|
+
|
|
192
|
+
If the person keeps test cases built from the corrected runs, try the new
|
|
193
|
+
version on them first:
|
|
194
|
+
|
|
195
|
+
```sh
|
|
196
|
+
kindgi eval-runs start <test-set-id> --project=<project-id> \
|
|
197
|
+
--agent=acme-store.refunds --agent-version=1.0.4 --wait
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Where an expert said what the run should have done, its summary's
|
|
201
|
+
`corrections` says how many of those the version now passes (`passed` of
|
|
202
|
+
`checked`). No release gate policy checks it: quote it in the promote
|
|
203
|
+
`--reason`.
|
|
204
|
+
|
|
205
|
+
Either way, ask a person to make the new version live, naming the
|
|
206
|
+
corrections it fixes. Check first what will happen, then ask:
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
kindgi agents promote acme-store.refunds 1.0.4 --project=<project-id> --check
|
|
210
|
+
kindgi agents promote acme-store.refunds 1.0.4 --project=<project-id> \
|
|
211
|
+
--reason="Fixes 1 correction: our return window is 14 days"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
- The scope is `--tenant` (every project), `--org=<org-id>`, or
|
|
215
|
+
`--project=<project-id> [--segment=<key:value>]…` (one project).
|
|
216
|
+
- `--check` changes nothing and answers whether it *would* make it live,
|
|
217
|
+
needs an approval, or fails the release gate policy.
|
|
218
|
+
- `--reason` is kept on the record — write what the corrections were, so the
|
|
219
|
+
approver reads the change in plain words.
|
|
220
|
+
- The outcome is `promoted`, or `pending-approval` when the scope's release
|
|
221
|
+
gate policy has `approvals` and a second person must approve — the "a
|
|
222
|
+
second person checks it" step, working as it should. (Whoever asked can't
|
|
223
|
+
approve their own request, unless the policy sets `separateApprover: false`.)
|
|
224
|
+
|
|
225
|
+
## A worked example: the return window
|
|
226
|
+
|
|
227
|
+
An expert corrects a refund: "Shouldn't have refunded — delivered 20 days
|
|
228
|
+
ago, our window is 14." You pull it (Step 1), and see the window is a store
|
|
229
|
+
policy, not a one-off.
|
|
230
|
+
|
|
231
|
+
- **If the agent already reads a `returnWindowDays` setting:** publish the
|
|
232
|
+
block with `returnWindowDays: 14` and derive a version that pins it
|
|
233
|
+
(Step 4). Tell the owner they can change this themselves in the console —
|
|
234
|
+
Edit as a new version, then Derive a version.
|
|
235
|
+
- **If it doesn't read one yet:** this is a code change, in two parts. First
|
|
236
|
+
publish the settings block with the key — `returnWindowDays` in its schema
|
|
237
|
+
(0–365, whole days) and `14` in its values — because a deploy that references
|
|
238
|
+
a block with no published version is refused ("publish the block first").
|
|
239
|
+
Then, in code, make the refund tool read `returnWindowDays` and refuse an
|
|
240
|
+
order delivered more than that many days ago (offering a person), add the
|
|
241
|
+
block to what the agent references, and add a test: an order delivered 20
|
|
242
|
+
days ago is refused (`kindgi-authoring-tools`). `kindgi deploy` publishes the
|
|
243
|
+
version with the new reference. (`agents derive` only re-pins a block the
|
|
244
|
+
version already references, so it can't introduce this one — the deploy
|
|
245
|
+
does.) The schema and value live outside the pack and outside code review, so
|
|
246
|
+
show them to the person and name them in the `--reason`.
|
|
247
|
+
|
|
248
|
+
Then ask to make it live: `kindgi agents promote … --reason="Fixes 1
|
|
249
|
+
correction: our return window is 14 days"`. The refund limit — the most a
|
|
250
|
+
refund can be without a person — is never raised here: the cap stays in the
|
|
251
|
+
tool's code, and the large-refund tool still always asks.
|
|
252
|
+
|
|
253
|
+
## References
|
|
254
|
+
|
|
255
|
+
- Experts record corrections in the console, or with
|
|
256
|
+
`kindgi judgments add --run=<run-id> --item=<key> --no --reason=<text>`.
|
|
257
|
+
- The guide for a person:
|
|
258
|
+
<https://docs.kindgi.com/v0.2/guides/evals/fix-what-experts-corrected/>
|
|
259
|
+
- Letting Improve try wordings:
|
|
260
|
+
<https://docs.kindgi.com/v0.2/guides/evals/improve-an-agent/>
|
|
261
|
+
- Changing a setting or a prompt by hand:
|
|
262
|
+
<https://docs.kindgi.com/v0.2/guides/evals/change-a-prompt-or-setting/>
|