@kindgi/cli 0.2.0 → 0.3.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 +12 -5
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +75 -19
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/approval-wait.d.ts +90 -0
- package/dist/commands/approval-wait.d.ts.map +1 -0
- package/dist/commands/approval-wait.js +154 -0
- package/dist/commands/approval-wait.js.map +1 -0
- package/dist/commands/artifacts.d.ts.map +1 -1
- package/dist/commands/artifacts.js +131 -14
- package/dist/commands/artifacts.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +48 -5
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/deploy.js +7 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/deployments.d.ts.map +1 -1
- package/dist/commands/deployments.js +36 -13
- package/dist/commands/deployments.js.map +1 -1
- package/dist/commands/doctor.d.ts +3 -2
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +47 -14
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/eval-runs.d.ts.map +1 -1
- package/dist/commands/eval-runs.js +21 -9
- package/dist/commands/eval-runs.js.map +1 -1
- package/dist/commands/helpers.d.ts +31 -1
- package/dist/commands/helpers.d.ts.map +1 -1
- package/dist/commands/helpers.js +45 -2
- package/dist/commands/helpers.js.map +1 -1
- package/dist/commands/init.js +5 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mail-triggers.d.ts.map +1 -1
- package/dist/commands/mail-triggers.js +27 -3
- package/dist/commands/mail-triggers.js.map +1 -1
- package/dist/commands/promote.d.ts.map +1 -1
- package/dist/commands/promote.js +133 -11
- package/dist/commands/promote.js.map +1 -1
- package/dist/commands/provenance.d.ts.map +1 -1
- package/dist/commands/provenance.js +13 -5
- package/dist/commands/provenance.js.map +1 -1
- package/dist/commands/providers.d.ts.map +1 -1
- package/dist/commands/providers.js +47 -4
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/schedules.d.ts.map +1 -1
- package/dist/commands/schedules.js +25 -9
- package/dist/commands/schedules.js.map +1 -1
- package/dist/commands/skills.d.ts +16 -0
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +122 -36
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/commands/webhooks.js +21 -5
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +7 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -0
- package/dist/context.js.map +1 -1
- package/dist/dev/runtime-image.d.ts +1 -1
- package/dist/dev/runtime-image.js +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +14 -1
- package/dist/errors.js.map +1 -1
- package/dist/exports/plan.d.ts.map +1 -1
- package/dist/exports/plan.js +50 -0
- package/dist/exports/plan.js.map +1 -1
- package/dist/init/augment-scaffolder.d.ts +1 -1
- package/dist/init/augment-scaffolder.js +9 -8
- package/dist/init/augment-scaffolder.js.map +1 -1
- package/dist/init/java-augment.d.ts.map +1 -1
- package/dist/init/java-augment.js +7 -6
- package/dist/init/java-augment.js.map +1 -1
- package/dist/init/python-augment.d.ts.map +1 -1
- package/dist/init/python-augment.js +7 -6
- package/dist/init/python-augment.js.map +1 -1
- package/dist/init/scala-augment.js +7 -6
- package/dist/init/scala-augment.js.map +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/providers/presets/anthropic.json +15 -3
- package/dist/providers/presets/azure-openai.json +10 -2
- package/dist/providers/presets/bedrock.json +6 -2
- package/dist/providers/presets/gemini-api.json +6 -2
- package/dist/providers/presets/openai.json +15 -3
- package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +21 -9
- package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +5 -3
- package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +202 -68
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +12 -188
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/common-mistakes.md +44 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/how-it-works.md +41 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/other-clients.md +19 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/postgres.md +45 -0
- package/dist/sdk-skills/kindgi-authoring-mcp-servers/several-servers.md +32 -0
- package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +49 -906
- package/dist/sdk-skills/kindgi-authoring-providers/bedrock.md +64 -0
- package/dist/sdk-skills/kindgi-authoring-providers/common-mistakes.md +125 -0
- package/dist/sdk-skills/kindgi-authoring-providers/keys-and-registration.md +58 -0
- package/dist/sdk-skills/kindgi-authoring-providers/kindgi-cloud.md +36 -0
- package/dist/sdk-skills/kindgi-authoring-providers/path-a-anthropic.md +216 -0
- package/dist/sdk-skills/kindgi-authoring-providers/path-b-openai-compat.md +127 -0
- package/dist/sdk-skills/kindgi-authoring-providers/path-c-onnx.md +97 -0
- package/dist/sdk-skills/kindgi-authoring-providers/path-d-vertex.md +95 -0
- package/dist/sdk-skills/kindgi-authoring-providers/router.md +113 -0
- package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +12 -387
- package/dist/sdk-skills/kindgi-authoring-tools/common-mistakes.md +135 -0
- package/dist/sdk-skills/kindgi-authoring-tools/declarative-http.md +34 -0
- package/dist/sdk-skills/kindgi-authoring-tools/imperative-handler.md +65 -0
- package/dist/sdk-skills/kindgi-authoring-tools/iterating-and-testing.md +45 -0
- package/dist/sdk-skills/kindgi-authoring-tools/secrets-and-connections.md +79 -0
- package/dist/sdk-skills/kindgi-authoring-tools/tool-flags.md +45 -0
- package/dist/sdk-skills/kindgi-fix-corrections/SKILL.md +13 -178
- package/dist/sdk-skills/kindgi-fix-corrections/make-the-change.md +25 -0
- package/dist/sdk-skills/kindgi-fix-corrections/publish-and-promote.md +76 -0
- package/dist/sdk-skills/kindgi-fix-corrections/pull-corrections.md +48 -0
- package/dist/sdk-skills/kindgi-fix-corrections/worked-example.md +27 -0
- package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +10 -180
- package/dist/sdk-skills/kindgi-framework-feedback/common-mistakes.md +19 -0
- package/dist/sdk-skills/kindgi-framework-feedback/editing-feedback-file.md +33 -0
- package/dist/sdk-skills/kindgi-framework-feedback/fields-and-entry-shape.md +53 -0
- package/dist/sdk-skills/kindgi-framework-feedback/hearing-back.md +24 -0
- package/dist/sdk-skills/kindgi-framework-feedback/sending.md +50 -0
- package/dist/sdk-skills/kindgi-getting-started/SKILL.md +24 -21
- package/dist/sdk-skills/kindgi-java-authoring-agents/SKILL.md +12 -4
- package/dist/sdk-skills/kindgi-java-authoring-flows/SKILL.md +6 -4
- package/dist/sdk-skills/kindgi-java-authoring-guardrails/SKILL.md +33 -23
- package/dist/sdk-skills/kindgi-java-authoring-tools/SKILL.md +19 -12
- package/dist/sdk-skills/kindgi-java-getting-started/SKILL.md +16 -16
- package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +18 -6
- package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +6 -4
- package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +39 -30
- package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +19 -9
- package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +24 -21
- package/dist/sdk-skills/kindgi-scala-authoring-agents/SKILL.md +12 -4
- package/dist/sdk-skills/kindgi-scala-authoring-flows/SKILL.md +6 -4
- package/dist/sdk-skills/kindgi-scala-authoring-guardrails/SKILL.md +34 -23
- package/dist/sdk-skills/kindgi-scala-authoring-tools/SKILL.md +15 -9
- package/dist/sdk-skills/kindgi-scala-getting-started/SKILL.md +16 -16
- package/dist/sdk-skills/kindgi-using/SKILL.md +11 -11
- package/dist/templates/sample/README.md.tmpl +8 -7
- package/dist/templates/sample/agents/echo-agent/index.ts.tmpl +1 -1
- package/dist/templates/sample/kindgi.config.ts.tmpl +1 -1
- package/dist/templates/sample/package.json.tmpl +1 -1
- package/dist/templates/woocommerce/README.md.tmpl +9 -3
- package/package.json +13 -13
|
@@ -7,18 +7,19 @@ description: >
|
|
|
7
7
|
`(config, trace)` check returning a `CheckResult` (or a Future of one with
|
|
8
8
|
`checkAsync`), `RunTrace`, config case classes and the values a check runs
|
|
9
9
|
with, actions, severity and scope, munit tests with `evaluate`, and wiring
|
|
10
|
-
a guardrail onto an agent.
|
|
11
|
-
escalate / compensate are only recorded
|
|
12
|
-
a check sees only the current turn: its user message and tool
|
|
13
|
-
earlier turns'. Load this whenever you are authoring or
|
|
14
|
-
Scala pack's guardrails packages (a pack whose
|
|
15
|
-
`"language": "scala"`), defining a check, or
|
|
16
|
-
agent. Scala agents are covered by
|
|
17
|
-
|
|
10
|
+
a guardrail onto an agent. halt fails the turn and retry sends the answer
|
|
11
|
+
back to the model for a new one (escalate / compensate are only recorded
|
|
12
|
+
in 0.1), and a check sees only the current turn: its user message and tool
|
|
13
|
+
results, not earlier turns'. Load this whenever you are authoring or
|
|
14
|
+
editing code in a Scala pack's guardrails packages (a pack whose
|
|
15
|
+
`kindgi.config.json` says `"language": "scala"`), defining a check, or
|
|
16
|
+
wiring a guardrail onto an agent. Scala agents are covered by
|
|
17
|
+
kindgi-scala-authoring-agents, Scala tools by
|
|
18
|
+
kindgi-scala-authoring-tools.
|
|
18
19
|
type: core
|
|
19
20
|
library: "kindgi-pack-scala"
|
|
20
|
-
version: "0.1.
|
|
21
|
-
sdk_version: "0.
|
|
21
|
+
version: "0.1.4"
|
|
22
|
+
sdk_version: "0.3.0"
|
|
22
23
|
pack_languages: [scala]
|
|
23
24
|
sources:
|
|
24
25
|
- sdks/scala/README.md
|
|
@@ -42,6 +43,8 @@ named like its file, in a `guardrails` package. For an agent turn, the
|
|
|
42
43
|
runtime evaluates every guardrail the agent lists once, on the final answer,
|
|
43
44
|
before it is stored.
|
|
44
45
|
|
|
46
|
+
`Guardrail[C](…)` has no field for the other points a guardrail can run at (`at`, and a check's `points`), so a Scala guardrail runs at the final answer only; the points are documented at https://docs.kindgi.com/v0.3/guides/guardrails/configure-a-guardrail/#where-in-the-turn-it-runs.
|
|
47
|
+
|
|
45
48
|
Ask what the rule should catch before writing one. The sample
|
|
46
49
|
`response-not-empty` guardrail is a demonstration, not a template.
|
|
47
50
|
|
|
@@ -50,14 +53,20 @@ Ask what the rule should catch before writing one. The sample
|
|
|
50
53
|
Read this before you plan a guardrail. Three limits decide what can be
|
|
51
54
|
built:
|
|
52
55
|
|
|
53
|
-
-
|
|
54
|
-
`guardrail-violation`, and the answer is not stored. `retry
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
- **`halt` and `retry` act.** A failed `halt` guardrail fails the turn with
|
|
57
|
+
`guardrail-violation`, and the answer is not stored. A failed `retry`
|
|
58
|
+
guardrail sends the answer back to the model, with the check's reason in a
|
|
59
|
+
user message, for a new one; the failed answer isn't stored. When it has
|
|
60
|
+
failed `retry.maxAttempts` answers (the first one included; 2 when left
|
|
61
|
+
out), the turn fails with `guardrail-violation` and
|
|
62
|
+
`details.attempts`. Each new answer is a model call that the agent's
|
|
63
|
+
`budget.maxSteps` counts. The `halt` and `retry` guardrails judge each
|
|
64
|
+
answer, a judge's calls included, which `budget.maxCostUsd` doesn't count;
|
|
65
|
+
the others judge only the answer that's sent. A new answer can call tools
|
|
66
|
+
again, side-effecting ones included, with approvals as usual. `escalate`
|
|
67
|
+
and `compensate` are recorded on the turn's violations, as `log-only` is,
|
|
68
|
+
and the turn completes: nothing escalates or calls a compensating tool. So
|
|
69
|
+
"block the reply and make the agent try again" is a `retry` guardrail.
|
|
61
70
|
- **A check sees one turn.** The trace holds the current turn only: its
|
|
62
71
|
user message (`trace.userInput`), its tool calls and their results
|
|
63
72
|
(`toolCalls`, `toolResults`) and its answer (`output`). Earlier turns'
|
|
@@ -151,11 +160,12 @@ object Citations {
|
|
|
151
160
|
builder refuses a check with neither.
|
|
152
161
|
- In an agent turn, a failed `halt` guardrail fails the turn
|
|
153
162
|
(`guardrail-violation`), and the answer is not stored.
|
|
163
|
+
- A failed `retry` guardrail sends the answer back for a new one, up to
|
|
164
|
+
its `maxAttempts` answers (above).
|
|
154
165
|
- Any other action reports the failure in the turn result's `violations`,
|
|
155
166
|
and the turn completes.
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
escalation or compensating call.
|
|
167
|
+
- `escalate` and `compensate` are recorded on the violation, with no
|
|
168
|
+
escalation or compensating call in 0.1.
|
|
159
169
|
- **`severity`:** `info`, `warn`, `error` (default) or `critical`. It's
|
|
160
170
|
independent of the action: dashboards group by severity, and execution
|
|
161
171
|
follows the action.
|
|
@@ -218,8 +228,9 @@ no registered guardrail fails the turn before the model is called
|
|
|
218
228
|
2. **`set("config", …)` keyed by Scala names that differ from the wire.**
|
|
219
229
|
It's keyed by the case class's Jackson names.
|
|
220
230
|
3. **No `onViolation` or `action`.** The builder refuses the check.
|
|
221
|
-
4. **Expecting
|
|
222
|
-
|
|
231
|
+
4. **Expecting `halt` to try again.** `halt` stops the turn; `retry` asks
|
|
232
|
+
the model for a new answer, and fails the turn once its `maxAttempts`
|
|
233
|
+
answers have failed.
|
|
223
234
|
5. **Calling a model from the check.** That isn't available: keep checks
|
|
224
235
|
pure.
|
|
225
236
|
6. **Throwing for a broken rule.** Return `CheckResult.fail(…)`. An
|
|
@@ -15,8 +15,8 @@ description: >
|
|
|
15
15
|
kindgi-scala-getting-started.
|
|
16
16
|
type: core
|
|
17
17
|
library: "kindgi-pack-scala"
|
|
18
|
-
version: "0.1.
|
|
19
|
-
sdk_version: "0.
|
|
18
|
+
version: "0.1.5"
|
|
19
|
+
sdk_version: "0.3.0"
|
|
20
20
|
pack_languages: [scala]
|
|
21
21
|
sources:
|
|
22
22
|
- sdks/scala/README.md
|
|
@@ -156,7 +156,7 @@ object Citator {
|
|
|
156
156
|
it writes to (`Option(ctx.idempotencyKey).foreach(k => request.header("Idempotency-Key", k))`)
|
|
157
157
|
or looks for it there first: a refund never goes out twice. A UUID; `null`
|
|
158
158
|
outside a run and from a runtime before 0.1.6. Docs:
|
|
159
|
-
https://docs.kindgi.com/v0.
|
|
159
|
+
https://docs.kindgi.com/v0.3/guides/tools/write-a-tool/#make-a-side-effect-happen-once
|
|
160
160
|
- `ctx.projectId`, `ctx.orgId`: the run's project, and its org (`null` when
|
|
161
161
|
it has none). The runtime sets them from the run, never from the input.
|
|
162
162
|
To check an id the input names, compare it with these.
|
|
@@ -229,7 +229,7 @@ val tool: Tool[Input, Output] = Tool[Input, Output]("my-pack.send-mail")
|
|
|
229
229
|
- **Unattended runs:** in a run no person started, a tool that uses a `"person"` connection waits for that person's yes, reads included: `.readOnly` doesn't lift it. The agent's own approval settings can't lift it; only a trigger's `toolsAllowedUnattended` can, which a project admin sets, as for `needsApprovalWhenUnattended` (below). In a run a new mail started, the mail is a stranger's text, so two more calls wait: a call of a tool that isn't `.readOnly`, and, when the trigger reads the company's mailbox, a read with the company's connection to that app. The mail trigger's `toolsAllowedUnattended` lifts these too.
|
|
230
230
|
- **In a unit test:** `com.kindgi.pack.ToolContext.forTest(java.util.Map.of("mail", new ToolConnection("c-1", "google", "Google", "test", new ConnectionAccount("1", "ana@acme.com"), null)))`; the last argument, when the token expires, can be `null`. `ctx.connections` is empty when the tool declares none.
|
|
231
231
|
|
|
232
|
-
Docs: https://docs.kindgi.com/v0.
|
|
232
|
+
Docs: https://docs.kindgi.com/v0.3/guides/connections/use-a-connection/
|
|
233
233
|
|
|
234
234
|
## Errors and output
|
|
235
235
|
|
|
@@ -245,10 +245,16 @@ Docs: https://docs.kindgi.com/v0.2/guides/connections/use-a-connection/
|
|
|
245
245
|
**`readOnly`** declares a tool that changes nothing outside itself (a lookup,
|
|
246
246
|
a search, a calculation): it's `mutating(false)`. A dry run
|
|
247
247
|
(`./kindgiw runs start --dry-run`) runs it. Leave it off for anything that
|
|
248
|
-
writes, sends, charges or deletes: such a tool stops a dry run. It's also
|
|
249
|
-
|
|
248
|
+
writes, sends, charges or deletes: such a tool stops a dry run. It's also the
|
|
249
|
+
tool's approval default: an agent that turns approval gates on
|
|
250
250
|
(`conversationPolicy.hitl`) asks before any tool that isn't read-only on its
|
|
251
|
-
first use.
|
|
251
|
+
first use. And it decides what runs together: when a model step asks for
|
|
252
|
+
several calls at once, an agent runs calls to read-only tools (no changing
|
|
253
|
+
effect either) that come one after another at the same time, up to 8 of them,
|
|
254
|
+
and any other call on its own, in the order the model asked (an agent with
|
|
255
|
+
`set("parallelToolCalls", false)` runs every call on its own). A call that may
|
|
256
|
+
wait, for another system's answer or for the person who started the run to
|
|
257
|
+
connect an app, runs on its own too.
|
|
252
258
|
|
|
253
259
|
In a run a new mail started, a call of a tool that isn't read-only waits
|
|
254
260
|
for a person's yes, unless the mail trigger's `toolsAllowedUnattended`
|
|
@@ -322,7 +328,7 @@ In a run a person started (signed in, or with their own API key), the agent's ru
|
|
|
322
328
|
.needsApprovalWhenUnattended(true)
|
|
323
329
|
```
|
|
324
330
|
|
|
325
|
-
Docs: https://docs.kindgi.com/v0.
|
|
331
|
+
Docs: https://docs.kindgi.com/v0.3/guides/approvals/ask-before-a-tool-runs/#when-no-person-started-the-run
|
|
326
332
|
|
|
327
333
|
## Results that are text from outside: `resultIsOutsideData`
|
|
328
334
|
|
|
@@ -420,7 +426,7 @@ changes (a removed field, a narrower type), not on every save.
|
|
|
420
426
|
folder, `~/.aws`) or any `.env*` file, and gets `EPERM` there. A tool that
|
|
421
427
|
needs a path names it in `kindgi.config.json`: `"dev": {"sandbox": {"allowRead": ["~/.aws"]}}`.
|
|
422
428
|
Never set `KINDGI_DEV_SANDBOX=off` or `dev.sandbox: false` to get past it
|
|
423
|
-
(https://docs.kindgi.com/v0.
|
|
429
|
+
(https://docs.kindgi.com/v0.3/guides/secrets/dev-sandbox/).
|
|
424
430
|
|
|
425
431
|
## When the framework itself is the problem
|
|
426
432
|
|
|
@@ -17,8 +17,8 @@ description: >
|
|
|
17
17
|
kindgi-scala-authoring-flows; models by kindgi-authoring-providers.
|
|
18
18
|
type: core
|
|
19
19
|
library: "kindgi-pack-scala"
|
|
20
|
-
version: "0.1.
|
|
21
|
-
sdk_version: "0.
|
|
20
|
+
version: "0.1.6"
|
|
21
|
+
sdk_version: "0.3.0"
|
|
22
22
|
pack_languages: [scala]
|
|
23
23
|
sources:
|
|
24
24
|
- sdks/scala/README.md
|
|
@@ -252,7 +252,7 @@ Show it in the app's own UI. **Never:**
|
|
|
252
252
|
runtime Kindgi hosts gives no database access.
|
|
253
253
|
- **link users to Kindgi's console**, or any Kindgi UI, for this data.
|
|
254
254
|
|
|
255
|
-
Docs: https://docs.kindgi.com/v0.
|
|
255
|
+
Docs: https://docs.kindgi.com/v0.3/guides/runs/show-runs-in-your-app/
|
|
256
256
|
|
|
257
257
|
## Build an image
|
|
258
258
|
|
|
@@ -279,22 +279,22 @@ doesn't have yet, then serving. Migrations only go forward: an upgrade
|
|
|
279
279
|
starts with a backup of the database, and going back means restoring it and
|
|
280
280
|
running the older version on it.
|
|
281
281
|
|
|
282
|
-
- **On Cloud Run, a
|
|
283
|
-
|
|
284
|
-
`@kindgi/sdk@<version>` tag of the
|
|
285
|
-
knows the steps up to its own
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
Upgrading section has the rest:
|
|
282
|
+
- **On Cloud Run, a deployment of the module** (on runtime 0.1.8 or later,
|
|
283
|
+
in any `network_mode`; before the `@kindgi/sdk@0.3.0` tag, `"none"` only):
|
|
284
|
+
the module's `./upgrade.sh`, as of the `@kindgi/sdk@<version>` tag of the
|
|
285
|
+
release you're upgrading to, since it knows the steps up to its own
|
|
286
|
+
release. It takes a `--var-file` for each file the deployment's variables
|
|
287
|
+
are in. Run `./upgrade.sh --dry-run` first: it changes nothing, and lists
|
|
288
|
+
what a real run would change. A real run's `yes` applies exactly the
|
|
289
|
+
saved plan it showed. The module README's Upgrading section has the rest:
|
|
290
290
|
https://github.com/kindgi/kindgi-sdk/tree/main/deploy/gcp-cloud-run#upgrading
|
|
291
291
|
- **Any other Cloud Run deployment:** by hand, staging first, as the Cloud
|
|
292
292
|
Run page's "Upgrade by hand" section says:
|
|
293
|
-
https://docs.kindgi.com/v0.
|
|
294
|
-
- **On Azure Container Apps:** the "Operate it" section of its page
|
|
295
|
-
https://docs.kindgi.com/v0.
|
|
296
|
-
- **Otherwise:** the operate page's upgrade steps
|
|
297
|
-
https://docs.kindgi.com/v0.
|
|
293
|
+
https://docs.kindgi.com/v0.3/deploy/self-hosted/cloud-run/#upgrade-by-hand
|
|
294
|
+
- **On Azure Container Apps:** the "Operate it" section of its page:
|
|
295
|
+
https://docs.kindgi.com/v0.3/deploy/self-hosted/azure-container-apps/#operate-it
|
|
296
|
+
- **Otherwise:** the operate page's upgrade steps:
|
|
297
|
+
https://docs.kindgi.com/v0.3/deploy/self-hosted/operate/#upgrade-the-runtime
|
|
298
298
|
|
|
299
299
|
An upgrade changes a running deployment: give the person the commands to run
|
|
300
300
|
in their own terminal (`./upgrade.sh` waits for them to type `yes`).
|
|
@@ -16,7 +16,7 @@ description: >
|
|
|
16
16
|
type: core
|
|
17
17
|
library: "@kindgi/sdk"
|
|
18
18
|
version: "0.1.2"
|
|
19
|
-
sdk_version: "0.
|
|
19
|
+
sdk_version: "0.3.0"
|
|
20
20
|
pack_languages: [node, python, java, scala]
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -266,13 +266,13 @@ say there were none.
|
|
|
266
266
|
|
|
267
267
|
## More
|
|
268
268
|
|
|
269
|
-
- Runs: https://docs.kindgi.com/v0.
|
|
270
|
-
https://docs.kindgi.com/v0.
|
|
271
|
-
- Approvals: https://docs.kindgi.com/v0.
|
|
272
|
-
- Connections: https://docs.kindgi.com/v0.
|
|
273
|
-
- Memory: https://docs.kindgi.com/v0.
|
|
274
|
-
- Schedules: https://docs.kindgi.com/v0.
|
|
275
|
-
- Mail triggers: https://docs.kindgi.com/v0.
|
|
276
|
-
- People and keys: https://docs.kindgi.com/v0.
|
|
277
|
-
- Cost: https://docs.kindgi.com/v0.
|
|
278
|
-
- Rating answers: https://docs.kindgi.com/v0.
|
|
269
|
+
- Runs: https://docs.kindgi.com/v0.3/guides/runs/list-runs/ and
|
|
270
|
+
https://docs.kindgi.com/v0.3/guides/runs/read-the-journal/
|
|
271
|
+
- Approvals: https://docs.kindgi.com/v0.3/guides/approvals/decide-an-approval/
|
|
272
|
+
- Connections: https://docs.kindgi.com/v0.3/guides/connections/use-a-connection/
|
|
273
|
+
- Memory: https://docs.kindgi.com/v0.3/guides/agents/give-an-agent-memory/
|
|
274
|
+
- Schedules: https://docs.kindgi.com/v0.3/guides/runs/run-on-a-schedule/
|
|
275
|
+
- Mail triggers: https://docs.kindgi.com/v0.3/guides/runs/start-runs-from-new-mail/
|
|
276
|
+
- People and keys: https://docs.kindgi.com/v0.3/deploy/people-and-keys/
|
|
277
|
+
- Cost: https://docs.kindgi.com/v0.3/guides/observability/cost-per-run/
|
|
278
|
+
- Rating answers: https://docs.kindgi.com/v0.3/guides/evals/judge-a-runs-output/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
A sample Kindgi pack — scaffolded by `kindgi init --template=sample`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
agent that uses
|
|
7
|
-
the
|
|
8
|
-
run with `kindgi dev`.
|
|
5
|
+
Three tools (`echo`, `greet`, `fetch-httpbin`), one guardrail
|
|
6
|
+
(`response-not-empty`), one agent that uses `echo` and `greet` + the
|
|
7
|
+
guardrail, and one flow that runs the `greet` tool, then the agent. It is
|
|
8
|
+
compile-time-valid and ready to run with `kindgi dev`.
|
|
9
9
|
|
|
10
10
|
## Layout
|
|
11
11
|
|
|
@@ -16,11 +16,12 @@ run with `kindgi dev`.
|
|
|
16
16
|
├── tsconfig.json
|
|
17
17
|
├── tools/
|
|
18
18
|
│ ├── echo/index.ts # defineTool — Zod-authored echo
|
|
19
|
-
│
|
|
19
|
+
│ ├── greet/index.ts # defineTool — Zod-authored greeting
|
|
20
|
+
│ └── fetch-httpbin/index.ts # defineTool — declarative HTTP call
|
|
20
21
|
├── guardrails/
|
|
21
22
|
│ └── response-not-empty/index.ts # defineCheck — response has content
|
|
22
23
|
├── agents/
|
|
23
|
-
│ └── echo-agent/index.ts # defineAgent — uses
|
|
24
|
+
│ └── echo-agent/index.ts # defineAgent — uses echo + greet + guardrail
|
|
24
25
|
└── flows/
|
|
25
26
|
└── echo-flow/index.ts # Flow — greet tool → echo agent step → declared output
|
|
26
27
|
```
|
|
@@ -68,7 +69,7 @@ agent, and other providers: the `kindgi-authoring-providers` skill.
|
|
|
68
69
|
| Tool | `tools/greet/index.ts` | Second Zod-authored tool — takes a name, returns a greeting. |
|
|
69
70
|
| Tool | `tools/fetch-httpbin/index.ts` | `defineTool({spec: {kind: 'http'}})` — declarative HTTP call, no imperative handler code. Hits httpbin.org so it works without credentials. |
|
|
70
71
|
| Guardrail | `guardrails/response-not-empty/index.ts` | `defineCheck` — zero-LLM check that a response payload is non-empty. |
|
|
71
|
-
| Agent | `agents/echo-agent/index.ts` | `defineAgent` — pulls in
|
|
72
|
+
| Agent | `agents/echo-agent/index.ts` | `defineAgent` — pulls in `echo` and `greet` + the guardrail; uses `capabilities` for model routing. |
|
|
72
73
|
| Flow | `flows/echo-flow/index.ts` | `defineFlow` — a tool step fed from the run input, an agent step, a declared `output`. Run: `kindgi runs start --flow={{PACK_ID}}.echo-flow --input='{"name":"Ada"}'`. |
|
|
73
74
|
|
|
74
75
|
## Extend
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// {{PACK_ID}}.echo-agent — pulls in
|
|
1
|
+
// {{PACK_ID}}.echo-agent — pulls in the echo and greet tools + the response-not-empty
|
|
2
2
|
// guardrail. The agent shape is pure metadata; every field is either a
|
|
3
3
|
// primitive or a reference to a registered substrate object.
|
|
4
4
|
|
|
@@ -4,7 +4,7 @@ const config = {
|
|
|
4
4
|
pack: {
|
|
5
5
|
id: '{{PACK_ID}}',
|
|
6
6
|
version: '{{PACK_VERSION}}',
|
|
7
|
-
description: 'A sample Kindgi pack —
|
|
7
|
+
description: 'A sample Kindgi pack — three tools, one guardrail, one agent, one flow.',
|
|
8
8
|
},
|
|
9
9
|
discovery: {
|
|
10
10
|
tools: 'tools/**/*.ts',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "{{PACK_NAME}}",
|
|
3
3
|
"version": "{{PACK_VERSION}}",
|
|
4
4
|
"private": true,
|
|
5
|
-
"description": "Kindgi pack — scaffolded by `kindgi init --template=sample`.
|
|
5
|
+
"description": "Kindgi pack — scaffolded by `kindgi init --template=sample`. Three tools, one guardrail, one agent, one flow.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"engines": {
|
|
@@ -204,9 +204,15 @@ Ask the store agent something:
|
|
|
204
204
|
|
|
205
205
|
## One project and one pack per client
|
|
206
206
|
|
|
207
|
-
This pack is one client's: every id in it starts with `{{PACK_ID}}.`.
|
|
208
|
-
another client
|
|
209
|
-
|
|
207
|
+
This pack is one client's: every id in it starts with `{{PACK_ID}}.`. A
|
|
208
|
+
copy for another client runs only where each deployment runs as a service
|
|
209
|
+
of its own. A runtime with one pack service runs only the pack that service
|
|
210
|
+
was given, so don't make a copy there: a copy deploys, and its tools fail
|
|
211
|
+
when called. Deploying this pack into a second project answers a `409`
|
|
212
|
+
that names what such a runtime can do.
|
|
213
|
+
|
|
214
|
+
Where each deployment runs as a service of its own, make a copy for each
|
|
215
|
+
other client, so its ids start with that client's name:
|
|
210
216
|
|
|
211
217
|
```sh
|
|
212
218
|
{{KINDGI}} init <client> --template=woocommerce
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindgi/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Command-line interface for Kindgi™. Create a pack, run it on your machine (`kindgi dev`), build, sign and deploy it, and work with a running Kindgi API from the terminal.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"provenance": true
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@kindgi/agents": "0.
|
|
41
|
-
"@kindgi/client": "0.
|
|
42
|
-
"@kindgi/dotenv-file": "0.
|
|
43
|
-
"@kindgi/crypto": "0.
|
|
44
|
-
"@kindgi/env-schema": "0.
|
|
45
|
-
"@kindgi/flow": "0.
|
|
46
|
-
"@kindgi/handler-runtime": "0.
|
|
47
|
-
"@kindgi/log": "0.
|
|
48
|
-
"@kindgi/secrets-dotenv": "0.
|
|
49
|
-
"@kindgi/platform": "0.
|
|
50
|
-
"@kindgi/sdk": "0.
|
|
51
|
-
"@kindgi/types": "0.
|
|
40
|
+
"@kindgi/agents": "0.3.0",
|
|
41
|
+
"@kindgi/client": "0.3.0",
|
|
42
|
+
"@kindgi/dotenv-file": "0.3.0",
|
|
43
|
+
"@kindgi/crypto": "0.3.0",
|
|
44
|
+
"@kindgi/env-schema": "0.3.0",
|
|
45
|
+
"@kindgi/flow": "0.3.0",
|
|
46
|
+
"@kindgi/handler-runtime": "0.3.0",
|
|
47
|
+
"@kindgi/log": "0.3.0",
|
|
48
|
+
"@kindgi/secrets-dotenv": "0.3.0",
|
|
49
|
+
"@kindgi/platform": "0.3.0",
|
|
50
|
+
"@kindgi/sdk": "0.3.0",
|
|
51
|
+
"@kindgi/types": "0.3.0",
|
|
52
52
|
"esbuild": "^0.24.0",
|
|
53
53
|
"semver": "^7.8.5",
|
|
54
54
|
"smol-toml": "^1.9.0",
|