@kindgi/handler-runtime 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.
Files changed (68) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +218 -2
  3. package/dist/build-extensions.d.ts +75 -0
  4. package/dist/build-extensions.d.ts.map +1 -0
  5. package/dist/build-extensions.js +27 -0
  6. package/dist/build-extensions.js.map +1 -0
  7. package/dist/discovery.d.ts +19 -0
  8. package/dist/discovery.d.ts.map +1 -0
  9. package/dist/discovery.js +81 -0
  10. package/dist/discovery.js.map +1 -0
  11. package/dist/entrypoint.d.ts +10 -0
  12. package/dist/entrypoint.d.ts.map +1 -0
  13. package/dist/entrypoint.js +24 -0
  14. package/dist/entrypoint.js.map +1 -0
  15. package/dist/handler-runner.d.ts +127 -0
  16. package/dist/handler-runner.d.ts.map +1 -0
  17. package/dist/handler-runner.js +318 -0
  18. package/dist/handler-runner.js.map +1 -0
  19. package/dist/index.d.ts +8 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +7 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/kindgi-index-main.d.ts +2 -0
  24. package/dist/kindgi-index-main.d.ts.map +1 -0
  25. package/dist/kindgi-index-main.js +15 -0
  26. package/dist/kindgi-index-main.js.map +1 -0
  27. package/dist/kindgi-index.d.ts +316 -0
  28. package/dist/kindgi-index.d.ts.map +1 -0
  29. package/dist/kindgi-index.js +1201 -0
  30. package/dist/kindgi-index.js.map +1 -0
  31. package/dist/pack-env.d.ts +66 -0
  32. package/dist/pack-env.d.ts.map +1 -0
  33. package/dist/pack-env.js +97 -0
  34. package/dist/pack-env.js.map +1 -0
  35. package/dist/pack-service/index.d.ts +7 -0
  36. package/dist/pack-service/index.d.ts.map +1 -0
  37. package/dist/pack-service/index.js +6 -0
  38. package/dist/pack-service/index.js.map +1 -0
  39. package/dist/pack-service/main.d.ts +47 -0
  40. package/dist/pack-service/main.d.ts.map +1 -0
  41. package/dist/pack-service/main.js +201 -0
  42. package/dist/pack-service/main.js.map +1 -0
  43. package/dist/pack-service/service.d.ts +61 -0
  44. package/dist/pack-service/service.d.ts.map +1 -0
  45. package/dist/pack-service/service.js +341 -0
  46. package/dist/pack-service/service.js.map +1 -0
  47. package/dist/pack-service/supervisor.d.ts +138 -0
  48. package/dist/pack-service/supervisor.d.ts.map +1 -0
  49. package/dist/pack-service/supervisor.js +424 -0
  50. package/dist/pack-service/supervisor.js.map +1 -0
  51. package/dist/protocol.d.ts +104 -0
  52. package/dist/protocol.d.ts.map +1 -0
  53. package/dist/protocol.js +116 -0
  54. package/dist/protocol.js.map +1 -0
  55. package/package.json +87 -4
  56. package/src/build-extensions.ts +100 -0
  57. package/src/discovery.ts +89 -0
  58. package/src/entrypoint.ts +23 -0
  59. package/src/handler-runner.ts +500 -0
  60. package/src/index.ts +66 -0
  61. package/src/kindgi-index-main.ts +17 -0
  62. package/src/kindgi-index.ts +1605 -0
  63. package/src/pack-env.ts +148 -0
  64. package/src/pack-service/index.ts +17 -0
  65. package/src/pack-service/main.ts +246 -0
  66. package/src/pack-service/service.ts +478 -0
  67. package/src/pack-service/supervisor.ts +600 -0
  68. package/src/protocol.ts +214 -0
@@ -0,0 +1,316 @@
1
+ import { type FlowOutputSpec } from '@kindgi/flow';
2
+ import type { Result } from '@kindgi/types';
3
+ import { type PackEnvConfig, type PackEnvDeclaration } from './pack-env.js';
4
+ /**
5
+ * Envelope version emitted on `index.json`. Bump on breaking change;
6
+ * additive fields on an existing shape don't bump. Consumers (the
7
+ * controller) MUST refuse an envelope version they
8
+ * don't recognize.
9
+ */
10
+ export declare const INDEX_ENVELOPE_VERSION: 1;
11
+ export type IndexEnvelopeVersion = typeof INDEX_ENVELOPE_VERSION;
12
+ export type PrimitiveKind = 'tool' | 'guardrail' | 'agent' | 'flow';
13
+ /** Discovery glob patterns keyed by primitive kind. */
14
+ export interface DiscoveryConfig {
15
+ readonly tools?: string;
16
+ readonly guardrails?: string;
17
+ readonly agents?: string;
18
+ readonly flows?: string;
19
+ }
20
+ /**
21
+ * The language a pack's code (tool handlers, guardrail checks) is written
22
+ * in — which indexer reads it and which pack service runs it. Agents and
23
+ * flows are data in either.
24
+ */
25
+ export type PackLanguage = 'node' | 'python';
26
+ /**
27
+ * The subset of `kindgi.config.ts` this indexer consumes. Other
28
+ * top-level fields (`environments`, `bundle`, etc.) are read by the
29
+ * deploy pipeline elsewhere and are opaque to the indexer.
30
+ */
31
+ export interface KindgiConfig {
32
+ readonly pack: {
33
+ readonly id: string;
34
+ readonly version: string;
35
+ readonly description?: string;
36
+ };
37
+ readonly discovery?: DiscoveryConfig;
38
+ /**
39
+ * The pack's code language. Absent in `kindgi.config.*`: `node`. A
40
+ * `[tool.kindgi]` table in `pyproject.toml` is a Python pack unless it
41
+ * says otherwise.
42
+ */
43
+ readonly language?: PackLanguage;
44
+ /**
45
+ * The process environment the pack's code reads: `required` names must
46
+ * be set for the pack service to be ready; `optional` ones are injected
47
+ * when a deployment has them. Carried in `index.json` (see
48
+ * `pack-env.ts`).
49
+ */
50
+ readonly env?: PackEnvConfig;
51
+ readonly [k: string]: unknown;
52
+ }
53
+ /** The language of a loaded config's pack code. */
54
+ export declare function packLanguage(config: KindgiConfig): PackLanguage;
55
+ /**
56
+ * Default discovery patterns. Extensions
57
+ * `.ts` / `.js` / `.mjs` are all accepted — a pack build may transpile
58
+ * `.ts` to `.js` before the indexer runs inside the Dockerfile's indexer
59
+ * stage, but the indexer accepts either shape so local development (no
60
+ * bundle) and CI-built images (post-bundle) share the same code path.
61
+ */
62
+ export declare const DEFAULT_DISCOVERY: Required<DiscoveryConfig>;
63
+ /**
64
+ * Default discovery patterns of a Python pack (`python -m kindgi.pack index`
65
+ * reads the same keys from `[tool.kindgi.discovery]`).
66
+ */
67
+ export declare const DEFAULT_PYTHON_DISCOVERY: Required<DiscoveryConfig>;
68
+ /** A config's discovery patterns with the language's defaults filled in. */
69
+ export declare function resolveDiscovery(discovery: DiscoveryConfig | undefined, language?: PackLanguage): Required<DiscoveryConfig>;
70
+ export interface IndexedTool {
71
+ readonly id: string;
72
+ readonly description?: string;
73
+ readonly version?: string;
74
+ readonly input: Readonly<Record<string, unknown>>;
75
+ readonly output: Readonly<Record<string, unknown>>;
76
+ readonly effects?: readonly Readonly<Record<string, unknown>>[];
77
+ readonly needs?: readonly Readonly<Record<string, unknown>>[];
78
+ readonly needsSpec?: Readonly<Record<string, unknown>>;
79
+ readonly sandbox?: string;
80
+ readonly limits?: Readonly<Record<string, unknown>>;
81
+ readonly network?: Readonly<Record<string, unknown>>;
82
+ /**
83
+ * A declarative tool's spec (`defineTool({ spec })`, e.g. `kind:
84
+ * 'http'`). The runtime runs a tool that has one itself — and resolves
85
+ * its `secretRef`s — rather than calling the pack service.
86
+ */
87
+ readonly spec?: Readonly<Record<string, unknown>>;
88
+ /**
89
+ * The tool's declared `mutating`. `false` makes it read-only: it runs
90
+ * in a dry run, and per-tool approval gates don't ask before it by
91
+ * default. Absent means it may change something.
92
+ */
93
+ readonly mutating?: boolean;
94
+ readonly modulePath: string;
95
+ }
96
+ export interface IndexedGuardrail {
97
+ readonly id: string;
98
+ readonly name?: string;
99
+ readonly kind: string;
100
+ readonly action: Readonly<Record<string, unknown>>;
101
+ readonly severity?: string;
102
+ readonly scope?: Readonly<Record<string, unknown>>;
103
+ readonly checkModulePath: string;
104
+ readonly checkId?: string;
105
+ readonly configSchema?: Readonly<Record<string, unknown>>;
106
+ /** The guardrail's `config`: what its check is configured with. */
107
+ readonly config?: Readonly<Record<string, unknown>>;
108
+ readonly sandbox?: string;
109
+ readonly limits?: Readonly<Record<string, unknown>>;
110
+ readonly network?: Readonly<Record<string, unknown>>;
111
+ }
112
+ export interface IndexedAgent {
113
+ readonly id: string;
114
+ readonly version: string;
115
+ readonly name: string;
116
+ readonly instructions: string;
117
+ readonly capabilities: readonly unknown[];
118
+ /**
119
+ * Typed tool references — `{ id, version }` where `version` is a
120
+ * semver range. Structurally compatible with `@kindgi/agents`
121
+ * `ToolRef`.
122
+ */
123
+ readonly tools: readonly {
124
+ readonly id: string;
125
+ readonly version: string;
126
+ }[];
127
+ readonly retrieval?: readonly unknown[];
128
+ readonly guardrails?: readonly string[];
129
+ readonly budget?: Readonly<Record<string, unknown>>;
130
+ readonly parameters?: readonly unknown[];
131
+ readonly preferredProvider?: string;
132
+ readonly preferredModel?: string;
133
+ readonly description?: string;
134
+ readonly tags?: readonly string[];
135
+ readonly conversationPolicy?: Readonly<Record<string, unknown>>;
136
+ /** The agent's typed output (`{ schema, name?, maxRepairs? }`), JSON Schema already. */
137
+ readonly output?: Readonly<Record<string, unknown>>;
138
+ /** How the agent's turns retry failed tool calls (`{ maxRetries?, retryOn? }`). */
139
+ readonly toolErrors?: Readonly<Record<string, unknown>>;
140
+ readonly modulePath: string;
141
+ }
142
+ /**
143
+ * Envelope version for the flow payload embedded inside `index.json`.
144
+ * Distinct from the top-level `v` envelope so the flow substrate can
145
+ * evolve its own shape independently — matches the `packages/flow`
146
+ * schema-version convention (currently 1.8.0, which added input and
147
+ * output mappings). Additive fields don't bump this.
148
+ */
149
+ export declare const KERNEL_PAYLOAD_VERSION: 1;
150
+ export interface IndexedFlow {
151
+ readonly id: string;
152
+ readonly version: string;
153
+ readonly name?: string;
154
+ readonly description?: string;
155
+ readonly nodes: readonly unknown[];
156
+ readonly edges: readonly unknown[];
157
+ readonly maxParallelism?: number;
158
+ readonly metadata?: Readonly<Record<string, unknown>>;
159
+ /** The flow's declared output (schema-version 1.8.0+). */
160
+ readonly output?: FlowOutputSpec;
161
+ readonly kernelPayloadVersion: number;
162
+ readonly modulePath: string;
163
+ }
164
+ export interface Index {
165
+ readonly v: IndexEnvelopeVersion;
166
+ readonly packId: string;
167
+ readonly packVersion: string;
168
+ readonly artifactVersion: string;
169
+ readonly publishedAt: string;
170
+ readonly tools: readonly IndexedTool[];
171
+ readonly guardrails: readonly IndexedGuardrail[];
172
+ readonly agents: readonly IndexedAgent[];
173
+ readonly flows: readonly IndexedFlow[];
174
+ /** The pack's declared process environment (schema-version 1.4.0+); absent when it declares none. */
175
+ readonly env?: PackEnvDeclaration;
176
+ }
177
+ export type IndexerErrorCode = 'config-not-found' | 'config-parse-failed' | 'config-invalid' | 'discovery-empty' | 'file-import-failed' | 'no-default-export' | 'kind-mismatch' | 'ambiguous-kind' | 'zod-conversion-failed' | 'manifest-validation-failed' | 'output-write-failed' | 'language-mismatch';
178
+ export interface IndexerError {
179
+ readonly code: IndexerErrorCode;
180
+ readonly message: string;
181
+ readonly filePath?: string;
182
+ readonly field?: string;
183
+ readonly cause?: unknown;
184
+ }
185
+ export interface IndexerReport {
186
+ readonly packId: string;
187
+ readonly packVersion: string;
188
+ readonly artifactVersion: string;
189
+ readonly publishedAt: string;
190
+ readonly counts: {
191
+ readonly tools: number;
192
+ readonly guardrails: number;
193
+ readonly agents: number;
194
+ readonly flows: number;
195
+ };
196
+ readonly outputPath: string;
197
+ /**
198
+ * Per-file errors accumulated during indexing — one bad file no
199
+ * longer aborts the whole pass. Registration continues on healthy
200
+ * primitives; the caller surfaces these to the user (dev watch,
201
+ * build log). Empty on a fully-clean pass.
202
+ */
203
+ readonly fileErrors: readonly IndexerError[];
204
+ }
205
+ export interface RunIndexerOptions {
206
+ /** Root of the pack repo — the folder containing `kindgi.config.ts`. */
207
+ readonly packDir: string;
208
+ /**
209
+ * Explicit config file path. When omitted, the indexer tries
210
+ * `kindgi.config.ts`, `.mjs`, `.js`, and `.cjs` in that order at
211
+ * the pack root.
212
+ */
213
+ readonly configPath?: string;
214
+ /**
215
+ * Explicit output path. When omitted, defaults to
216
+ * `<packDir>/index.json`.
217
+ */
218
+ readonly outputPath?: string;
219
+ /**
220
+ * Explicit artifact version. When omitted, the indexer computes a
221
+ * `YYYYMMDD.N` shape locally — a pack build supplies an explicit
222
+ * value at Dockerfile invocation time so the image build is
223
+ * reproducible.
224
+ */
225
+ readonly artifactVersion?: string;
226
+ /**
227
+ * Explicit publishedAt timestamp. Determinism gate — a pack build
228
+ * passes this as a build arg (SOURCE_DATE_EPOCH-shaped) so byte-identical
229
+ * source produces byte-identical index.json. Default: `new
230
+ * Date().toISOString()` — noted as non-deterministic in the README.
231
+ */
232
+ readonly publishedAt?: string;
233
+ /**
234
+ * Index a build: each primitive's source path (relative to `packDir`,
235
+ * as the index records it) mapped to its bundle (relative to
236
+ * `moduleRoot`). Given, the map is the file list — the source tree
237
+ * needn't be there, as in a pack image — each key classified by the
238
+ * discovery patterns as `discoverFiles` classifies what it finds; each
239
+ * file is imported from its bundle, and the index records the source
240
+ * path.
241
+ */
242
+ readonly bundleMap?: Readonly<Record<string, string>>;
243
+ /** Where `bundleMap`'s bundle paths are relative to. Default `packDir`. */
244
+ readonly moduleRoot?: string;
245
+ /**
246
+ * Test hook — override the default dynamic `import()`. Used by
247
+ * indexer tests to hand in in-memory module maps without a
248
+ * filesystem round-trip.
249
+ */
250
+ readonly importModule?: (fileUrl: string) => Promise<unknown>;
251
+ }
252
+ /**
253
+ * Run the indexer stage. Never throws — every failure is captured as a
254
+ * typed `IndexerError`.
255
+ */
256
+ export declare function runIndexer(opts: RunIndexerOptions): Promise<Result<IndexerReport, IndexerError>>;
257
+ /**
258
+ * The `kindgi-index` command (process entry: `kindgi-index-main`) — a
259
+ * pack image's indexer stage runs it over the image's bundles. Args:
260
+ *
261
+ * --pack-dir <path> root of the pack (required)
262
+ * --config <path> explicit config file (optional)
263
+ * --output <path> explicit output path (optional)
264
+ * --bundle-map <path> index a build: the bundle map (JSON, optional)
265
+ * --module-root <path> where the bundle map's paths resolve (optional)
266
+ * --artifact-version <str> pin artifact version (optional)
267
+ * --published-at <iso> pin publishedAt (optional; enables reproducible builds)
268
+ * --help
269
+ * --version
270
+ */
271
+ export declare function main(argv: readonly string[]): Promise<number>;
272
+ export declare const HELP_TEXT = "kindgi-index \u2014 build-time pack manifest indexer\n\nUsage:\n kindgi-index --pack-dir <path> [--config <path>] [--output <path>]\n [--bundle-map <path> [--module-root <path>]]\n [--artifact-version <str>] [--published-at <iso>]\n\nOptions:\n --pack-dir <path> Root of the pack (required).\n --config <path> Explicit kindgi.config.* path.\n --output <path> Output path for index.json (default: <packDir>/index.json).\n --bundle-map <path> Index a build: JSON mapping each source path to its bundle.\n --module-root <path> Where the bundle map's paths resolve (default: --pack-dir).\n --artifact-version <str> Pin artifact version (default: YYYYMMDD.N auto).\n --published-at <iso> Pin publishedAt for reproducible builds.\n --help Show this help.\n --version Print version and exit.";
273
+ /**
274
+ * A bundle map file: a JSON object of source path → bundle path, both
275
+ * strings (`kindgi build` writes `dist/bundle-map.json`).
276
+ */
277
+ export declare function readBundleMap(file: string): Promise<{
278
+ readonly kind: 'ok';
279
+ readonly value: Readonly<Record<string, string>>;
280
+ } | {
281
+ readonly kind: 'err';
282
+ readonly message: string;
283
+ }>;
284
+ /** Config file names looked up at a pack root, in order. */
285
+ export declare const KINDGI_CONFIG_FILENAMES: readonly string[];
286
+ export interface LoadKindgiConfigOptions {
287
+ /** Explicit config path (absolute or cwd-relative); skips the lookup. */
288
+ readonly configPath?: string;
289
+ /** Test hook — replaces the cache-busted dynamic `import()`. */
290
+ readonly importModule?: (fileUrl: string) => Promise<unknown>;
291
+ }
292
+ /**
293
+ * Load and minimally validate a pack's `kindgi.config.*` — the one
294
+ * loader behind the indexer and any tooling that reads pack config.
295
+ * Never throws:
296
+ * `config-not-found` when no config file exists, `config-parse-failed`
297
+ * (with the underlying cause) when it exists but cannot be imported or
298
+ * lacks `pack.id` / `pack.version`. Imports are cache-busted by mtime so
299
+ * a long-running process sees edits.
300
+ */
301
+ export declare function loadKindgiConfig(packDir: string, options?: LoadKindgiConfigOptions): Promise<Result<KindgiConfig, IndexerError>>;
302
+ /** `pyproject.toml` — a Python pack keeps its config in the `[tool.kindgi]` table. */
303
+ export declare const PYPROJECT_FILENAME = "pyproject.toml";
304
+ export interface KindgiConfigFile {
305
+ readonly path: string;
306
+ /** `module`: a `kindgi.config.*`; `pyproject`: the `[tool.kindgi]` table of a `pyproject.toml`. */
307
+ readonly format: 'module' | 'pyproject';
308
+ }
309
+ /**
310
+ * Where a pack's config lives: the first `kindgi.config.*` at `packDir`
311
+ * (`KINDGI_CONFIG_FILENAMES` order), else a `pyproject.toml` with a
312
+ * `[tool.kindgi]` table. `undefined` when neither — a `pyproject.toml`
313
+ * without the table is a Python project, not a pack.
314
+ */
315
+ export declare function findKindgiConfig(packDir: string): Promise<KindgiConfigFile | undefined>;
316
+ //# sourceMappingURL=kindgi-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kindgi-index.d.ts","sourceRoot":"","sources":["../src/kindgi-index.ts"],"names":[],"mappings":"AAuDA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,cAAc,CAAC;AAG7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAkB,MAAM,eAAe,CAAC;AAM5F;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAC;AACjD,MAAM,MAAM,oBAAoB,GAAG,OAAO,sBAAsB,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE;QACb,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,QAAQ,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