@agentic-kit/harness 0.1.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.
@@ -1,86 +1,101 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlueprintSchema = exports.BlueprintDefinitionSchema = void 0;
4
- const typebox_1 = require("typebox");
5
- const FieldBlueprint = typebox_1.Type.Object({
6
- name: typebox_1.Type.String({ description: 'Field name in snake_case' }),
7
- type: typebox_1.Type.String({
8
- description: 'PostgreSQL type: uuid, text, integer, smallint, numeric, boolean, date, timestamp, timestamptz, time, json, jsonb, inet, citext, email, url, image, upload',
9
- }),
10
- is_required: typebox_1.Type.Optional(typebox_1.Type.Boolean({ description: 'Whether the field is NOT NULL' })),
11
- default: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()], {
12
- description: 'SQL default expression, e.g. "uuidv7()", "now()", "\'draft\'"',
13
- })),
3
+ exports.BlueprintSchema = exports.BlueprintDefinitionSchema = exports.BlueprintZod = exports.BlueprintDefinitionZod = void 0;
4
+ const zod_1 = require("zod");
5
+ const FieldBlueprintSchema = zod_1.z.object({
6
+ name: zod_1.z.string().describe('Field name in snake_case'),
7
+ type: zod_1.z
8
+ .string()
9
+ .describe('PostgreSQL type: uuid, text, integer, smallint, numeric, boolean, date, timestamp, timestamptz, time, json, jsonb, inet, citext, email, url, image, upload'),
10
+ is_required: zod_1.z.boolean().optional().describe('Whether the field is NOT NULL'),
11
+ default: zod_1.z
12
+ .union([zod_1.z.string(), zod_1.z.null()])
13
+ .optional()
14
+ .describe('SQL default expression, e.g. "uuidv7()", "now()", "\'draft\'"'),
14
15
  });
15
- const PolicyBlueprint = typebox_1.Type.Object({
16
- $type: typebox_1.Type.String({
17
- description: 'Policy type: AuthzDirectOwner, AuthzEntityMembership, AuthzAllowAll, AuthzPublishable, AuthzAppMembership',
18
- }),
19
- data: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown(), { description: 'Policy config overrides' })),
20
- privileges: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String(), {
21
- description: 'SQL privileges this policy applies to, lowercase, e.g. ["select","insert","update","delete"]. Defaults to all.',
22
- })),
23
- policy_role: typebox_1.Type.Optional(typebox_1.Type.String({ description: 'Role name. Defaults to "authenticated".' })),
24
- permissive: typebox_1.Type.Optional(typebox_1.Type.Boolean({
25
- description: 'Whether permissive (true) or restrictive (false). Defaults to true.',
26
- })),
16
+ const PolicyBlueprintSchema = zod_1.z.object({
17
+ $type: zod_1.z
18
+ .string()
19
+ .describe('Policy type: AuthzDirectOwner, AuthzEntityMembership, AuthzAllowAll, AuthzPublishable, AuthzAppMembership'),
20
+ data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Policy config overrides'),
21
+ privileges: zod_1.z
22
+ .array(zod_1.z.string())
23
+ .optional()
24
+ .describe('SQL privileges this policy applies to, lowercase, e.g. ["select","insert","update","delete"]. Defaults to all.'),
25
+ policy_role: zod_1.z.string().optional().describe('Role name. Defaults to "authenticated".'),
26
+ permissive: zod_1.z
27
+ .boolean()
28
+ .optional()
29
+ .describe('Whether permissive (true) or restrictive (false). Defaults to true.'),
27
30
  });
28
- const NodeBlueprint = typebox_1.Type.Union([
29
- typebox_1.Type.String({ description: 'Node type shorthand, e.g. "DataTimestamps"' }),
30
- typebox_1.Type.Object({
31
- $type: typebox_1.Type.String({ description: 'Node type, e.g. "DataDirectOwner"' }),
32
- data: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown(), { description: 'Node configuration data' })),
31
+ const NodeBlueprintSchema = zod_1.z.union([
32
+ zod_1.z.string().describe('Node type shorthand, e.g. "DataTimestamps"'),
33
+ zod_1.z.object({
34
+ $type: zod_1.z.string().describe('Node type, e.g. "DataDirectOwner"'),
35
+ data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Node configuration data'),
33
36
  }),
34
37
  ]);
35
- const DeleteAction = typebox_1.Type.Union([
36
- typebox_1.Type.Literal('c'),
37
- typebox_1.Type.Literal('r'),
38
- typebox_1.Type.Literal('n'),
39
- typebox_1.Type.Literal('a'),
40
- typebox_1.Type.Literal('d'),
41
- ], {
42
- description: 'FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, a=NO ACTION (default), d=SET DEFAULT',
38
+ const DeleteActionSchema = zod_1.z
39
+ .enum(['c', 'r', 'n', 'a', 'd'])
40
+ .describe('FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, a=NO ACTION (default), d=SET DEFAULT');
41
+ const BelongsToRelationSchema = zod_1.z.object({
42
+ $type: zod_1.z.literal('RelationBelongsTo'),
43
+ source_table: zod_1.z.string().describe('Source table name'),
44
+ target_table: zod_1.z.string().describe('Target table name'),
45
+ field_name: zod_1.z.string().describe('FK column name on the source table, e.g. "author_id"'),
46
+ delete_action: DeleteActionSchema.optional(),
47
+ is_required: zod_1.z.boolean().optional().describe('Whether the FK is NOT NULL (default: true)'),
43
48
  });
44
- const BelongsToRelation = typebox_1.Type.Object({
45
- $type: typebox_1.Type.Literal('RelationBelongsTo'),
46
- source_table: typebox_1.Type.String({ description: 'Source table name' }),
47
- target_table: typebox_1.Type.String({ description: 'Target table name' }),
48
- field_name: typebox_1.Type.String({ description: 'FK column name on the source table, e.g. "author_id"' }),
49
- delete_action: typebox_1.Type.Optional(DeleteAction),
50
- is_required: typebox_1.Type.Optional(typebox_1.Type.Boolean({ description: 'Whether the FK is NOT NULL (default: true)' })),
49
+ const ManyToManyRelationSchema = zod_1.z.object({
50
+ $type: zod_1.z.literal('RelationManyToMany'),
51
+ source_table: zod_1.z.string().describe('Source table name'),
52
+ target_table: zod_1.z.string().describe('Target table name'),
53
+ junction_table_name: zod_1.z.string().describe('Junction table name, e.g. "post_tags"'),
54
+ delete_action: DeleteActionSchema.optional(),
51
55
  });
52
- const ManyToManyRelation = typebox_1.Type.Object({
53
- $type: typebox_1.Type.Literal('RelationManyToMany'),
54
- source_table: typebox_1.Type.String({ description: 'Source table name' }),
55
- target_table: typebox_1.Type.String({ description: 'Target table name' }),
56
- junction_table_name: typebox_1.Type.String({ description: 'Junction table name, e.g. "post_tags"' }),
57
- delete_action: typebox_1.Type.Optional(DeleteAction),
58
- });
59
- const RelationBlueprint = typebox_1.Type.Union([BelongsToRelation, ManyToManyRelation]);
60
- const TableBlueprint = typebox_1.Type.Object({
61
- table_name: typebox_1.Type.String({ description: 'PostgreSQL table name in snake_case, plural' }),
62
- nodes: typebox_1.Type.Optional(typebox_1.Type.Array(NodeBlueprint, {
63
- description: 'Data behavior nodes (e.g. DataTimestamps, DataSoftDelete). DataId and DataTimestamps are auto-included.',
64
- })),
65
- fields: typebox_1.Type.Optional(typebox_1.Type.Array(FieldBlueprint, {
66
- description: 'Custom fields only — do NOT include id, timestamps, or node-generated fields (owner_id, entity_id, is_published, published_at)',
67
- })),
68
- policies: typebox_1.Type.Array(PolicyBlueprint, {
69
- description: 'RLS policies for this table. At least one required.',
70
- }),
56
+ const RelationBlueprintSchema = zod_1.z.union([BelongsToRelationSchema, ManyToManyRelationSchema]);
57
+ const TableBlueprintSchema = zod_1.z.object({
58
+ table_name: zod_1.z.string().describe('PostgreSQL table name in snake_case, plural'),
59
+ nodes: zod_1.z
60
+ .array(NodeBlueprintSchema)
61
+ .optional()
62
+ .describe('Data behavior nodes (e.g. DataTimestamps, DataSoftDelete). DataId and DataTimestamps are auto-included.'),
63
+ fields: zod_1.z
64
+ .array(FieldBlueprintSchema)
65
+ .optional()
66
+ .describe('Custom fields only — do NOT include id, timestamps, or node-generated fields (owner_id, entity_id, is_published, published_at)'),
67
+ policies: zod_1.z
68
+ .array(PolicyBlueprintSchema)
69
+ .describe('RLS policies for this table. At least one required.'),
71
70
  });
72
- exports.BlueprintDefinitionSchema = typebox_1.Type.Object({
73
- tables: typebox_1.Type.Array(TableBlueprint, { description: 'Tables to create' }),
74
- relations: typebox_1.Type.Optional(typebox_1.Type.Array(RelationBlueprint, { description: 'Relations between tables' })),
71
+ exports.BlueprintDefinitionZod = zod_1.z.object({
72
+ tables: zod_1.z.array(TableBlueprintSchema).describe('Tables to create'),
73
+ relations: zod_1.z
74
+ .array(RelationBlueprintSchema)
75
+ .optional()
76
+ .describe('Relations between tables'),
75
77
  });
76
- exports.BlueprintSchema = typebox_1.Type.Object({
77
- name: typebox_1.Type.String({ description: 'Blueprint name in snake_case' }),
78
- description: typebox_1.Type.String({ description: 'Brief description of what this schema is for' }),
79
- definition: exports.BlueprintDefinitionSchema,
80
- categories: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String(), {
81
- description: 'Template categories if saved as template, e.g. ["e-commerce", "healthcare"]',
82
- })),
83
- tags: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String(), {
84
- description: 'Freeform search tags if saved as template, e.g. ["products", "orders"]',
85
- })),
78
+ exports.BlueprintZod = zod_1.z.object({
79
+ name: zod_1.z.string().describe('Blueprint name in snake_case'),
80
+ description: zod_1.z.string().describe('Brief description of what this schema is for'),
81
+ definition: exports.BlueprintDefinitionZod,
82
+ categories: zod_1.z
83
+ .array(zod_1.z.string())
84
+ .optional()
85
+ .describe('Template categories if saved as template, e.g. ["e-commerce", "healthcare"]'),
86
+ tags: zod_1.z
87
+ .array(zod_1.z.string())
88
+ .optional()
89
+ .describe('Freeform search tags if saved as template, e.g. ["products", "orders"]'),
86
90
  });
91
+ /**
92
+ * JSON Schema objects for hosts that hand tool parameter schemas to an agent
93
+ * runtime (e.g. pi's `ToolDefinition.parameters`). Same shapes the previous
94
+ * typebox exports produced.
95
+ */
96
+ exports.BlueprintDefinitionSchema = toJsonSchema(exports.BlueprintDefinitionZod);
97
+ exports.BlueprintSchema = toJsonSchema(exports.BlueprintZod);
98
+ function toJsonSchema(schema) {
99
+ const { $schema: _$schema, ...rest } = zod_1.z.toJSONSchema(schema, { target: 'draft-7' });
100
+ return rest;
101
+ }
@@ -1,138 +1,181 @@
1
- import { type Static, Type } from 'typebox';
2
- declare const FieldBlueprint: Type.TObject<{
3
- name: Type.TString;
4
- type: Type.TString;
5
- is_required: Type.TOptional<Type.TBoolean>;
6
- default: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
7
- }>;
8
- declare const PolicyBlueprint: Type.TObject<{
9
- $type: Type.TString;
10
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
11
- privileges: Type.TOptional<Type.TArray<Type.TString>>;
12
- policy_role: Type.TOptional<Type.TString>;
13
- permissive: Type.TOptional<Type.TBoolean>;
14
- }>;
15
- declare const NodeBlueprint: Type.TUnion<[Type.TString, Type.TObject<{
16
- $type: Type.TString;
17
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
18
- }>]>;
19
- declare const RelationBlueprint: Type.TUnion<[Type.TObject<{
20
- $type: Type.TLiteral<"RelationBelongsTo">;
21
- source_table: Type.TString;
22
- target_table: Type.TString;
23
- field_name: Type.TString;
24
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
25
- is_required: Type.TOptional<Type.TBoolean>;
26
- }>, Type.TObject<{
27
- $type: Type.TLiteral<"RelationManyToMany">;
28
- source_table: Type.TString;
29
- target_table: Type.TString;
30
- junction_table_name: Type.TString;
31
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
32
- }>]>;
33
- declare const TableBlueprint: Type.TObject<{
34
- table_name: Type.TString;
35
- nodes: Type.TOptional<Type.TArray<Type.TUnion<[Type.TString, Type.TObject<{
36
- $type: Type.TString;
37
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
38
- }>]>>>;
39
- fields: Type.TOptional<Type.TArray<Type.TObject<{
40
- name: Type.TString;
41
- type: Type.TString;
42
- is_required: Type.TOptional<Type.TBoolean>;
43
- default: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
44
- }>>>;
45
- policies: Type.TArray<Type.TObject<{
46
- $type: Type.TString;
47
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
48
- privileges: Type.TOptional<Type.TArray<Type.TString>>;
49
- policy_role: Type.TOptional<Type.TString>;
50
- permissive: Type.TOptional<Type.TBoolean>;
1
+ import { z } from 'zod';
2
+ declare const FieldBlueprintSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ type: z.ZodString;
5
+ is_required: z.ZodOptional<z.ZodBoolean>;
6
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
7
+ }, z.core.$strip>;
8
+ declare const PolicyBlueprintSchema: z.ZodObject<{
9
+ $type: z.ZodString;
10
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11
+ privileges: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ policy_role: z.ZodOptional<z.ZodString>;
13
+ permissive: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$strip>;
15
+ declare const NodeBlueprintSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16
+ $type: z.ZodString;
17
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18
+ }, z.core.$strip>]>;
19
+ declare const RelationBlueprintSchema: z.ZodUnion<readonly [z.ZodObject<{
20
+ $type: z.ZodLiteral<"RelationBelongsTo">;
21
+ source_table: z.ZodString;
22
+ target_table: z.ZodString;
23
+ field_name: z.ZodString;
24
+ delete_action: z.ZodOptional<z.ZodEnum<{
25
+ c: "c";
26
+ r: "r";
27
+ n: "n";
28
+ a: "a";
29
+ d: "d";
51
30
  }>>;
52
- }>;
53
- export declare const BlueprintDefinitionSchema: Type.TObject<{
54
- tables: Type.TArray<Type.TObject<{
55
- table_name: Type.TString;
56
- nodes: Type.TOptional<Type.TArray<Type.TUnion<[Type.TString, Type.TObject<{
57
- $type: Type.TString;
58
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
59
- }>]>>>;
60
- fields: Type.TOptional<Type.TArray<Type.TObject<{
61
- name: Type.TString;
62
- type: Type.TString;
63
- is_required: Type.TOptional<Type.TBoolean>;
64
- default: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
65
- }>>>;
66
- policies: Type.TArray<Type.TObject<{
67
- $type: Type.TString;
68
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
69
- privileges: Type.TOptional<Type.TArray<Type.TString>>;
70
- policy_role: Type.TOptional<Type.TString>;
71
- permissive: Type.TOptional<Type.TBoolean>;
72
- }>>;
31
+ is_required: z.ZodOptional<z.ZodBoolean>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ $type: z.ZodLiteral<"RelationManyToMany">;
34
+ source_table: z.ZodString;
35
+ target_table: z.ZodString;
36
+ junction_table_name: z.ZodString;
37
+ delete_action: z.ZodOptional<z.ZodEnum<{
38
+ c: "c";
39
+ r: "r";
40
+ n: "n";
41
+ a: "a";
42
+ d: "d";
73
43
  }>>;
74
- relations: Type.TOptional<Type.TArray<Type.TUnion<[Type.TObject<{
75
- $type: Type.TLiteral<"RelationBelongsTo">;
76
- source_table: Type.TString;
77
- target_table: Type.TString;
78
- field_name: Type.TString;
79
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
80
- is_required: Type.TOptional<Type.TBoolean>;
81
- }>, Type.TObject<{
82
- $type: Type.TLiteral<"RelationManyToMany">;
83
- source_table: Type.TString;
84
- target_table: Type.TString;
85
- junction_table_name: Type.TString;
86
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
87
- }>]>>>;
88
- }>;
89
- export declare const BlueprintSchema: Type.TObject<{
90
- name: Type.TString;
91
- description: Type.TString;
92
- definition: Type.TObject<{
93
- tables: Type.TArray<Type.TObject<{
94
- table_name: Type.TString;
95
- nodes: Type.TOptional<Type.TArray<Type.TUnion<[Type.TString, Type.TObject<{
96
- $type: Type.TString;
97
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
98
- }>]>>>;
99
- fields: Type.TOptional<Type.TArray<Type.TObject<{
100
- name: Type.TString;
101
- type: Type.TString;
102
- is_required: Type.TOptional<Type.TBoolean>;
103
- default: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
104
- }>>>;
105
- policies: Type.TArray<Type.TObject<{
106
- $type: Type.TString;
107
- data: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
108
- privileges: Type.TOptional<Type.TArray<Type.TString>>;
109
- policy_role: Type.TOptional<Type.TString>;
110
- permissive: Type.TOptional<Type.TBoolean>;
111
- }>>;
44
+ }, z.core.$strip>]>;
45
+ declare const TableBlueprintSchema: z.ZodObject<{
46
+ table_name: z.ZodString;
47
+ nodes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
48
+ $type: z.ZodString;
49
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ }, z.core.$strip>]>>>;
51
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ name: z.ZodString;
53
+ type: z.ZodString;
54
+ is_required: z.ZodOptional<z.ZodBoolean>;
55
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
56
+ }, z.core.$strip>>>;
57
+ policies: z.ZodArray<z.ZodObject<{
58
+ $type: z.ZodString;
59
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
60
+ privileges: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
+ policy_role: z.ZodOptional<z.ZodString>;
62
+ permissive: z.ZodOptional<z.ZodBoolean>;
63
+ }, z.core.$strip>>;
64
+ }, z.core.$strip>;
65
+ export declare const BlueprintDefinitionZod: z.ZodObject<{
66
+ tables: z.ZodArray<z.ZodObject<{
67
+ table_name: z.ZodString;
68
+ nodes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
69
+ $type: z.ZodString;
70
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
+ }, z.core.$strip>]>>>;
72
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
73
+ name: z.ZodString;
74
+ type: z.ZodString;
75
+ is_required: z.ZodOptional<z.ZodBoolean>;
76
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
77
+ }, z.core.$strip>>>;
78
+ policies: z.ZodArray<z.ZodObject<{
79
+ $type: z.ZodString;
80
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
81
+ privileges: z.ZodOptional<z.ZodArray<z.ZodString>>;
82
+ policy_role: z.ZodOptional<z.ZodString>;
83
+ permissive: z.ZodOptional<z.ZodBoolean>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>>;
86
+ relations: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
87
+ $type: z.ZodLiteral<"RelationBelongsTo">;
88
+ source_table: z.ZodString;
89
+ target_table: z.ZodString;
90
+ field_name: z.ZodString;
91
+ delete_action: z.ZodOptional<z.ZodEnum<{
92
+ c: "c";
93
+ r: "r";
94
+ n: "n";
95
+ a: "a";
96
+ d: "d";
97
+ }>>;
98
+ is_required: z.ZodOptional<z.ZodBoolean>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ $type: z.ZodLiteral<"RelationManyToMany">;
101
+ source_table: z.ZodString;
102
+ target_table: z.ZodString;
103
+ junction_table_name: z.ZodString;
104
+ delete_action: z.ZodOptional<z.ZodEnum<{
105
+ c: "c";
106
+ r: "r";
107
+ n: "n";
108
+ a: "a";
109
+ d: "d";
112
110
  }>>;
113
- relations: Type.TOptional<Type.TArray<Type.TUnion<[Type.TObject<{
114
- $type: Type.TLiteral<"RelationBelongsTo">;
115
- source_table: Type.TString;
116
- target_table: Type.TString;
117
- field_name: Type.TString;
118
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
119
- is_required: Type.TOptional<Type.TBoolean>;
120
- }>, Type.TObject<{
121
- $type: Type.TLiteral<"RelationManyToMany">;
122
- source_table: Type.TString;
123
- target_table: Type.TString;
124
- junction_table_name: Type.TString;
125
- delete_action: Type.TOptional<Type.TUnion<[Type.TLiteral<"c">, Type.TLiteral<"r">, Type.TLiteral<"n">, Type.TLiteral<"a">, Type.TLiteral<"d">]>>;
126
- }>]>>>;
127
- }>;
128
- categories: Type.TOptional<Type.TArray<Type.TString>>;
129
- tags: Type.TOptional<Type.TArray<Type.TString>>;
130
- }>;
131
- export type Blueprint = Static<typeof BlueprintSchema>;
132
- export type BlueprintDefinition = Static<typeof BlueprintDefinitionSchema>;
133
- export type TableBlueprint = Static<typeof TableBlueprint>;
134
- export type FieldBlueprint = Static<typeof FieldBlueprint>;
135
- export type PolicyBlueprint = Static<typeof PolicyBlueprint>;
136
- export type RelationBlueprint = Static<typeof RelationBlueprint>;
137
- export type NodeBlueprint = Static<typeof NodeBlueprint>;
111
+ }, z.core.$strip>]>>>;
112
+ }, z.core.$strip>;
113
+ export declare const BlueprintZod: z.ZodObject<{
114
+ name: z.ZodString;
115
+ description: z.ZodString;
116
+ definition: z.ZodObject<{
117
+ tables: z.ZodArray<z.ZodObject<{
118
+ table_name: z.ZodString;
119
+ nodes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
120
+ $type: z.ZodString;
121
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
122
+ }, z.core.$strip>]>>>;
123
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
124
+ name: z.ZodString;
125
+ type: z.ZodString;
126
+ is_required: z.ZodOptional<z.ZodBoolean>;
127
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
128
+ }, z.core.$strip>>>;
129
+ policies: z.ZodArray<z.ZodObject<{
130
+ $type: z.ZodString;
131
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
132
+ privileges: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
+ policy_role: z.ZodOptional<z.ZodString>;
134
+ permissive: z.ZodOptional<z.ZodBoolean>;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>>;
137
+ relations: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
138
+ $type: z.ZodLiteral<"RelationBelongsTo">;
139
+ source_table: z.ZodString;
140
+ target_table: z.ZodString;
141
+ field_name: z.ZodString;
142
+ delete_action: z.ZodOptional<z.ZodEnum<{
143
+ c: "c";
144
+ r: "r";
145
+ n: "n";
146
+ a: "a";
147
+ d: "d";
148
+ }>>;
149
+ is_required: z.ZodOptional<z.ZodBoolean>;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ $type: z.ZodLiteral<"RelationManyToMany">;
152
+ source_table: z.ZodString;
153
+ target_table: z.ZodString;
154
+ junction_table_name: z.ZodString;
155
+ delete_action: z.ZodOptional<z.ZodEnum<{
156
+ c: "c";
157
+ r: "r";
158
+ n: "n";
159
+ a: "a";
160
+ d: "d";
161
+ }>>;
162
+ }, z.core.$strip>]>>>;
163
+ }, z.core.$strip>;
164
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
+ }, z.core.$strip>;
167
+ /**
168
+ * JSON Schema objects for hosts that hand tool parameter schemas to an agent
169
+ * runtime (e.g. pi's `ToolDefinition.parameters`). Same shapes the previous
170
+ * typebox exports produced.
171
+ */
172
+ export declare const BlueprintDefinitionSchema: Record<string, unknown>;
173
+ export declare const BlueprintSchema: Record<string, unknown>;
174
+ export type Blueprint = z.infer<typeof BlueprintZod>;
175
+ export type BlueprintDefinition = z.infer<typeof BlueprintDefinitionZod>;
176
+ export type TableBlueprint = z.infer<typeof TableBlueprintSchema>;
177
+ export type FieldBlueprint = z.infer<typeof FieldBlueprintSchema>;
178
+ export type PolicyBlueprint = z.infer<typeof PolicyBlueprintSchema>;
179
+ export type RelationBlueprint = z.infer<typeof RelationBlueprintSchema>;
180
+ export type NodeBlueprint = z.infer<typeof NodeBlueprintSchema>;
138
181
  export {};