@usenaive-sdk/iac 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ agentTemplate: () => agentTemplate,
24
+ cloud: () => cloud,
25
+ default: () => index_default,
26
+ defineConfig: () => defineConfig,
27
+ defineModule: () => defineModule,
28
+ policy: () => policy,
29
+ runtime: () => runtime,
30
+ system: () => system,
31
+ template: () => template
32
+ });
33
+ module.exports = __toCommonJS(index_exports);
34
+ var cloud = {
35
+ web(opts) {
36
+ return { kind: "cloud.web", ...opts };
37
+ },
38
+ postgres(opts) {
39
+ return { kind: "cloud.postgres", ...opts };
40
+ },
41
+ bucket(opts) {
42
+ return { kind: "cloud.bucket", ...opts };
43
+ }
44
+ };
45
+ var runtime = {
46
+ pool(opts) {
47
+ return { kind: "runtime.pool", ...opts };
48
+ }
49
+ };
50
+ function policy(opts) {
51
+ return { kind: "policy", ...opts };
52
+ }
53
+ function agentTemplate(opts) {
54
+ return { kind: "agent_template", ...opts };
55
+ }
56
+ var template = agentTemplate;
57
+ function defineModule(opts) {
58
+ return { kind: "module", tier: "custom", ...opts };
59
+ }
60
+ function system(opts) {
61
+ return { kind: "system", ...opts };
62
+ }
63
+ function defineConfig(config) {
64
+ return config;
65
+ }
66
+ var index_default = defineConfig;
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ agentTemplate,
70
+ cloud,
71
+ defineConfig,
72
+ defineModule,
73
+ policy,
74
+ runtime,
75
+ system,
76
+ template
77
+ });
78
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @usenaive-sdk/iac — Infrastructure-as-Code for governed agent profiles.\n *\n * Build-time, declarative, and side-effect free. You author a `naive.config.ts`\n * with these builders; the CLI's `naive up` reads the exported config and\n * registers shared infrastructure (Path A), the runtime pool, and the\n * per-tenant agent profile templates (the regulated bundle).\n *\n * Nothing here makes API calls — it only produces typed config objects. Issuing\n * cards, forming entities, and registering comms happens at run-time via\n * `@usenaive-sdk/server` (`forUser(id).provision(template)`).\n */\n\n/* ───────────────────────────── cloud (Path A) ───────────────────────────── */\n\nexport type CloudWebFramework = \"nextjs\" | \"remix\" | \"astro\" | \"static\" | \"node\";\nexport type PostgresSize = \"serverless\" | \"small\" | \"medium\" | \"large\";\n\nexport interface CloudWebConfig {\n readonly kind: \"cloud.web\";\n framework: CloudWebFramework;\n dir: string;\n env?: Record<string, string>;\n}\n\nexport interface CloudPostgresConfig {\n readonly kind: \"cloud.postgres\";\n name: string;\n size: PostgresSize;\n}\n\nexport interface CloudBucketConfig {\n readonly kind: \"cloud.bucket\";\n name: string;\n public?: boolean;\n}\n\nexport type CloudResource = CloudWebConfig | CloudPostgresConfig | CloudBucketConfig;\n\nexport const cloud = {\n web(opts: Omit<CloudWebConfig, \"kind\">): CloudWebConfig {\n return { kind: \"cloud.web\", ...opts };\n },\n postgres(opts: Omit<CloudPostgresConfig, \"kind\">): CloudPostgresConfig {\n return { kind: \"cloud.postgres\", ...opts };\n },\n bucket(opts: Omit<CloudBucketConfig, \"kind\">): CloudBucketConfig {\n return { kind: \"cloud.bucket\", ...opts };\n },\n};\n\n/* ───────────────────────────── runtime (Path B) ──────────────────────────── */\n\nexport type RuntimeIsolation = \"microvm\" | \"container\";\n\nexport interface RuntimeAutoscale {\n min: number;\n max: number;\n}\n\nexport interface RuntimePoolConfig {\n readonly kind: \"runtime.pool\";\n source: string;\n isolation: RuntimeIsolation;\n autoscale?: RuntimeAutoscale;\n}\n\nexport const runtime = {\n pool(opts: Omit<RuntimePoolConfig, \"kind\">): RuntimePoolConfig {\n return { kind: \"runtime.pool\", ...opts };\n },\n};\n\n/* ────────────────────────────── policy ───────────────────────────────────── */\n\nexport type Period = \"day\" | \"week\" | \"month\" | \"year\";\n\n/** A spend cap. Structured, or the shorthand string form `\"$1500/mo\"` / `\"$50/day\"`. */\nexport interface SpendCap {\n amount: number;\n /** ISO 4217, defaults to \"USD\". */\n currency?: string;\n period?: Period;\n}\nexport type Budget = SpendCap | string;\n\nexport interface BudgetPolicy {\n cap: Budget;\n /** Fraction 0..1 at which to alert, e.g. 0.8. */\n alertAt?: number;\n /** When true, exceeding the cap is a hard deny; otherwise it routes to approval. */\n hard?: boolean;\n}\n\nexport type ComparisonOp = \">\" | \">=\" | \"<\" | \"<=\" | \"==\";\n\n/** A structured approval trigger, e.g. `{ on: \"cards.charge\", field: \"amount\", op: \">\", value: 100 }`. */\nexport interface ApprovalCondition {\n /** The capability/action this rule applies to, e.g. \"cards.charge\". */\n on: Capability;\n /** Optional numeric guard on a field of the action, e.g. `amount > 100`. */\n field?: string;\n op?: ComparisonOp;\n value?: number;\n}\n\nexport type ApprovalChannel = \"slack\" | \"email\" | \"webhook\";\n\nexport interface ApprovalRule {\n /** Structured condition, or the shorthand string `\"cards.charge.amount > $100\"`. */\n when: ApprovalCondition | string;\n via: ApprovalChannel | string;\n}\n\nexport interface NetworkPolicy {\n allow?: string[];\n deny?: string[];\n}\n\n/** A capability/action name, e.g. \"cards.charge\", \"email.send\", \"search\". */\nexport type Capability = string;\n\nexport interface PolicyConfig {\n readonly kind: \"policy\";\n /** Spend cap + alert threshold, aggregated at the governance gateway. */\n budget?: BudgetPolicy;\n /** Human-in-the-loop rules — matched actions are parked for approval. */\n approvals?: ApprovalRule[];\n /** Allowlist of capabilities. When set, the agent profile's AccountKit enables ONLY these primitives. */\n allow?: Capability[];\n /** Denylist of capabilities — wins over `allow`. */\n deny?: Capability[];\n /**\n * Primitives to opt OUT of the built-in approval default. Pair with an\n * `approvals` threshold to get \"auto-approve below the line, gate above it\"\n * (approvals are escalate-only).\n */\n autoApprove?: Capability[];\n /** Egress allow/deny applied to the runtime sandbox (hostnames/globs). */\n network?: NetworkPolicy;\n}\n\nexport function policy(opts: Omit<PolicyConfig, \"kind\">): PolicyConfig {\n return { kind: \"policy\", ...opts };\n}\n\n/* ────────────────────────────── template ─────────────────────────────────── */\n\nexport type IdentityKind = \"business\" | \"individual\";\nexport type VerificationKind = \"kyb\" | \"kyc\" | \"none\";\nexport type FormationKind = \"ein\" | \"llc\" | \"none\";\n\nexport interface IdentitySpec {\n kind: IdentityKind;\n /** KYB/KYC verification to run before the agent profile goes active. */\n verify?: VerificationKind;\n /** Legal entity formation, e.g. EIN/LLC. */\n form?: FormationKind;\n legalName?: string;\n}\n\nexport type CardKind = \"virtual\" | \"physical\";\n\nexport interface WalletSpec {\n card?: CardKind;\n /** e.g. \"$50/day\" */\n limit?: string;\n}\n\nexport interface EmailSpec {\n /** \"per-tenant\" for an isolated sending domain, or a concrete domain/address. */\n domain?: string;\n address?: string;\n forwardTo?: string;\n warmup?: boolean;\n}\n\nexport interface PhoneSpec {\n sms?: boolean;\n voice?: boolean;\n}\n\nexport interface CommsSpec {\n email?: EmailSpec;\n phone?: PhoneSpec;\n}\n\nexport interface AgentTemplateConfig {\n readonly kind: \"agent_template\";\n identity?: IdentitySpec;\n wallet?: WalletSpec;\n comms?: CommsSpec;\n /** Name of a declared runtime pool, or omit for BYO-runtime. */\n runtime?: string;\n tools?: string[];\n policy?: PolicyConfig;\n}\n\n/**\n * Declares an **agent template** — the blueprint for a governed agent profile\n * (identity, wallet, comms, policy). Instantiated per tenant at run-time with\n * `forUser(id).provision(name)`. List your templates under `agentProfiles` in\n * `defineConfig`.\n */\nexport function agentTemplate(opts: Omit<AgentTemplateConfig, \"kind\">): AgentTemplateConfig {\n return { kind: \"agent_template\", ...opts };\n}\n\n/** @deprecated Renamed to {@link AgentTemplateConfig}. */\nexport type TemplateConfig = AgentTemplateConfig;\n/** @deprecated Renamed to {@link agentTemplate}. */\nexport const template = agentTemplate;\n\n/* ────────────────────────────── modules ──────────────────────────────────── */\n\nexport type ModuleTier = \"first-party\" | \"open\" | \"custom\";\n\nexport interface ModuleDefinition<TConfig = Record<string, unknown>> {\n readonly kind: \"module\";\n name: string;\n tier?: ModuleTier;\n /** Capabilities (tool names) the module contributes to an agent profile. */\n capabilities?: string[];\n config?: TConfig;\n /** Optional provider behind the module (kept swappable). */\n provider?: string;\n}\n\nexport function defineModule<TConfig = Record<string, unknown>>(\n opts: Omit<ModuleDefinition<TConfig>, \"kind\">,\n): ModuleDefinition<TConfig> {\n return { kind: \"module\", tier: \"custom\", ...opts };\n}\n\n/* ──────────────────────── multi-agent systems ────────────────────────────── */\n\n/**\n * A multi-agent system: a parent/manager agent profile (which holds the shared\n * budget) plus sub-agent agent profiles, each in its own isolated runtime. Spend\n * aggregates against the parent cap at the gateway; revoking the parent kills the\n * whole system. Instantiated at run-time with\n * `runtime(pool).startSystem({ root, members, topology })`.\n */\nexport interface SystemConfig {\n readonly kind: \"system\";\n /** Agent template name for the parent/manager agent profile. */\n root: string;\n /** Agent template names for the sub-agent agent profiles (scoped-down derivations). */\n members: string[];\n /** Human-readable coordination topology, e.g. \"manager → [researcher, writer]\". */\n topology?: string;\n /** Shared budget across the whole system, aggregated at the gateway. */\n budget?: BudgetPolicy;\n}\n\nexport function system(opts: Omit<SystemConfig, \"kind\">): SystemConfig {\n return { kind: \"system\", ...opts };\n}\n\n/* ────────────────────────────── defineConfig ─────────────────────────────── */\n\nexport interface NaiveConfig {\n project: string;\n /** Path A — shared, deploy-time infrastructure (optional; wraps Pulumi → AWS). */\n infrastructure?: Record<string, CloudResource>;\n /** Agent runtime pools — microVMs (optional; omit for BYO-runtime). */\n runtime?: Record<string, RuntimePoolConfig>;\n /**\n * Per-tenant agent profiles — keyed by name, each an `agentTemplate(...)`\n * (the regulated bundle + policy). Instantiated per tenant via\n * `forUser(id).provision(name)`.\n */\n agentProfiles?: Record<string, AgentTemplateConfig>;\n /** @deprecated Renamed to {@link NaiveConfig.agentProfiles}. */\n templates?: Record<string, AgentTemplateConfig>;\n /** Multi-agent systems composed from agent templates (parent + sub-agents). */\n systems?: Record<string, SystemConfig>;\n /** Custom/open modules to register. */\n modules?: Record<string, ModuleDefinition>;\n}\n\n/**\n * Declares a Naïve project. Returns the config unchanged (typed + branded), to\n * be the default export of `naive.config.ts` and consumed by `naive up`.\n */\nexport function defineConfig(config: NaiveConfig): NaiveConfig {\n return config;\n}\n\nexport default defineConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,IAAM,QAAQ;AAAA,EACnB,IAAI,MAAoD;AACtD,WAAO,EAAE,MAAM,aAAa,GAAG,KAAK;AAAA,EACtC;AAAA,EACA,SAAS,MAA8D;AACrE,WAAO,EAAE,MAAM,kBAAkB,GAAG,KAAK;AAAA,EAC3C;AAAA,EACA,OAAO,MAA0D;AAC/D,WAAO,EAAE,MAAM,gBAAgB,GAAG,KAAK;AAAA,EACzC;AACF;AAkBO,IAAM,UAAU;AAAA,EACrB,KAAK,MAA0D;AAC7D,WAAO,EAAE,MAAM,gBAAgB,GAAG,KAAK;AAAA,EACzC;AACF;AAuEO,SAAS,OAAO,MAAgD;AACrE,SAAO,EAAE,MAAM,UAAU,GAAG,KAAK;AACnC;AA4DO,SAAS,cAAc,MAA8D;AAC1F,SAAO,EAAE,MAAM,kBAAkB,GAAG,KAAK;AAC3C;AAKO,IAAM,WAAW;AAiBjB,SAAS,aACd,MAC2B;AAC3B,SAAO,EAAE,MAAM,UAAU,MAAM,UAAU,GAAG,KAAK;AACnD;AAuBO,SAAS,OAAO,MAAgD;AACrE,SAAO,EAAE,MAAM,UAAU,GAAG,KAAK;AACnC;AA4BO,SAAS,aAAa,QAAkC;AAC7D,SAAO;AACT;AAEA,IAAO,gBAAQ;","names":[]}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * @usenaive-sdk/iac — Infrastructure-as-Code for governed agent profiles.
3
+ *
4
+ * Build-time, declarative, and side-effect free. You author a `naive.config.ts`
5
+ * with these builders; the CLI's `naive up` reads the exported config and
6
+ * registers shared infrastructure (Path A), the runtime pool, and the
7
+ * per-tenant agent profile templates (the regulated bundle).
8
+ *
9
+ * Nothing here makes API calls — it only produces typed config objects. Issuing
10
+ * cards, forming entities, and registering comms happens at run-time via
11
+ * `@usenaive-sdk/server` (`forUser(id).provision(template)`).
12
+ */
13
+ type CloudWebFramework = "nextjs" | "remix" | "astro" | "static" | "node";
14
+ type PostgresSize = "serverless" | "small" | "medium" | "large";
15
+ interface CloudWebConfig {
16
+ readonly kind: "cloud.web";
17
+ framework: CloudWebFramework;
18
+ dir: string;
19
+ env?: Record<string, string>;
20
+ }
21
+ interface CloudPostgresConfig {
22
+ readonly kind: "cloud.postgres";
23
+ name: string;
24
+ size: PostgresSize;
25
+ }
26
+ interface CloudBucketConfig {
27
+ readonly kind: "cloud.bucket";
28
+ name: string;
29
+ public?: boolean;
30
+ }
31
+ type CloudResource = CloudWebConfig | CloudPostgresConfig | CloudBucketConfig;
32
+ declare const cloud: {
33
+ web(opts: Omit<CloudWebConfig, "kind">): CloudWebConfig;
34
+ postgres(opts: Omit<CloudPostgresConfig, "kind">): CloudPostgresConfig;
35
+ bucket(opts: Omit<CloudBucketConfig, "kind">): CloudBucketConfig;
36
+ };
37
+ type RuntimeIsolation = "microvm" | "container";
38
+ interface RuntimeAutoscale {
39
+ min: number;
40
+ max: number;
41
+ }
42
+ interface RuntimePoolConfig {
43
+ readonly kind: "runtime.pool";
44
+ source: string;
45
+ isolation: RuntimeIsolation;
46
+ autoscale?: RuntimeAutoscale;
47
+ }
48
+ declare const runtime: {
49
+ pool(opts: Omit<RuntimePoolConfig, "kind">): RuntimePoolConfig;
50
+ };
51
+ type Period = "day" | "week" | "month" | "year";
52
+ /** A spend cap. Structured, or the shorthand string form `"$1500/mo"` / `"$50/day"`. */
53
+ interface SpendCap {
54
+ amount: number;
55
+ /** ISO 4217, defaults to "USD". */
56
+ currency?: string;
57
+ period?: Period;
58
+ }
59
+ type Budget = SpendCap | string;
60
+ interface BudgetPolicy {
61
+ cap: Budget;
62
+ /** Fraction 0..1 at which to alert, e.g. 0.8. */
63
+ alertAt?: number;
64
+ /** When true, exceeding the cap is a hard deny; otherwise it routes to approval. */
65
+ hard?: boolean;
66
+ }
67
+ type ComparisonOp = ">" | ">=" | "<" | "<=" | "==";
68
+ /** A structured approval trigger, e.g. `{ on: "cards.charge", field: "amount", op: ">", value: 100 }`. */
69
+ interface ApprovalCondition {
70
+ /** The capability/action this rule applies to, e.g. "cards.charge". */
71
+ on: Capability;
72
+ /** Optional numeric guard on a field of the action, e.g. `amount > 100`. */
73
+ field?: string;
74
+ op?: ComparisonOp;
75
+ value?: number;
76
+ }
77
+ type ApprovalChannel = "slack" | "email" | "webhook";
78
+ interface ApprovalRule {
79
+ /** Structured condition, or the shorthand string `"cards.charge.amount > $100"`. */
80
+ when: ApprovalCondition | string;
81
+ via: ApprovalChannel | string;
82
+ }
83
+ interface NetworkPolicy {
84
+ allow?: string[];
85
+ deny?: string[];
86
+ }
87
+ /** A capability/action name, e.g. "cards.charge", "email.send", "search". */
88
+ type Capability = string;
89
+ interface PolicyConfig {
90
+ readonly kind: "policy";
91
+ /** Spend cap + alert threshold, aggregated at the governance gateway. */
92
+ budget?: BudgetPolicy;
93
+ /** Human-in-the-loop rules — matched actions are parked for approval. */
94
+ approvals?: ApprovalRule[];
95
+ /** Allowlist of capabilities. When set, the agent profile's AccountKit enables ONLY these primitives. */
96
+ allow?: Capability[];
97
+ /** Denylist of capabilities — wins over `allow`. */
98
+ deny?: Capability[];
99
+ /**
100
+ * Primitives to opt OUT of the built-in approval default. Pair with an
101
+ * `approvals` threshold to get "auto-approve below the line, gate above it"
102
+ * (approvals are escalate-only).
103
+ */
104
+ autoApprove?: Capability[];
105
+ /** Egress allow/deny applied to the runtime sandbox (hostnames/globs). */
106
+ network?: NetworkPolicy;
107
+ }
108
+ declare function policy(opts: Omit<PolicyConfig, "kind">): PolicyConfig;
109
+ type IdentityKind = "business" | "individual";
110
+ type VerificationKind = "kyb" | "kyc" | "none";
111
+ type FormationKind = "ein" | "llc" | "none";
112
+ interface IdentitySpec {
113
+ kind: IdentityKind;
114
+ /** KYB/KYC verification to run before the agent profile goes active. */
115
+ verify?: VerificationKind;
116
+ /** Legal entity formation, e.g. EIN/LLC. */
117
+ form?: FormationKind;
118
+ legalName?: string;
119
+ }
120
+ type CardKind = "virtual" | "physical";
121
+ interface WalletSpec {
122
+ card?: CardKind;
123
+ /** e.g. "$50/day" */
124
+ limit?: string;
125
+ }
126
+ interface EmailSpec {
127
+ /** "per-tenant" for an isolated sending domain, or a concrete domain/address. */
128
+ domain?: string;
129
+ address?: string;
130
+ forwardTo?: string;
131
+ warmup?: boolean;
132
+ }
133
+ interface PhoneSpec {
134
+ sms?: boolean;
135
+ voice?: boolean;
136
+ }
137
+ interface CommsSpec {
138
+ email?: EmailSpec;
139
+ phone?: PhoneSpec;
140
+ }
141
+ interface AgentTemplateConfig {
142
+ readonly kind: "agent_template";
143
+ identity?: IdentitySpec;
144
+ wallet?: WalletSpec;
145
+ comms?: CommsSpec;
146
+ /** Name of a declared runtime pool, or omit for BYO-runtime. */
147
+ runtime?: string;
148
+ tools?: string[];
149
+ policy?: PolicyConfig;
150
+ }
151
+ /**
152
+ * Declares an **agent template** — the blueprint for a governed agent profile
153
+ * (identity, wallet, comms, policy). Instantiated per tenant at run-time with
154
+ * `forUser(id).provision(name)`. List your templates under `agentProfiles` in
155
+ * `defineConfig`.
156
+ */
157
+ declare function agentTemplate(opts: Omit<AgentTemplateConfig, "kind">): AgentTemplateConfig;
158
+ /** @deprecated Renamed to {@link AgentTemplateConfig}. */
159
+ type TemplateConfig = AgentTemplateConfig;
160
+ /** @deprecated Renamed to {@link agentTemplate}. */
161
+ declare const template: typeof agentTemplate;
162
+ type ModuleTier = "first-party" | "open" | "custom";
163
+ interface ModuleDefinition<TConfig = Record<string, unknown>> {
164
+ readonly kind: "module";
165
+ name: string;
166
+ tier?: ModuleTier;
167
+ /** Capabilities (tool names) the module contributes to an agent profile. */
168
+ capabilities?: string[];
169
+ config?: TConfig;
170
+ /** Optional provider behind the module (kept swappable). */
171
+ provider?: string;
172
+ }
173
+ declare function defineModule<TConfig = Record<string, unknown>>(opts: Omit<ModuleDefinition<TConfig>, "kind">): ModuleDefinition<TConfig>;
174
+ /**
175
+ * A multi-agent system: a parent/manager agent profile (which holds the shared
176
+ * budget) plus sub-agent agent profiles, each in its own isolated runtime. Spend
177
+ * aggregates against the parent cap at the gateway; revoking the parent kills the
178
+ * whole system. Instantiated at run-time with
179
+ * `runtime(pool).startSystem({ root, members, topology })`.
180
+ */
181
+ interface SystemConfig {
182
+ readonly kind: "system";
183
+ /** Agent template name for the parent/manager agent profile. */
184
+ root: string;
185
+ /** Agent template names for the sub-agent agent profiles (scoped-down derivations). */
186
+ members: string[];
187
+ /** Human-readable coordination topology, e.g. "manager → [researcher, writer]". */
188
+ topology?: string;
189
+ /** Shared budget across the whole system, aggregated at the gateway. */
190
+ budget?: BudgetPolicy;
191
+ }
192
+ declare function system(opts: Omit<SystemConfig, "kind">): SystemConfig;
193
+ interface NaiveConfig {
194
+ project: string;
195
+ /** Path A — shared, deploy-time infrastructure (optional; wraps Pulumi → AWS). */
196
+ infrastructure?: Record<string, CloudResource>;
197
+ /** Agent runtime pools — microVMs (optional; omit for BYO-runtime). */
198
+ runtime?: Record<string, RuntimePoolConfig>;
199
+ /**
200
+ * Per-tenant agent profiles — keyed by name, each an `agentTemplate(...)`
201
+ * (the regulated bundle + policy). Instantiated per tenant via
202
+ * `forUser(id).provision(name)`.
203
+ */
204
+ agentProfiles?: Record<string, AgentTemplateConfig>;
205
+ /** @deprecated Renamed to {@link NaiveConfig.agentProfiles}. */
206
+ templates?: Record<string, AgentTemplateConfig>;
207
+ /** Multi-agent systems composed from agent templates (parent + sub-agents). */
208
+ systems?: Record<string, SystemConfig>;
209
+ /** Custom/open modules to register. */
210
+ modules?: Record<string, ModuleDefinition>;
211
+ }
212
+ /**
213
+ * Declares a Naïve project. Returns the config unchanged (typed + branded), to
214
+ * be the default export of `naive.config.ts` and consumed by `naive up`.
215
+ */
216
+ declare function defineConfig(config: NaiveConfig): NaiveConfig;
217
+
218
+ export { type AgentTemplateConfig, type ApprovalChannel, type ApprovalCondition, type ApprovalRule, type Budget, type BudgetPolicy, type Capability, type CardKind, type CloudBucketConfig, type CloudPostgresConfig, type CloudResource, type CloudWebConfig, type CloudWebFramework, type CommsSpec, type ComparisonOp, type EmailSpec, type FormationKind, type IdentityKind, type IdentitySpec, type ModuleDefinition, type ModuleTier, type NaiveConfig, type NetworkPolicy, type Period, type PhoneSpec, type PolicyConfig, type PostgresSize, type RuntimeAutoscale, type RuntimeIsolation, type RuntimePoolConfig, type SpendCap, type SystemConfig, type TemplateConfig, type VerificationKind, type WalletSpec, agentTemplate, cloud, defineConfig as default, defineConfig, defineModule, policy, runtime, system, template };
@@ -0,0 +1,218 @@
1
+ /**
2
+ * @usenaive-sdk/iac — Infrastructure-as-Code for governed agent profiles.
3
+ *
4
+ * Build-time, declarative, and side-effect free. You author a `naive.config.ts`
5
+ * with these builders; the CLI's `naive up` reads the exported config and
6
+ * registers shared infrastructure (Path A), the runtime pool, and the
7
+ * per-tenant agent profile templates (the regulated bundle).
8
+ *
9
+ * Nothing here makes API calls — it only produces typed config objects. Issuing
10
+ * cards, forming entities, and registering comms happens at run-time via
11
+ * `@usenaive-sdk/server` (`forUser(id).provision(template)`).
12
+ */
13
+ type CloudWebFramework = "nextjs" | "remix" | "astro" | "static" | "node";
14
+ type PostgresSize = "serverless" | "small" | "medium" | "large";
15
+ interface CloudWebConfig {
16
+ readonly kind: "cloud.web";
17
+ framework: CloudWebFramework;
18
+ dir: string;
19
+ env?: Record<string, string>;
20
+ }
21
+ interface CloudPostgresConfig {
22
+ readonly kind: "cloud.postgres";
23
+ name: string;
24
+ size: PostgresSize;
25
+ }
26
+ interface CloudBucketConfig {
27
+ readonly kind: "cloud.bucket";
28
+ name: string;
29
+ public?: boolean;
30
+ }
31
+ type CloudResource = CloudWebConfig | CloudPostgresConfig | CloudBucketConfig;
32
+ declare const cloud: {
33
+ web(opts: Omit<CloudWebConfig, "kind">): CloudWebConfig;
34
+ postgres(opts: Omit<CloudPostgresConfig, "kind">): CloudPostgresConfig;
35
+ bucket(opts: Omit<CloudBucketConfig, "kind">): CloudBucketConfig;
36
+ };
37
+ type RuntimeIsolation = "microvm" | "container";
38
+ interface RuntimeAutoscale {
39
+ min: number;
40
+ max: number;
41
+ }
42
+ interface RuntimePoolConfig {
43
+ readonly kind: "runtime.pool";
44
+ source: string;
45
+ isolation: RuntimeIsolation;
46
+ autoscale?: RuntimeAutoscale;
47
+ }
48
+ declare const runtime: {
49
+ pool(opts: Omit<RuntimePoolConfig, "kind">): RuntimePoolConfig;
50
+ };
51
+ type Period = "day" | "week" | "month" | "year";
52
+ /** A spend cap. Structured, or the shorthand string form `"$1500/mo"` / `"$50/day"`. */
53
+ interface SpendCap {
54
+ amount: number;
55
+ /** ISO 4217, defaults to "USD". */
56
+ currency?: string;
57
+ period?: Period;
58
+ }
59
+ type Budget = SpendCap | string;
60
+ interface BudgetPolicy {
61
+ cap: Budget;
62
+ /** Fraction 0..1 at which to alert, e.g. 0.8. */
63
+ alertAt?: number;
64
+ /** When true, exceeding the cap is a hard deny; otherwise it routes to approval. */
65
+ hard?: boolean;
66
+ }
67
+ type ComparisonOp = ">" | ">=" | "<" | "<=" | "==";
68
+ /** A structured approval trigger, e.g. `{ on: "cards.charge", field: "amount", op: ">", value: 100 }`. */
69
+ interface ApprovalCondition {
70
+ /** The capability/action this rule applies to, e.g. "cards.charge". */
71
+ on: Capability;
72
+ /** Optional numeric guard on a field of the action, e.g. `amount > 100`. */
73
+ field?: string;
74
+ op?: ComparisonOp;
75
+ value?: number;
76
+ }
77
+ type ApprovalChannel = "slack" | "email" | "webhook";
78
+ interface ApprovalRule {
79
+ /** Structured condition, or the shorthand string `"cards.charge.amount > $100"`. */
80
+ when: ApprovalCondition | string;
81
+ via: ApprovalChannel | string;
82
+ }
83
+ interface NetworkPolicy {
84
+ allow?: string[];
85
+ deny?: string[];
86
+ }
87
+ /** A capability/action name, e.g. "cards.charge", "email.send", "search". */
88
+ type Capability = string;
89
+ interface PolicyConfig {
90
+ readonly kind: "policy";
91
+ /** Spend cap + alert threshold, aggregated at the governance gateway. */
92
+ budget?: BudgetPolicy;
93
+ /** Human-in-the-loop rules — matched actions are parked for approval. */
94
+ approvals?: ApprovalRule[];
95
+ /** Allowlist of capabilities. When set, the agent profile's AccountKit enables ONLY these primitives. */
96
+ allow?: Capability[];
97
+ /** Denylist of capabilities — wins over `allow`. */
98
+ deny?: Capability[];
99
+ /**
100
+ * Primitives to opt OUT of the built-in approval default. Pair with an
101
+ * `approvals` threshold to get "auto-approve below the line, gate above it"
102
+ * (approvals are escalate-only).
103
+ */
104
+ autoApprove?: Capability[];
105
+ /** Egress allow/deny applied to the runtime sandbox (hostnames/globs). */
106
+ network?: NetworkPolicy;
107
+ }
108
+ declare function policy(opts: Omit<PolicyConfig, "kind">): PolicyConfig;
109
+ type IdentityKind = "business" | "individual";
110
+ type VerificationKind = "kyb" | "kyc" | "none";
111
+ type FormationKind = "ein" | "llc" | "none";
112
+ interface IdentitySpec {
113
+ kind: IdentityKind;
114
+ /** KYB/KYC verification to run before the agent profile goes active. */
115
+ verify?: VerificationKind;
116
+ /** Legal entity formation, e.g. EIN/LLC. */
117
+ form?: FormationKind;
118
+ legalName?: string;
119
+ }
120
+ type CardKind = "virtual" | "physical";
121
+ interface WalletSpec {
122
+ card?: CardKind;
123
+ /** e.g. "$50/day" */
124
+ limit?: string;
125
+ }
126
+ interface EmailSpec {
127
+ /** "per-tenant" for an isolated sending domain, or a concrete domain/address. */
128
+ domain?: string;
129
+ address?: string;
130
+ forwardTo?: string;
131
+ warmup?: boolean;
132
+ }
133
+ interface PhoneSpec {
134
+ sms?: boolean;
135
+ voice?: boolean;
136
+ }
137
+ interface CommsSpec {
138
+ email?: EmailSpec;
139
+ phone?: PhoneSpec;
140
+ }
141
+ interface AgentTemplateConfig {
142
+ readonly kind: "agent_template";
143
+ identity?: IdentitySpec;
144
+ wallet?: WalletSpec;
145
+ comms?: CommsSpec;
146
+ /** Name of a declared runtime pool, or omit for BYO-runtime. */
147
+ runtime?: string;
148
+ tools?: string[];
149
+ policy?: PolicyConfig;
150
+ }
151
+ /**
152
+ * Declares an **agent template** — the blueprint for a governed agent profile
153
+ * (identity, wallet, comms, policy). Instantiated per tenant at run-time with
154
+ * `forUser(id).provision(name)`. List your templates under `agentProfiles` in
155
+ * `defineConfig`.
156
+ */
157
+ declare function agentTemplate(opts: Omit<AgentTemplateConfig, "kind">): AgentTemplateConfig;
158
+ /** @deprecated Renamed to {@link AgentTemplateConfig}. */
159
+ type TemplateConfig = AgentTemplateConfig;
160
+ /** @deprecated Renamed to {@link agentTemplate}. */
161
+ declare const template: typeof agentTemplate;
162
+ type ModuleTier = "first-party" | "open" | "custom";
163
+ interface ModuleDefinition<TConfig = Record<string, unknown>> {
164
+ readonly kind: "module";
165
+ name: string;
166
+ tier?: ModuleTier;
167
+ /** Capabilities (tool names) the module contributes to an agent profile. */
168
+ capabilities?: string[];
169
+ config?: TConfig;
170
+ /** Optional provider behind the module (kept swappable). */
171
+ provider?: string;
172
+ }
173
+ declare function defineModule<TConfig = Record<string, unknown>>(opts: Omit<ModuleDefinition<TConfig>, "kind">): ModuleDefinition<TConfig>;
174
+ /**
175
+ * A multi-agent system: a parent/manager agent profile (which holds the shared
176
+ * budget) plus sub-agent agent profiles, each in its own isolated runtime. Spend
177
+ * aggregates against the parent cap at the gateway; revoking the parent kills the
178
+ * whole system. Instantiated at run-time with
179
+ * `runtime(pool).startSystem({ root, members, topology })`.
180
+ */
181
+ interface SystemConfig {
182
+ readonly kind: "system";
183
+ /** Agent template name for the parent/manager agent profile. */
184
+ root: string;
185
+ /** Agent template names for the sub-agent agent profiles (scoped-down derivations). */
186
+ members: string[];
187
+ /** Human-readable coordination topology, e.g. "manager → [researcher, writer]". */
188
+ topology?: string;
189
+ /** Shared budget across the whole system, aggregated at the gateway. */
190
+ budget?: BudgetPolicy;
191
+ }
192
+ declare function system(opts: Omit<SystemConfig, "kind">): SystemConfig;
193
+ interface NaiveConfig {
194
+ project: string;
195
+ /** Path A — shared, deploy-time infrastructure (optional; wraps Pulumi → AWS). */
196
+ infrastructure?: Record<string, CloudResource>;
197
+ /** Agent runtime pools — microVMs (optional; omit for BYO-runtime). */
198
+ runtime?: Record<string, RuntimePoolConfig>;
199
+ /**
200
+ * Per-tenant agent profiles — keyed by name, each an `agentTemplate(...)`
201
+ * (the regulated bundle + policy). Instantiated per tenant via
202
+ * `forUser(id).provision(name)`.
203
+ */
204
+ agentProfiles?: Record<string, AgentTemplateConfig>;
205
+ /** @deprecated Renamed to {@link NaiveConfig.agentProfiles}. */
206
+ templates?: Record<string, AgentTemplateConfig>;
207
+ /** Multi-agent systems composed from agent templates (parent + sub-agents). */
208
+ systems?: Record<string, SystemConfig>;
209
+ /** Custom/open modules to register. */
210
+ modules?: Record<string, ModuleDefinition>;
211
+ }
212
+ /**
213
+ * Declares a Naïve project. Returns the config unchanged (typed + branded), to
214
+ * be the default export of `naive.config.ts` and consumed by `naive up`.
215
+ */
216
+ declare function defineConfig(config: NaiveConfig): NaiveConfig;
217
+
218
+ export { type AgentTemplateConfig, type ApprovalChannel, type ApprovalCondition, type ApprovalRule, type Budget, type BudgetPolicy, type Capability, type CardKind, type CloudBucketConfig, type CloudPostgresConfig, type CloudResource, type CloudWebConfig, type CloudWebFramework, type CommsSpec, type ComparisonOp, type EmailSpec, type FormationKind, type IdentityKind, type IdentitySpec, type ModuleDefinition, type ModuleTier, type NaiveConfig, type NetworkPolicy, type Period, type PhoneSpec, type PolicyConfig, type PostgresSize, type RuntimeAutoscale, type RuntimeIsolation, type RuntimePoolConfig, type SpendCap, type SystemConfig, type TemplateConfig, type VerificationKind, type WalletSpec, agentTemplate, cloud, defineConfig as default, defineConfig, defineModule, policy, runtime, system, template };
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
1
+ // src/index.ts
2
+ var cloud = {
3
+ web(opts) {
4
+ return { kind: "cloud.web", ...opts };
5
+ },
6
+ postgres(opts) {
7
+ return { kind: "cloud.postgres", ...opts };
8
+ },
9
+ bucket(opts) {
10
+ return { kind: "cloud.bucket", ...opts };
11
+ }
12
+ };
13
+ var runtime = {
14
+ pool(opts) {
15
+ return { kind: "runtime.pool", ...opts };
16
+ }
17
+ };
18
+ function policy(opts) {
19
+ return { kind: "policy", ...opts };
20
+ }
21
+ function agentTemplate(opts) {
22
+ return { kind: "agent_template", ...opts };
23
+ }
24
+ var template = agentTemplate;
25
+ function defineModule(opts) {
26
+ return { kind: "module", tier: "custom", ...opts };
27
+ }
28
+ function system(opts) {
29
+ return { kind: "system", ...opts };
30
+ }
31
+ function defineConfig(config) {
32
+ return config;
33
+ }
34
+ var index_default = defineConfig;
35
+ export {
36
+ agentTemplate,
37
+ cloud,
38
+ index_default as default,
39
+ defineConfig,
40
+ defineModule,
41
+ policy,
42
+ runtime,
43
+ system,
44
+ template
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @usenaive-sdk/iac — Infrastructure-as-Code for governed agent profiles.\n *\n * Build-time, declarative, and side-effect free. You author a `naive.config.ts`\n * with these builders; the CLI's `naive up` reads the exported config and\n * registers shared infrastructure (Path A), the runtime pool, and the\n * per-tenant agent profile templates (the regulated bundle).\n *\n * Nothing here makes API calls — it only produces typed config objects. Issuing\n * cards, forming entities, and registering comms happens at run-time via\n * `@usenaive-sdk/server` (`forUser(id).provision(template)`).\n */\n\n/* ───────────────────────────── cloud (Path A) ───────────────────────────── */\n\nexport type CloudWebFramework = \"nextjs\" | \"remix\" | \"astro\" | \"static\" | \"node\";\nexport type PostgresSize = \"serverless\" | \"small\" | \"medium\" | \"large\";\n\nexport interface CloudWebConfig {\n readonly kind: \"cloud.web\";\n framework: CloudWebFramework;\n dir: string;\n env?: Record<string, string>;\n}\n\nexport interface CloudPostgresConfig {\n readonly kind: \"cloud.postgres\";\n name: string;\n size: PostgresSize;\n}\n\nexport interface CloudBucketConfig {\n readonly kind: \"cloud.bucket\";\n name: string;\n public?: boolean;\n}\n\nexport type CloudResource = CloudWebConfig | CloudPostgresConfig | CloudBucketConfig;\n\nexport const cloud = {\n web(opts: Omit<CloudWebConfig, \"kind\">): CloudWebConfig {\n return { kind: \"cloud.web\", ...opts };\n },\n postgres(opts: Omit<CloudPostgresConfig, \"kind\">): CloudPostgresConfig {\n return { kind: \"cloud.postgres\", ...opts };\n },\n bucket(opts: Omit<CloudBucketConfig, \"kind\">): CloudBucketConfig {\n return { kind: \"cloud.bucket\", ...opts };\n },\n};\n\n/* ───────────────────────────── runtime (Path B) ──────────────────────────── */\n\nexport type RuntimeIsolation = \"microvm\" | \"container\";\n\nexport interface RuntimeAutoscale {\n min: number;\n max: number;\n}\n\nexport interface RuntimePoolConfig {\n readonly kind: \"runtime.pool\";\n source: string;\n isolation: RuntimeIsolation;\n autoscale?: RuntimeAutoscale;\n}\n\nexport const runtime = {\n pool(opts: Omit<RuntimePoolConfig, \"kind\">): RuntimePoolConfig {\n return { kind: \"runtime.pool\", ...opts };\n },\n};\n\n/* ────────────────────────────── policy ───────────────────────────────────── */\n\nexport type Period = \"day\" | \"week\" | \"month\" | \"year\";\n\n/** A spend cap. Structured, or the shorthand string form `\"$1500/mo\"` / `\"$50/day\"`. */\nexport interface SpendCap {\n amount: number;\n /** ISO 4217, defaults to \"USD\". */\n currency?: string;\n period?: Period;\n}\nexport type Budget = SpendCap | string;\n\nexport interface BudgetPolicy {\n cap: Budget;\n /** Fraction 0..1 at which to alert, e.g. 0.8. */\n alertAt?: number;\n /** When true, exceeding the cap is a hard deny; otherwise it routes to approval. */\n hard?: boolean;\n}\n\nexport type ComparisonOp = \">\" | \">=\" | \"<\" | \"<=\" | \"==\";\n\n/** A structured approval trigger, e.g. `{ on: \"cards.charge\", field: \"amount\", op: \">\", value: 100 }`. */\nexport interface ApprovalCondition {\n /** The capability/action this rule applies to, e.g. \"cards.charge\". */\n on: Capability;\n /** Optional numeric guard on a field of the action, e.g. `amount > 100`. */\n field?: string;\n op?: ComparisonOp;\n value?: number;\n}\n\nexport type ApprovalChannel = \"slack\" | \"email\" | \"webhook\";\n\nexport interface ApprovalRule {\n /** Structured condition, or the shorthand string `\"cards.charge.amount > $100\"`. */\n when: ApprovalCondition | string;\n via: ApprovalChannel | string;\n}\n\nexport interface NetworkPolicy {\n allow?: string[];\n deny?: string[];\n}\n\n/** A capability/action name, e.g. \"cards.charge\", \"email.send\", \"search\". */\nexport type Capability = string;\n\nexport interface PolicyConfig {\n readonly kind: \"policy\";\n /** Spend cap + alert threshold, aggregated at the governance gateway. */\n budget?: BudgetPolicy;\n /** Human-in-the-loop rules — matched actions are parked for approval. */\n approvals?: ApprovalRule[];\n /** Allowlist of capabilities. When set, the agent profile's AccountKit enables ONLY these primitives. */\n allow?: Capability[];\n /** Denylist of capabilities — wins over `allow`. */\n deny?: Capability[];\n /**\n * Primitives to opt OUT of the built-in approval default. Pair with an\n * `approvals` threshold to get \"auto-approve below the line, gate above it\"\n * (approvals are escalate-only).\n */\n autoApprove?: Capability[];\n /** Egress allow/deny applied to the runtime sandbox (hostnames/globs). */\n network?: NetworkPolicy;\n}\n\nexport function policy(opts: Omit<PolicyConfig, \"kind\">): PolicyConfig {\n return { kind: \"policy\", ...opts };\n}\n\n/* ────────────────────────────── template ─────────────────────────────────── */\n\nexport type IdentityKind = \"business\" | \"individual\";\nexport type VerificationKind = \"kyb\" | \"kyc\" | \"none\";\nexport type FormationKind = \"ein\" | \"llc\" | \"none\";\n\nexport interface IdentitySpec {\n kind: IdentityKind;\n /** KYB/KYC verification to run before the agent profile goes active. */\n verify?: VerificationKind;\n /** Legal entity formation, e.g. EIN/LLC. */\n form?: FormationKind;\n legalName?: string;\n}\n\nexport type CardKind = \"virtual\" | \"physical\";\n\nexport interface WalletSpec {\n card?: CardKind;\n /** e.g. \"$50/day\" */\n limit?: string;\n}\n\nexport interface EmailSpec {\n /** \"per-tenant\" for an isolated sending domain, or a concrete domain/address. */\n domain?: string;\n address?: string;\n forwardTo?: string;\n warmup?: boolean;\n}\n\nexport interface PhoneSpec {\n sms?: boolean;\n voice?: boolean;\n}\n\nexport interface CommsSpec {\n email?: EmailSpec;\n phone?: PhoneSpec;\n}\n\nexport interface AgentTemplateConfig {\n readonly kind: \"agent_template\";\n identity?: IdentitySpec;\n wallet?: WalletSpec;\n comms?: CommsSpec;\n /** Name of a declared runtime pool, or omit for BYO-runtime. */\n runtime?: string;\n tools?: string[];\n policy?: PolicyConfig;\n}\n\n/**\n * Declares an **agent template** — the blueprint for a governed agent profile\n * (identity, wallet, comms, policy). Instantiated per tenant at run-time with\n * `forUser(id).provision(name)`. List your templates under `agentProfiles` in\n * `defineConfig`.\n */\nexport function agentTemplate(opts: Omit<AgentTemplateConfig, \"kind\">): AgentTemplateConfig {\n return { kind: \"agent_template\", ...opts };\n}\n\n/** @deprecated Renamed to {@link AgentTemplateConfig}. */\nexport type TemplateConfig = AgentTemplateConfig;\n/** @deprecated Renamed to {@link agentTemplate}. */\nexport const template = agentTemplate;\n\n/* ────────────────────────────── modules ──────────────────────────────────── */\n\nexport type ModuleTier = \"first-party\" | \"open\" | \"custom\";\n\nexport interface ModuleDefinition<TConfig = Record<string, unknown>> {\n readonly kind: \"module\";\n name: string;\n tier?: ModuleTier;\n /** Capabilities (tool names) the module contributes to an agent profile. */\n capabilities?: string[];\n config?: TConfig;\n /** Optional provider behind the module (kept swappable). */\n provider?: string;\n}\n\nexport function defineModule<TConfig = Record<string, unknown>>(\n opts: Omit<ModuleDefinition<TConfig>, \"kind\">,\n): ModuleDefinition<TConfig> {\n return { kind: \"module\", tier: \"custom\", ...opts };\n}\n\n/* ──────────────────────── multi-agent systems ────────────────────────────── */\n\n/**\n * A multi-agent system: a parent/manager agent profile (which holds the shared\n * budget) plus sub-agent agent profiles, each in its own isolated runtime. Spend\n * aggregates against the parent cap at the gateway; revoking the parent kills the\n * whole system. Instantiated at run-time with\n * `runtime(pool).startSystem({ root, members, topology })`.\n */\nexport interface SystemConfig {\n readonly kind: \"system\";\n /** Agent template name for the parent/manager agent profile. */\n root: string;\n /** Agent template names for the sub-agent agent profiles (scoped-down derivations). */\n members: string[];\n /** Human-readable coordination topology, e.g. \"manager → [researcher, writer]\". */\n topology?: string;\n /** Shared budget across the whole system, aggregated at the gateway. */\n budget?: BudgetPolicy;\n}\n\nexport function system(opts: Omit<SystemConfig, \"kind\">): SystemConfig {\n return { kind: \"system\", ...opts };\n}\n\n/* ────────────────────────────── defineConfig ─────────────────────────────── */\n\nexport interface NaiveConfig {\n project: string;\n /** Path A — shared, deploy-time infrastructure (optional; wraps Pulumi → AWS). */\n infrastructure?: Record<string, CloudResource>;\n /** Agent runtime pools — microVMs (optional; omit for BYO-runtime). */\n runtime?: Record<string, RuntimePoolConfig>;\n /**\n * Per-tenant agent profiles — keyed by name, each an `agentTemplate(...)`\n * (the regulated bundle + policy). Instantiated per tenant via\n * `forUser(id).provision(name)`.\n */\n agentProfiles?: Record<string, AgentTemplateConfig>;\n /** @deprecated Renamed to {@link NaiveConfig.agentProfiles}. */\n templates?: Record<string, AgentTemplateConfig>;\n /** Multi-agent systems composed from agent templates (parent + sub-agents). */\n systems?: Record<string, SystemConfig>;\n /** Custom/open modules to register. */\n modules?: Record<string, ModuleDefinition>;\n}\n\n/**\n * Declares a Naïve project. Returns the config unchanged (typed + branded), to\n * be the default export of `naive.config.ts` and consumed by `naive up`.\n */\nexport function defineConfig(config: NaiveConfig): NaiveConfig {\n return config;\n}\n\nexport default defineConfig;\n"],"mappings":";AAuCO,IAAM,QAAQ;AAAA,EACnB,IAAI,MAAoD;AACtD,WAAO,EAAE,MAAM,aAAa,GAAG,KAAK;AAAA,EACtC;AAAA,EACA,SAAS,MAA8D;AACrE,WAAO,EAAE,MAAM,kBAAkB,GAAG,KAAK;AAAA,EAC3C;AAAA,EACA,OAAO,MAA0D;AAC/D,WAAO,EAAE,MAAM,gBAAgB,GAAG,KAAK;AAAA,EACzC;AACF;AAkBO,IAAM,UAAU;AAAA,EACrB,KAAK,MAA0D;AAC7D,WAAO,EAAE,MAAM,gBAAgB,GAAG,KAAK;AAAA,EACzC;AACF;AAuEO,SAAS,OAAO,MAAgD;AACrE,SAAO,EAAE,MAAM,UAAU,GAAG,KAAK;AACnC;AA4DO,SAAS,cAAc,MAA8D;AAC1F,SAAO,EAAE,MAAM,kBAAkB,GAAG,KAAK;AAC3C;AAKO,IAAM,WAAW;AAiBjB,SAAS,aACd,MAC2B;AAC3B,SAAO,EAAE,MAAM,UAAU,MAAM,UAAU,GAAG,KAAK;AACnD;AAuBO,SAAS,OAAO,MAAgD;AACrE,SAAO,EAAE,MAAM,UAAU,GAAG,KAAK;AACnC;AA4BO,SAAS,aAAa,QAAkC;AAC7D,SAAO;AACT;AAEA,IAAO,gBAAQ;","names":[]}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@usenaive-sdk/iac",
3
+ "version": "0.1.0",
4
+ "description": "Naïve Infrastructure-as-Code — declarative build-time config for governed agent profiles (defineConfig, cloud, runtime, agentTemplate, policy, defineModule).",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^22.15.3",
25
+ "tsup": "^8.0.0",
26
+ "typescript": "^5.7.3"
27
+ },
28
+ "scripts": {
29
+ "build": "tsup",
30
+ "typecheck": "tsc --noEmit"
31
+ }
32
+ }