@odingard/guardian-sdk 0.0.0-stage → 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.
@@ -0,0 +1,61 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * WO-013 — files surface. Representative read/write/share/delete through the
4
+ * file adapter on a deterministic local file store (lowest-burden provider).
5
+ */
6
+ export declare const FILE_PATH_MAX_LENGTH = 512;
7
+ export declare const FILE_CONTENT_MAX_LENGTH = 64000;
8
+ export declare const FILE_GRANTEE_MAX_LENGTH = 256;
9
+ export declare const FILE_ALLOWLIST_MAX_ENTRIES = 64;
10
+ /**
11
+ * Canonical file path: `/` + non-empty segments of `[A-Za-z0-9._~-]`.
12
+ * No `.` or `..` segments, no `//`, no trailing slash, no root `/`.
13
+ * Canonical form is required so path/share allowlist prefix checks cannot
14
+ * be escaped by traversal or duplicate separators.
15
+ */
16
+ export declare function isCanonicalFilePath(value: string): boolean;
17
+ export declare const FilePathSchema: z.ZodString;
18
+ /** Grantee / counterparty token: an opaque principal label (email or id). */
19
+ export declare const CounterpartyTokenSchema: z.ZodString;
20
+ export declare const FILE_READ_SCHEMA = "odingard.guardian.file.read.v1";
21
+ export declare const FILE_WRITE_SCHEMA = "odingard.guardian.file.write.v1";
22
+ export declare const FILE_SHARE_SCHEMA = "odingard.guardian.file.share.v1";
23
+ export declare const FILE_DELETE_SCHEMA = "odingard.guardian.file.delete.v1";
24
+ export declare const FileReadParametersV1Schema: z.ZodObject<{
25
+ schema: z.ZodLiteral<"odingard.guardian.file.read.v1">;
26
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
27
+ path: z.ZodString;
28
+ }, z.core.$strict>;
29
+ export type FileReadParametersV1 = z.infer<typeof FileReadParametersV1Schema>;
30
+ export declare const FileWriteParametersV1Schema: z.ZodObject<{
31
+ schema: z.ZodLiteral<"odingard.guardian.file.write.v1">;
32
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
33
+ path: z.ZodString;
34
+ content: z.ZodString;
35
+ }, z.core.$strict>;
36
+ export type FileWriteParametersV1 = z.infer<typeof FileWriteParametersV1Schema>;
37
+ export declare const FileShareParametersV1Schema: z.ZodObject<{
38
+ schema: z.ZodLiteral<"odingard.guardian.file.share.v1">;
39
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
40
+ path: z.ZodString;
41
+ grantee: z.ZodString;
42
+ expiresAtEpochMs: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strict>;
44
+ export type FileShareParametersV1 = z.infer<typeof FileShareParametersV1Schema>;
45
+ export declare const FileDeleteParametersV1Schema: z.ZodObject<{
46
+ schema: z.ZodLiteral<"odingard.guardian.file.delete.v1">;
47
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
48
+ path: z.ZodString;
49
+ }, z.core.$strict>;
50
+ export type FileDeleteParametersV1 = z.infer<typeof FileDeleteParametersV1Schema>;
51
+ /**
52
+ * Fail-closed prefix match over canonical paths: `path` must equal an
53
+ * allowlist entry or sit under an entry that ends with `/`. A trailing-slash
54
+ * prefix cannot be escaped because `..` and `//` are excluded by canonical
55
+ * form.
56
+ */
57
+ export declare function filePathWithinAllowlist(path: string, allowlist: readonly string[]): boolean;
58
+ export declare function fileReadVerificationProjection(input: FileReadParametersV1): unknown;
59
+ export declare function fileWriteVerificationProjection(input: FileWriteParametersV1): unknown;
60
+ export declare function fileShareVerificationProjection(input: FileShareParametersV1): unknown;
61
+ export declare function fileDeleteVerificationProjection(input: FileDeleteParametersV1): unknown;
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ export declare const TenantIdSchema: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
3
+ export declare const PrincipalIdSchema: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
4
+ export declare const AgentIdSchema: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
5
+ export declare const GrantIdSchema: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
6
+ export declare const PolicyIdSchema: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
7
+ export declare const RequestIdSchema: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
8
+ export declare const ApprovalIdSchema: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
9
+ export declare const CapabilityIdSchema: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
10
+ export declare const CorrelationIdSchema: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
11
+ export declare const EvidenceIdSchema: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
12
+ export declare const AdapterIdSchema: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
13
+ export declare const ConnectionIdSchema: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
14
+ export declare const AttemptIdSchema: z.core.$ZodBranded<z.ZodString, "AttemptId", "out">;
15
+ export declare const BudgetIdSchema: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
16
+ export declare const TaskIdSchema: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
17
+ export declare const NonceSchema: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
18
+ export type TenantId = z.infer<typeof TenantIdSchema>;
19
+ export type PrincipalId = z.infer<typeof PrincipalIdSchema>;
20
+ export type AgentId = z.infer<typeof AgentIdSchema>;
21
+ export type GrantId = z.infer<typeof GrantIdSchema>;
22
+ export type PolicyId = z.infer<typeof PolicyIdSchema>;
23
+ export type RequestId = z.infer<typeof RequestIdSchema>;
24
+ export type ApprovalId = z.infer<typeof ApprovalIdSchema>;
25
+ export type CapabilityId = z.infer<typeof CapabilityIdSchema>;
26
+ export type CorrelationId = z.infer<typeof CorrelationIdSchema>;
27
+ export type EvidenceId = z.infer<typeof EvidenceIdSchema>;
28
+ export type AdapterId = z.infer<typeof AdapterIdSchema>;
29
+ export type ConnectionId = z.infer<typeof ConnectionIdSchema>;
30
+ export type AttemptId = z.infer<typeof AttemptIdSchema>;
31
+ export type BudgetId = z.infer<typeof BudgetIdSchema>;
32
+ export type TaskId = z.infer<typeof TaskIdSchema>;
33
+ export type Nonce = z.infer<typeof NonceSchema>;
@@ -0,0 +1,19 @@
1
+ export * from "./action.js";
2
+ export * from "./action-registry.js";
3
+ export * from "./api.js";
4
+ export * from "./action-parameters.js";
5
+ export * from "./approval.js";
6
+ export * from "./authority.js";
7
+ export * from "./authority-state.js";
8
+ export * from "./calendar.js";
9
+ export * from "./canonical-json.js";
10
+ export * from "./capability.js";
11
+ export * from "./commerce.js";
12
+ export * from "./digest.js";
13
+ export * from "./identifiers.js";
14
+ export * from "./evidence.js";
15
+ export * from "./tools.js";
16
+ export * from "./email.js";
17
+ export * from "./execution.js";
18
+ export * from "./files.js";
19
+ export * from "./protected-data.js";
@@ -0,0 +1,93 @@
1
+ import { z } from "zod";
2
+ import { filePathWithinAllowlist } from "./files.js";
3
+ /**
4
+ * WO-013 — protected data broker. The adapter injects protected values at
5
+ * execution time; the agent never receives reusable plaintext. The catalog
6
+ * below is declarative (which fields are protected, per connection /
7
+ * principal) — it is not a DLP or classification engine.
8
+ */
9
+ export declare const PROTECTED_FIELD_REF_MAX_LENGTH = 64;
10
+ export declare const PROTECTED_VALUE_MAX_LENGTH = 4096;
11
+ export declare const PROTECTED_CATALOG_MAX_ENTRIES = 128;
12
+ export declare const PROTECTED_USE_SINKS_MAX_ENTRIES = 16;
13
+ export declare const PROTECTED_DISCLOSE_TARGETS_MAX_ENTRIES = 32;
14
+ export declare const ProtectedFieldRefSchema: z.ZodString;
15
+ export declare const ProtectedUseSinkSchema: z.ZodObject<{
16
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
17
+ pathPrefix: z.ZodString;
18
+ }, z.core.$strict>;
19
+ export type ProtectedUseSink = z.infer<typeof ProtectedUseSinkSchema>;
20
+ /** A declared protected field on one connection (per principal). */
21
+ export declare const ProtectedCatalogEntrySchema: z.ZodObject<{
22
+ fieldRef: z.ZodString;
23
+ label: z.ZodString;
24
+ maskedPreview: z.ZodString;
25
+ allowUse: z.ZodBoolean;
26
+ allowView: z.ZodBoolean;
27
+ allowPersist: z.ZodBoolean;
28
+ useSinks: z.ZodArray<z.ZodObject<{
29
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
30
+ pathPrefix: z.ZodString;
31
+ }, z.core.$strict>>;
32
+ discloseTargets: z.ZodArray<z.ZodString>;
33
+ }, z.core.$strict>;
34
+ export type ProtectedCatalogEntry = z.infer<typeof ProtectedCatalogEntrySchema>;
35
+ export declare const ProtectedCatalogSchema: z.ZodArray<z.ZodObject<{
36
+ fieldRef: z.ZodString;
37
+ label: z.ZodString;
38
+ maskedPreview: z.ZodString;
39
+ allowUse: z.ZodBoolean;
40
+ allowView: z.ZodBoolean;
41
+ allowPersist: z.ZodBoolean;
42
+ useSinks: z.ZodArray<z.ZodObject<{
43
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
44
+ pathPrefix: z.ZodString;
45
+ }, z.core.$strict>>;
46
+ discloseTargets: z.ZodArray<z.ZodString>;
47
+ }, z.core.$strict>>;
48
+ export type ProtectedCatalog = readonly ProtectedCatalogEntry[];
49
+ export declare const PROTECTED_USE_SCHEMA = "odingard.guardian.protected-data.use.v1";
50
+ export declare const PROTECTED_VIEW_SCHEMA = "odingard.guardian.protected-data.view.v1";
51
+ export declare const PROTECTED_DISCLOSE_SCHEMA = "odingard.guardian.protected-data.disclose.v1";
52
+ export declare const PROTECTED_PERSIST_SCHEMA = "odingard.guardian.protected-data.persist.v1";
53
+ export declare const ProtectedUseParametersV1Schema: z.ZodObject<{
54
+ schema: z.ZodLiteral<"odingard.guardian.protected-data.use.v1">;
55
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
56
+ fieldRef: z.ZodString;
57
+ sink: z.ZodObject<{
58
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
59
+ path: z.ZodString;
60
+ }, z.core.$strict>;
61
+ }, z.core.$strict>;
62
+ export type ProtectedUseParametersV1 = z.infer<typeof ProtectedUseParametersV1Schema>;
63
+ export declare const ProtectedViewParametersV1Schema: z.ZodObject<{
64
+ schema: z.ZodLiteral<"odingard.guardian.protected-data.view.v1">;
65
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
66
+ fieldRef: z.ZodString;
67
+ }, z.core.$strict>;
68
+ export type ProtectedViewParametersV1 = z.infer<typeof ProtectedViewParametersV1Schema>;
69
+ export declare const ProtectedDiscloseParametersV1Schema: z.ZodObject<{
70
+ schema: z.ZodLiteral<"odingard.guardian.protected-data.disclose.v1">;
71
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
72
+ fieldRef: z.ZodString;
73
+ counterparty: z.ZodString;
74
+ }, z.core.$strict>;
75
+ export type ProtectedDiscloseParametersV1 = z.infer<typeof ProtectedDiscloseParametersV1Schema>;
76
+ export declare const ProtectedPersistParametersV1Schema: z.ZodObject<{
77
+ schema: z.ZodLiteral<"odingard.guardian.protected-data.persist.v1">;
78
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
79
+ fieldRef: z.ZodString;
80
+ value: z.ZodString;
81
+ }, z.core.$strict>;
82
+ export type ProtectedPersistParametersV1 = z.infer<typeof ProtectedPersistParametersV1Schema>;
83
+ export declare function protectedCatalogField(catalog: readonly ProtectedCatalogEntry[] | undefined, fieldRef: string): ProtectedCatalogEntry | null;
84
+ /** use sink is authorized only by an exact declared sink binding. */
85
+ export declare function protectedSinkWithinUseSinks(sink: {
86
+ connectionId: string;
87
+ path: string;
88
+ }, useSinks: readonly ProtectedUseSink[]): boolean;
89
+ export declare function protectedUseVerificationProjection(input: ProtectedUseParametersV1): unknown;
90
+ export declare function protectedViewVerificationProjection(input: ProtectedViewParametersV1): unknown;
91
+ export declare function protectedDiscloseVerificationProjection(input: ProtectedDiscloseParametersV1): unknown;
92
+ export declare function protectedPersistVerificationProjection(input: ProtectedPersistParametersV1): unknown;
93
+ export { filePathWithinAllowlist };
@@ -0,0 +1,187 @@
1
+ import { z } from "zod";
2
+ import { type ApiRequestParametersV1 } from "./api.js";
3
+ /**
4
+ * WO-015 — tool / MCP authority surface.
5
+ *
6
+ * A "tool" is a named, human-installed entry in a tool server's catalog. Each
7
+ * entry renders to a bounded https call inside the owning connection's
8
+ * endpoint allowlist — the same transport surface as api.request (WO-009),
9
+ * with tool semantics layered on top by the action registry.
10
+ *
11
+ * `mcp.install` and `mcp.enable` are capability-expansion actions: they are
12
+ * registered so proposals resolve through the same deterministic decision
13
+ * path, but `requiresExplicitGrant` keeps them out of auto-derived grants.
14
+ * An agent can only ever receive them when a human selects them explicitly —
15
+ * self-serve escalation deterministically denies (WO-015 acceptance).
16
+ */
17
+ export declare const TOOL_NAME_MAX_LENGTH = 64;
18
+ export declare const TOOL_ARGUMENTS_MAX_BYTES = 16384;
19
+ export declare const TOOL_CATALOG_MAX_TOOLS = 64;
20
+ export declare const TOOL_SERVER_NAME_MAX_LENGTH = 128;
21
+ export declare const TOOL_SERVER_VERSION_MAX_LENGTH = 64;
22
+ export declare const TOOL_DESCRIPTION_MAX_LENGTH = 512;
23
+ export declare const ToolNameSchema: z.ZodString;
24
+ export type ToolName = z.infer<typeof ToolNameSchema>;
25
+ /** A catalog entry: a named tool that renders to one allowlisted https call. */
26
+ export declare const ToolDescriptorSchema: z.ZodObject<{
27
+ name: z.ZodString;
28
+ description: z.ZodOptional<z.ZodString>;
29
+ method: z.ZodEnum<{
30
+ GET: "GET";
31
+ HEAD: "HEAD";
32
+ POST: "POST";
33
+ PUT: "PUT";
34
+ PATCH: "PATCH";
35
+ DELETE: "DELETE";
36
+ }>;
37
+ url: z.ZodString;
38
+ }, z.core.$strict>;
39
+ export type ToolDescriptor = z.infer<typeof ToolDescriptorSchema>;
40
+ /** The tool-server catalog stored on a provider "tool" connection record. */
41
+ export declare const ToolServerCatalogSchema: z.ZodObject<{
42
+ serverName: z.ZodString;
43
+ serverVersion: z.ZodString;
44
+ tools: z.ZodArray<z.ZodObject<{
45
+ name: z.ZodString;
46
+ description: z.ZodOptional<z.ZodString>;
47
+ method: z.ZodEnum<{
48
+ GET: "GET";
49
+ HEAD: "HEAD";
50
+ POST: "POST";
51
+ PUT: "PUT";
52
+ PATCH: "PATCH";
53
+ DELETE: "DELETE";
54
+ }>;
55
+ url: z.ZodString;
56
+ }, z.core.$strict>>;
57
+ }, z.core.$strict>;
58
+ export type ToolServerCatalog = z.infer<typeof ToolServerCatalogSchema>;
59
+ /** Bounded canonical JSON object (cycles, prototypes and depth are rejected). */
60
+ export declare const ToolArgumentsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
61
+ export type ToolArguments = z.infer<typeof ToolArgumentsSchema>;
62
+ export declare const ToolInvokeParametersV1Schema: z.ZodObject<{
63
+ schema: z.ZodLiteral<"odingard.guardian.tool.invoke.v1">;
64
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
65
+ toolName: z.ZodString;
66
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
67
+ }, z.core.$strict>;
68
+ export type ToolInvokeParametersV1 = z.infer<typeof ToolInvokeParametersV1Schema>;
69
+ /**
70
+ * mcp.install registers an additional catalog entry on an existing, human-
71
+ * installed tool-server connection. It can never create a new connection or
72
+ * widen the endpoint allowlist — both stay human-only.
73
+ */
74
+ export declare const McpInstallParametersV1Schema: z.ZodObject<{
75
+ schema: z.ZodLiteral<"odingard.guardian.mcp.install.v1">;
76
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
77
+ tool: z.ZodObject<{
78
+ name: z.ZodString;
79
+ description: z.ZodOptional<z.ZodString>;
80
+ method: z.ZodEnum<{
81
+ GET: "GET";
82
+ HEAD: "HEAD";
83
+ POST: "POST";
84
+ PUT: "PUT";
85
+ PATCH: "PATCH";
86
+ DELETE: "DELETE";
87
+ }>;
88
+ url: z.ZodString;
89
+ }, z.core.$strict>;
90
+ }, z.core.$strict>;
91
+ export type McpInstallParametersV1 = z.infer<typeof McpInstallParametersV1Schema>;
92
+ /** mcp.enable enables a catalog tool for the requesting agent. */
93
+ export declare const McpEnableParametersV1Schema: z.ZodObject<{
94
+ schema: z.ZodLiteral<"odingard.guardian.mcp.enable.v1">;
95
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
96
+ toolName: z.ZodString;
97
+ }, z.core.$strict>;
98
+ export type McpEnableParametersV1 = z.infer<typeof McpEnableParametersV1Schema>;
99
+ /**
100
+ * Renders an invocation to the canonical api.request envelope the adapter
101
+ * executes: the catalog method/url plus the arguments as a JSON body. Shared
102
+ * by the binding check and the execution adapter so both see one rendering.
103
+ */
104
+ export declare function renderToolInvocation(tool: ToolDescriptor, args: ToolArguments): Omit<ApiRequestParametersV1, "schema" | "connectionId">;
105
+ export declare function toolVerificationProjection(input: ToolInvokeParametersV1): Readonly<{
106
+ domain: "odingard.guardian.tool-invoke-projection.v1";
107
+ connectionId: string & z.core.$brand<"ConnectionId">;
108
+ toolName: string;
109
+ argumentsDigest: string;
110
+ }>;
111
+ /** Same single verification level as api.request (post-commit-content). */
112
+ export declare function toolEnvelopeProjection(input: ToolInvokeParametersV1): Readonly<{
113
+ domain: "odingard.guardian.tool-invoke-projection.v1";
114
+ connectionId: string & z.core.$brand<"ConnectionId">;
115
+ toolName: string;
116
+ argumentsDigest: string;
117
+ }>;
118
+ export declare function mcpInstallProjection(input: McpInstallParametersV1): Readonly<{
119
+ domain: "odingard.guardian.mcp-projection.v1";
120
+ operation: "install";
121
+ connectionId: string & z.core.$brand<"ConnectionId">;
122
+ toolName: string;
123
+ descriptorDigest: string;
124
+ }>;
125
+ export declare function mcpEnableProjection(input: McpEnableParametersV1): Readonly<{
126
+ domain: "odingard.guardian.mcp-projection.v1";
127
+ operation: "enable";
128
+ connectionId: string & z.core.$brand<"ConnectionId">;
129
+ toolName: string;
130
+ descriptorDigest: null;
131
+ }>;
132
+ export declare function findCatalogTool(connection: {
133
+ toolServer?: {
134
+ tools: readonly {
135
+ name: string;
136
+ }[];
137
+ };
138
+ }, toolName: string): {
139
+ name: string;
140
+ } | undefined;
141
+ /**
142
+ * Binding hooks shared by the three tool/MCP definitions. `connection` is the
143
+ * kernel-verified binding facts (catalog + per-agent enabled names).
144
+ */
145
+ export declare function validateToolInvokeBinding(input: {
146
+ params: ToolInvokeParametersV1;
147
+ connection: {
148
+ toolServer?: {
149
+ tools: readonly ToolDescriptor[];
150
+ };
151
+ enabledToolNames?: readonly string[];
152
+ endpointAllowlist?: readonly string[];
153
+ };
154
+ }): {
155
+ ok: true;
156
+ } | {
157
+ ok: false;
158
+ reasonCode: string;
159
+ };
160
+ export declare function validateMcpInstallBinding(input: {
161
+ params: McpInstallParametersV1;
162
+ connection: {
163
+ toolServer?: {
164
+ tools: readonly ToolDescriptor[];
165
+ };
166
+ endpointAllowlist?: readonly string[];
167
+ };
168
+ }): {
169
+ ok: true;
170
+ } | {
171
+ ok: false;
172
+ reasonCode: string;
173
+ };
174
+ export declare function validateMcpEnableBinding(input: {
175
+ params: McpEnableParametersV1;
176
+ connection: {
177
+ toolServer?: {
178
+ tools: readonly ToolDescriptor[];
179
+ };
180
+ enabledToolNames?: readonly string[];
181
+ };
182
+ }): {
183
+ ok: true;
184
+ } | {
185
+ ok: false;
186
+ reasonCode: string;
187
+ };
@@ -0,0 +1 @@
1
+ export { createGuardianClient, type GuardianClient, type GuardianClientConfig, type GuardianRequestResult, type GuardianToolInvocation, type GuardianMcpInvocation, } from "./client.js";
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+ export declare const AgentActionProposalSchema: z.ZodObject<{
3
+ schemaVersion: z.ZodLiteral<1>;
4
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
5
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
6
+ action: z.core.$ZodBranded<z.ZodString, "ActionType", "out">;
7
+ resource: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
8
+ valueCents: z.ZodOptional<z.ZodNumber>;
9
+ merchantId: z.ZodOptional<z.ZodString>;
10
+ merchantCategory: z.ZodOptional<z.ZodString>;
11
+ recurring: z.ZodOptional<z.ZodBoolean>;
12
+ taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
13
+ uses: z.ZodLiteral<1>;
14
+ materialParameters: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<Record<string, import("./contracts/canonical-json.js").CanonicalJsonValue>>, unknown>>;
15
+ purpose: z.ZodString;
16
+ initiatingContext: z.ZodEnum<{
17
+ agent: "agent";
18
+ user: "user";
19
+ scheduled: "scheduled";
20
+ "external-event": "external-event";
21
+ }>;
22
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
23
+ requestedTtlMs: z.ZodNumber;
24
+ }, z.core.$strict>;
25
+ export type AgentActionProposal = z.infer<typeof AgentActionProposalSchema>;
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@odingard/guardian-sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Guardian agent SDK — request governed capabilities and execute consequential actions under human authority.",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist-dts/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "dist-dts",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "scripts": {
23
+ "build": "esbuild src/index.ts --bundle --platform=node --format=esm --target=node22 --external:zod --outfile=dist/index.js && tsc -p tsconfig.build.json",
24
+ "test": "vitest run",
25
+ "prepublishOnly": "npm run build"
26
+ },
27
+ "dependencies": {
28
+ "zod": "4.6.5"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^22.20.5",
32
+ "esbuild": "0.28.2",
33
+ "typescript": "5.9.3",
34
+ "vitest": "3.2.4"
35
+ },
36
+ "engines": {
37
+ "node": ">=20"
38
+ },
39
+ "keywords": [
40
+ "guardian",
41
+ "ai-agents",
42
+ "authorization",
43
+ "authority",
44
+ "mcp",
45
+ "human-in-the-loop"
46
+ ],
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/Odingard/guardian-sdk.git"
50
+ },
51
+ "homepage": "https://guardian.odingard.com"
52
+ }