@stigmer/sdk 3.11.0 → 3.12.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/__tests__/errors.test.js +1 -44
- package/__tests__/errors.test.js.map +1 -1
- package/errors.d.ts +0 -14
- package/errors.d.ts.map +1 -1
- package/errors.js +0 -26
- package/errors.js.map +1 -1
- package/gen/agent.d.ts +0 -5
- package/gen/agent.d.ts.map +1 -1
- package/gen/agent.js +1 -9
- package/gen/agent.js.map +1 -1
- package/gen/agentinstance.d.ts +0 -1
- package/gen/agentinstance.d.ts.map +1 -1
- package/gen/agentinstance.js +0 -1
- package/gen/agentinstance.js.map +1 -1
- package/gen/authorization-config.d.ts.map +1 -1
- package/gen/authorization-config.js +0 -1
- package/gen/authorization-config.js.map +1 -1
- package/gen/client.d.ts +2 -6
- package/gen/client.d.ts.map +1 -1
- package/gen/client.js +0 -4
- package/gen/client.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/manifest/registry.d.ts.map +1 -1
- package/manifest/registry.js +0 -15
- package/manifest/registry.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/errors.test.ts +0 -57
- package/src/errors.ts +0 -27
- package/src/gen/agent.ts +1 -15
- package/src/gen/agentinstance.ts +0 -2
- package/src/gen/authorization-config.ts +0 -1
- package/src/gen/client.ts +2 -7
- package/src/index.ts +0 -2
- package/src/manifest/registry.ts +0 -15
- package/gen/datastore.d.ts +0 -129
- package/gen/datastore.d.ts.map +0 -1
- package/gen/datastore.js +0 -303
- package/gen/datastore.js.map +0 -1
- package/src/gen/datastore.ts +0 -381
package/manifest/registry.js
CHANGED
|
@@ -26,9 +26,6 @@ import { AgentShareQueryController } from "@stigmer/protos/ai/stigmer/agentic/ag
|
|
|
26
26
|
import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
27
27
|
import { ChannelAppCommandController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/command_pb";
|
|
28
28
|
import { ChannelAppQueryController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/query_pb";
|
|
29
|
-
import { DatastoreSchema } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/api_pb";
|
|
30
|
-
import { DatastoreCommandController } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/command_pb";
|
|
31
|
-
import { DatastoreQueryController } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/query_pb";
|
|
32
29
|
import { EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
|
|
33
30
|
import { EnvironmentCommandController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/command_pb";
|
|
34
31
|
import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
|
|
@@ -60,18 +57,6 @@ const HANDLERS = [
|
|
|
60
57
|
apply: (c, m) => c(McpServerCommandController).apply(m),
|
|
61
58
|
getByReference: (c, ref) => c(McpServerQueryController).getByReference(ref),
|
|
62
59
|
},
|
|
63
|
-
// A Datastore applies before the Agents that reference it via
|
|
64
|
-
// datastore_usages (the McpServer-before-Agent pattern).
|
|
65
|
-
{
|
|
66
|
-
kind: ApiResourceKind.datastore,
|
|
67
|
-
yamlKind: "Datastore",
|
|
68
|
-
displayName: "Datastore",
|
|
69
|
-
apiVersion: AGENTIC_V1,
|
|
70
|
-
schema: DatastoreSchema,
|
|
71
|
-
applyOrder: 2,
|
|
72
|
-
apply: (c, m) => c(DatastoreCommandController).apply(m),
|
|
73
|
-
getByReference: (c, ref) => c(DatastoreQueryController).getByReference(ref),
|
|
74
|
-
},
|
|
75
60
|
{
|
|
76
61
|
kind: ApiResourceKind.agent,
|
|
77
62
|
yamlKind: "Agent",
|
package/manifest/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/manifest/registry.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,UAAU;QACpB,WAAW,EAAE,UAAU;QACvB,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,cAAc;QACtB,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,KAAK,CAAC,CAAa,CAAC;QAClE,cAAc,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC;KAC3E;CACF,CAAC;AAEF,MAAM,YAAY,GAA6C,IAAI,GAAG,CACpE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CACrC,CAAC;AAEF,MAAM,YAAY,GAA6C,IAAI,GAAG,CACpE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAC5C,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,aAAa;IAC3B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,0BAA0B,CACxC,QAAgB;IAEhB,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,0BAA0B,CACxC,QAAgB;IAEhB,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Stigmer TypeScript SDK — typed API client for all Stigmer platform resources",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@bufbuild/protobuf": "^2.0.0",
|
|
47
47
|
"@connectrpc/connect-node": "^2.0.0",
|
|
48
|
-
"@stigmer/protos": "3.
|
|
48
|
+
"@stigmer/protos": "3.12.0"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
isTransientStreamError,
|
|
9
9
|
getUserMessage,
|
|
10
10
|
getErrorReason,
|
|
11
|
-
getRecordConstraint,
|
|
12
11
|
annotateRpcError,
|
|
13
12
|
getRpcMetadata,
|
|
14
13
|
type ErrorCategory,
|
|
@@ -329,62 +328,6 @@ describe("getErrorReason", () => {
|
|
|
329
328
|
});
|
|
330
329
|
});
|
|
331
330
|
|
|
332
|
-
describe("getRecordConstraint", () => {
|
|
333
|
-
const recordViolation = (metadata: Record<string, string>) =>
|
|
334
|
-
new ConnectError("that slot is already booked", Code.AlreadyExists, undefined, [
|
|
335
|
-
{
|
|
336
|
-
desc: ErrorInfoSchema,
|
|
337
|
-
value: {
|
|
338
|
-
domain: "datastore.stigmer.ai",
|
|
339
|
-
reason: "CONSTRAINT_VIOLATION",
|
|
340
|
-
metadata,
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
]);
|
|
344
|
-
|
|
345
|
-
it("extracts the constraint name from a record-RPC violation", () => {
|
|
346
|
-
expect(getRecordConstraint(recordViolation({ constraint: "one_confirmed_per_slot" })))
|
|
347
|
-
.toBe("one_confirmed_per_slot");
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
it("walks the cause chain of an SDK-wrapped StigmerError", () => {
|
|
351
|
-
const connectError = recordViolation({ constraint: "one_confirmed_per_slot" });
|
|
352
|
-
const wrapped = new StigmerError(
|
|
353
|
-
"already-exists",
|
|
354
|
-
connectError.rawMessage,
|
|
355
|
-
Code.AlreadyExists,
|
|
356
|
-
{ cause: connectError },
|
|
357
|
-
);
|
|
358
|
-
expect(getRecordConstraint(wrapped)).toBe("one_confirmed_per_slot");
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
it("returns null when the ErrorInfo domain is not the records domain", () => {
|
|
362
|
-
const foreign = new ConnectError("workspace taken", Code.FailedPrecondition, undefined, [
|
|
363
|
-
{
|
|
364
|
-
desc: ErrorInfoSchema,
|
|
365
|
-
value: {
|
|
366
|
-
domain: "stigmer.ai",
|
|
367
|
-
reason: "SLACK_WORKSPACE_ALREADY_CONNECTED",
|
|
368
|
-
metadata: { constraint: "should_not_leak" },
|
|
369
|
-
},
|
|
370
|
-
},
|
|
371
|
-
]);
|
|
372
|
-
expect(getRecordConstraint(foreign)).toBeNull();
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
it("returns null when the violation carries no constraint metadata", () => {
|
|
376
|
-
expect(getRecordConstraint(recordViolation({}))).toBeNull();
|
|
377
|
-
expect(getRecordConstraint(recordViolation({ constraint: "" }))).toBeNull();
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
it("returns null for errors without ErrorInfo", () => {
|
|
381
|
-
expect(
|
|
382
|
-
getRecordConstraint(new ConnectError("bare", Code.AlreadyExists)),
|
|
383
|
-
).toBeNull();
|
|
384
|
-
expect(getRecordConstraint(new Error("plain"))).toBeNull();
|
|
385
|
-
expect(getRecordConstraint(null)).toBeNull();
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
331
|
|
|
389
332
|
describe("annotateRpcError / getRpcMetadata", () => {
|
|
390
333
|
it("roundtrips metadata on an error object", () => {
|
package/src/errors.ts
CHANGED
|
@@ -303,33 +303,6 @@ export function getErrorReason(error: unknown): ErrorReason | null {
|
|
|
303
303
|
return null;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
/**
|
|
307
|
-
* The `google.rpc.ErrorInfo` domain attached by datastore record-RPC
|
|
308
|
-
* errors in both editions (a cross-edition contract; see the OSS
|
|
309
|
-
* `dserrors` package and its Java mirror).
|
|
310
|
-
*/
|
|
311
|
-
const RECORDS_ERROR_DOMAIN = "datastore.stigmer.ai";
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Extract the violated constraint's declared name from a datastore
|
|
315
|
-
* record-RPC error, or `null` when the error carries none.
|
|
316
|
-
*
|
|
317
|
-
* Record writes rejected by a declared constraint (`ALREADY_EXISTS` for
|
|
318
|
-
* uniques, `FAILED_PRECONDITION` for check/exists/not_exists) attach a
|
|
319
|
-
* `google.rpc.ErrorInfo` with reason `CONSTRAINT_VIOLATION` and the
|
|
320
|
-
* constraint's name in `metadata["constraint"]` — the same companion
|
|
321
|
-
* the MCP bridge's record tools surface to agents. Consumers map the
|
|
322
|
-
* name through the datastore spec to place the (verbatim) message next
|
|
323
|
-
* to the fields the constraint covers; `null` falls back to a
|
|
324
|
-
* form-level rendering of {@link getUserMessage}.
|
|
325
|
-
*/
|
|
326
|
-
export function getRecordConstraint(error: unknown): string | null {
|
|
327
|
-
const reason = getErrorReason(error);
|
|
328
|
-
if (!reason || reason.domain !== RECORDS_ERROR_DOMAIN) return null;
|
|
329
|
-
const constraint = reason.metadata["constraint"];
|
|
330
|
-
return constraint !== undefined && constraint !== "" ? constraint : null;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
306
|
/**
|
|
334
307
|
* Metadata about the RPC call that produced an error. Attached by the
|
|
335
308
|
* SDK's metadata interceptor and readable via {@link getRpcMetadata}.
|
package/src/gen/agent.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { AgentSchema, type Agent } from "@stigmer/protos/ai/stigmer/agentic/agen
|
|
|
9
9
|
import { AgentCommandController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/command_pb";
|
|
10
10
|
import { AgentIdSchema, GetDefaultAgentRequestSchema, type GetDefaultAgentRequest } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/io_pb";
|
|
11
11
|
import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
|
|
12
|
-
import { AgentSpecSchema, ToolApprovalOverrideSchema, McpServerUsageSchema, McpAccessSchema, SubAgentSchema
|
|
12
|
+
import { AgentSpecSchema, ToolApprovalOverrideSchema, McpServerUsageSchema, McpAccessSchema, SubAgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/spec_pb";
|
|
13
13
|
import { EnvVarDeclarationSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/spec_pb";
|
|
14
14
|
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
15
15
|
import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
|
|
@@ -112,7 +112,6 @@ export interface AgentInput {
|
|
|
112
112
|
skillRefs?: ResourceRef[];
|
|
113
113
|
subAgents?: SubAgentInput[];
|
|
114
114
|
env?: Record<string, EnvVarDeclarationInput>;
|
|
115
|
-
datastoreUsages?: DatastoreUsageInput[];
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
/** SDK input type for McpServerUsage. */
|
|
@@ -152,11 +151,6 @@ export interface EnvVarDeclarationInput {
|
|
|
152
151
|
optional?: boolean;
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
/** SDK input type for DatastoreUsage. */
|
|
156
|
-
export interface DatastoreUsageInput {
|
|
157
|
-
datastoreRef: ResourceRef;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
154
|
function buildToolApprovalOverrideProto(input: ToolApprovalOverrideInput) {
|
|
161
155
|
return Object.assign(create(ToolApprovalOverrideSchema), stripUndefined({
|
|
162
156
|
toolName: input.toolName,
|
|
@@ -199,12 +193,6 @@ function buildEnvVarDeclarationProto(input: EnvVarDeclarationInput) {
|
|
|
199
193
|
}));
|
|
200
194
|
}
|
|
201
195
|
|
|
202
|
-
function buildDatastoreUsageProto(input: DatastoreUsageInput) {
|
|
203
|
-
const msg = create(DatastoreUsageSchema);
|
|
204
|
-
if (input.datastoreRef?.slug || input.datastoreRef?.org) msg.datastoreRef = create(ApiResourceReferenceSchema, { ...input.datastoreRef, kind: 49 });
|
|
205
|
-
return msg;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
196
|
export function buildAgentProto(input: AgentInput): Agent {
|
|
209
197
|
const mcpServerUsages = input.mcpServerUsages?.map(buildMcpServerUsageProto);
|
|
210
198
|
const skillRefs = input.skillRefs?.map(r => create(ApiResourceReferenceSchema, { ...r, kind: 43 }));
|
|
@@ -213,7 +201,6 @@ export function buildAgentProto(input: AgentInput): Agent {
|
|
|
213
201
|
if (input.env) {
|
|
214
202
|
env = Object.fromEntries(Object.entries(input.env).map(([k, v]) => [k, buildEnvVarDeclarationProto(v)]));
|
|
215
203
|
}
|
|
216
|
-
const datastoreUsages = input.datastoreUsages?.map(buildDatastoreUsageProto);
|
|
217
204
|
return Object.assign(create(AgentSchema), {
|
|
218
205
|
apiVersion: "agentic.stigmer.ai/v1",
|
|
219
206
|
kind: "Agent",
|
|
@@ -232,7 +219,6 @@ export function buildAgentProto(input: AgentInput): Agent {
|
|
|
232
219
|
skillRefs,
|
|
233
220
|
subAgents,
|
|
234
221
|
env,
|
|
235
|
-
datastoreUsages,
|
|
236
222
|
})),
|
|
237
223
|
}) as Agent;
|
|
238
224
|
}
|
package/src/gen/agentinstance.ts
CHANGED
|
@@ -90,7 +90,6 @@ export interface AgentInstanceInput {
|
|
|
90
90
|
agentId?: string;
|
|
91
91
|
description?: string;
|
|
92
92
|
environmentRefs?: ResourceRef[];
|
|
93
|
-
datastorePartition?: string;
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
export function buildAgentInstanceProto(input: AgentInstanceInput): AgentInstance {
|
|
@@ -109,7 +108,6 @@ export function buildAgentInstanceProto(input: AgentInstanceInput): AgentInstanc
|
|
|
109
108
|
agentId: input.agentId,
|
|
110
109
|
description: input.description,
|
|
111
110
|
environmentRefs,
|
|
112
|
-
datastorePartition: input.datastorePartition,
|
|
113
111
|
})),
|
|
114
112
|
}) as AgentInstance;
|
|
115
113
|
}
|
|
@@ -26,7 +26,6 @@ export const GRANTABLE_ROLES: ReadonlyMap<ApiResourceKind, readonly IamRole[]> =
|
|
|
26
26
|
[ApiResourceKind.agent_share, [IamRole.owner, IamRole.viewer]],
|
|
27
27
|
[ApiResourceKind.agent_channel, [IamRole.owner, IamRole.viewer, IamRole.participant]],
|
|
28
28
|
[ApiResourceKind.channel_app, [IamRole.owner, IamRole.viewer]],
|
|
29
|
-
[ApiResourceKind.datastore, [IamRole.owner, IamRole.viewer]],
|
|
30
29
|
[ApiResourceKind.workflow, [IamRole.owner, IamRole.viewer]],
|
|
31
30
|
[ApiResourceKind.workflow_instance, [IamRole.owner, IamRole.viewer]],
|
|
32
31
|
[ApiResourceKind.workflow_execution, [IamRole.owner, IamRole.viewer]],
|
package/src/gen/client.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { AgentShareClient } from "./agentshare.js";
|
|
|
9
9
|
import { ApiKeyClient } from "./apikey.js";
|
|
10
10
|
import { ArtifactClient } from "./artifact.js";
|
|
11
11
|
import { ChannelAppClient } from "./channelapp.js";
|
|
12
|
-
import { DatastoreClient } from "./datastore.js";
|
|
13
12
|
import { EnvironmentClient } from "./environment.js";
|
|
14
13
|
import { ExecutionContextClient } from "./executioncontext.js";
|
|
15
14
|
import { IamPolicyClient } from "./iampolicy.js";
|
|
@@ -38,7 +37,6 @@ export class GeneratedClient {
|
|
|
38
37
|
readonly apiKey: ApiKeyClient;
|
|
39
38
|
readonly artifact: ArtifactClient;
|
|
40
39
|
readonly channelapp: ChannelAppClient;
|
|
41
|
-
readonly datastore: DatastoreClient;
|
|
42
40
|
readonly environment: EnvironmentClient;
|
|
43
41
|
readonly executionContext: ExecutionContextClient;
|
|
44
42
|
readonly iamPolicy: IamPolicyClient;
|
|
@@ -66,7 +64,6 @@ export class GeneratedClient {
|
|
|
66
64
|
this.apiKey = new ApiKeyClient(transport);
|
|
67
65
|
this.artifact = new ArtifactClient(transport);
|
|
68
66
|
this.channelapp = new ChannelAppClient(transport);
|
|
69
|
-
this.datastore = new DatastoreClient(transport);
|
|
70
67
|
this.environment = new EnvironmentClient(transport);
|
|
71
68
|
this.executionContext = new ExecutionContextClient(transport);
|
|
72
69
|
this.iamPolicy = new IamPolicyClient(transport);
|
|
@@ -89,7 +86,7 @@ export class GeneratedClient {
|
|
|
89
86
|
|
|
90
87
|
// Re-export all resource client types and input types.
|
|
91
88
|
export { AgentClient } from "./agent.js";
|
|
92
|
-
export { type AgentInput, type McpServerUsageInput, type ToolApprovalOverrideInput, type SubAgentInput, type McpAccessInput, type EnvVarDeclarationInput
|
|
89
|
+
export { type AgentInput, type McpServerUsageInput, type ToolApprovalOverrideInput, type SubAgentInput, type McpAccessInput, type EnvVarDeclarationInput } from "./agent.js";
|
|
93
90
|
export { AgentChannelClient } from "./agentchannel.js";
|
|
94
91
|
export { type AgentChannelInput, type SlackChannelConfigInput, type WhatsAppChannelConfigInput, type RunConfigInput } from "./agentchannel.js";
|
|
95
92
|
export { AgentExecutionClient } from "./agentexecution.js";
|
|
@@ -104,14 +101,12 @@ export { ArtifactClient } from "./artifact.js";
|
|
|
104
101
|
export { type ArtifactInput, type ArtifactSourceInput, type RetentionPolicyInput } from "./artifact.js";
|
|
105
102
|
export { ChannelAppClient } from "./channelapp.js";
|
|
106
103
|
export { type ChannelAppInput, type SlackChannelAppConfigInput, type WhatsAppChannelAppConfigInput } from "./channelapp.js";
|
|
107
|
-
export { DatastoreClient } from "./datastore.js";
|
|
108
|
-
export { type DatastoreInput, type DatastoreAuthorizationInput, type DatastoreRoleInput, type DatastoreRoleBindingInput, type DatastoreSubjectInput, type ChannelSenderSubjectInput, type ApiResourceRefInput, type CollectionDeclarationInput, type FieldDeclarationInput, type UniqueConstraintInput, type UniqueWhereInput, type CheckConstraintInput, type ExistsConstraintInput, type DatastoreGrantInput } from "./datastore.js";
|
|
109
104
|
export { EnvironmentClient } from "./environment.js";
|
|
110
105
|
export { type EnvironmentInput } from "./environment.js";
|
|
111
106
|
export { ExecutionContextClient } from "./executioncontext.js";
|
|
112
107
|
export { type ExecutionContextInput } from "./executioncontext.js";
|
|
113
108
|
export { IamPolicyClient } from "./iampolicy.js";
|
|
114
|
-
export { type IamPolicyInput } from "./iampolicy.js";
|
|
109
|
+
export { type IamPolicyInput, type ApiResourceRefInput } from "./iampolicy.js";
|
|
115
110
|
export { IdentityAccountClient } from "./identityaccount.js";
|
|
116
111
|
export { type IdentityAccountInput } from "./identityaccount.js";
|
|
117
112
|
export { IdentityProviderClient } from "./identityprovider.js";
|
package/src/index.ts
CHANGED
|
@@ -49,7 +49,6 @@ export {
|
|
|
49
49
|
getUserMessage,
|
|
50
50
|
type ErrorReason,
|
|
51
51
|
getErrorReason,
|
|
52
|
-
getRecordConstraint,
|
|
53
52
|
type RpcErrorMetadata,
|
|
54
53
|
annotateRpcError,
|
|
55
54
|
getRpcMetadata,
|
|
@@ -166,7 +165,6 @@ export {
|
|
|
166
165
|
type SubAgentInput,
|
|
167
166
|
type McpAccessInput,
|
|
168
167
|
type EnvVarDeclarationInput,
|
|
169
|
-
type DatastoreUsageInput,
|
|
170
168
|
} from "./gen/agent.js";
|
|
171
169
|
export {
|
|
172
170
|
AgentChannelClient,
|
package/src/manifest/registry.ts
CHANGED
|
@@ -31,9 +31,6 @@ import { AgentShareQueryController } from "@stigmer/protos/ai/stigmer/agentic/ag
|
|
|
31
31
|
import { type ChannelApp, ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
32
32
|
import { ChannelAppCommandController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/command_pb";
|
|
33
33
|
import { ChannelAppQueryController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/query_pb";
|
|
34
|
-
import { type Datastore, DatastoreSchema } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/api_pb";
|
|
35
|
-
import { DatastoreCommandController } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/command_pb";
|
|
36
|
-
import { DatastoreQueryController } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/query_pb";
|
|
37
34
|
import { type Environment, EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
|
|
38
35
|
import { EnvironmentCommandController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/command_pb";
|
|
39
36
|
import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
|
|
@@ -102,18 +99,6 @@ const HANDLERS: readonly ManifestKindHandler[] = [
|
|
|
102
99
|
apply: (c, m) => c(McpServerCommandController).apply(m as McpServer),
|
|
103
100
|
getByReference: (c, ref) => c(McpServerQueryController).getByReference(ref),
|
|
104
101
|
},
|
|
105
|
-
// A Datastore applies before the Agents that reference it via
|
|
106
|
-
// datastore_usages (the McpServer-before-Agent pattern).
|
|
107
|
-
{
|
|
108
|
-
kind: ApiResourceKind.datastore,
|
|
109
|
-
yamlKind: "Datastore",
|
|
110
|
-
displayName: "Datastore",
|
|
111
|
-
apiVersion: AGENTIC_V1,
|
|
112
|
-
schema: DatastoreSchema,
|
|
113
|
-
applyOrder: 2,
|
|
114
|
-
apply: (c, m) => c(DatastoreCommandController).apply(m as Datastore),
|
|
115
|
-
getByReference: (c, ref) => c(DatastoreQueryController).getByReference(ref),
|
|
116
|
-
},
|
|
117
102
|
{
|
|
118
103
|
kind: ApiResourceKind.agent,
|
|
119
104
|
yamlKind: "Agent",
|
package/gen/datastore.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { type DeleteResourceInput, type ListParams, type ListResult, type ResourceRef } from "./types.js";
|
|
2
|
-
import { type JsonValue } from "@bufbuild/protobuf";
|
|
3
|
-
import { type Transport } from "@connectrpc/connect";
|
|
4
|
-
import { type Datastore } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/api_pb";
|
|
5
|
-
import { type InsertRecordRequest, type RecordEnvelope, type UpdateRecordRequest, type DeleteRecordRequest, type FindRecordsRequest, type RecordList, type DescribeDatastoreRequest, type DatastoreDescription } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/record_io_pb";
|
|
6
|
-
import { FieldType, DatastoreVerb, DatastoreGrantScope } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/spec_pb";
|
|
7
|
-
import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
|
|
8
|
-
import { type UpdateVisibilityInput } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
|
|
9
|
-
/** Provides operations on datastore resources. */
|
|
10
|
-
export declare class DatastoreClient {
|
|
11
|
-
private readonly command;
|
|
12
|
-
private readonly query;
|
|
13
|
-
private readonly datastoreRecordCommand;
|
|
14
|
-
private readonly datastoreRecordQuery;
|
|
15
|
-
private readonly search;
|
|
16
|
-
constructor(transport: Transport);
|
|
17
|
-
apply(input: DatastoreInput): Promise<Datastore>;
|
|
18
|
-
create(input: DatastoreInput): Promise<Datastore>;
|
|
19
|
-
update(input: DatastoreInput): Promise<Datastore>;
|
|
20
|
-
updateVisibility(input: UpdateVisibilityInput): Promise<Datastore>;
|
|
21
|
-
delete(input: DeleteResourceInput): Promise<Datastore>;
|
|
22
|
-
get(id: string): Promise<Datastore>;
|
|
23
|
-
getByReference(ref: ResourceRef): Promise<Datastore>;
|
|
24
|
-
insertRecord(input: InsertRecordRequest): Promise<RecordEnvelope>;
|
|
25
|
-
updateRecord(input: UpdateRecordRequest): Promise<RecordEnvelope>;
|
|
26
|
-
deleteRecord(input: DeleteRecordRequest): Promise<RecordEnvelope>;
|
|
27
|
-
findRecords(input: FindRecordsRequest): Promise<RecordList>;
|
|
28
|
-
describeDatastore(input: DescribeDatastoreRequest): Promise<DatastoreDescription>;
|
|
29
|
-
list(params: ListParams): Promise<ListResult>;
|
|
30
|
-
}
|
|
31
|
-
/** Input for creating/updating a Datastore. */
|
|
32
|
-
export interface DatastoreInput {
|
|
33
|
-
name: string;
|
|
34
|
-
slug?: string;
|
|
35
|
-
org: string;
|
|
36
|
-
labels?: Record<string, string>;
|
|
37
|
-
visibility?: ApiResourceVisibility;
|
|
38
|
-
description?: string;
|
|
39
|
-
timezone?: string;
|
|
40
|
-
authorization?: DatastoreAuthorizationInput;
|
|
41
|
-
collections?: CollectionDeclarationInput[];
|
|
42
|
-
}
|
|
43
|
-
/** SDK input type for DatastoreAuthorization. */
|
|
44
|
-
export interface DatastoreAuthorizationInput {
|
|
45
|
-
roles?: DatastoreRoleInput[];
|
|
46
|
-
bindings?: DatastoreRoleBindingInput[];
|
|
47
|
-
defaultRole?: string;
|
|
48
|
-
}
|
|
49
|
-
/** SDK input type for DatastoreRole. */
|
|
50
|
-
export interface DatastoreRoleInput {
|
|
51
|
-
name: string;
|
|
52
|
-
}
|
|
53
|
-
/** SDK input type for DatastoreRoleBinding. */
|
|
54
|
-
export interface DatastoreRoleBindingInput {
|
|
55
|
-
subject: DatastoreSubjectInput;
|
|
56
|
-
role: string;
|
|
57
|
-
}
|
|
58
|
-
/** SDK input type for DatastoreSubject. */
|
|
59
|
-
export interface DatastoreSubjectInput {
|
|
60
|
-
channelSender?: ChannelSenderSubjectInput;
|
|
61
|
-
principal?: ApiResourceRefInput;
|
|
62
|
-
}
|
|
63
|
-
/** SDK input type for ChannelSenderSubject. */
|
|
64
|
-
export interface ChannelSenderSubjectInput {
|
|
65
|
-
senderKind: string;
|
|
66
|
-
value: string;
|
|
67
|
-
}
|
|
68
|
-
/** SDK input type for ApiResourceRef. */
|
|
69
|
-
export interface ApiResourceRefInput {
|
|
70
|
-
kind: string;
|
|
71
|
-
id: string;
|
|
72
|
-
relation?: string;
|
|
73
|
-
}
|
|
74
|
-
/** SDK input type for CollectionDeclaration. */
|
|
75
|
-
export interface CollectionDeclarationInput {
|
|
76
|
-
name: string;
|
|
77
|
-
description?: string;
|
|
78
|
-
fields?: FieldDeclarationInput[];
|
|
79
|
-
uniques?: UniqueConstraintInput[];
|
|
80
|
-
checks?: CheckConstraintInput[];
|
|
81
|
-
exists?: ExistsConstraintInput[];
|
|
82
|
-
notExists?: ExistsConstraintInput[];
|
|
83
|
-
grants?: DatastoreGrantInput[];
|
|
84
|
-
}
|
|
85
|
-
/** SDK input type for FieldDeclaration. */
|
|
86
|
-
export interface FieldDeclarationInput {
|
|
87
|
-
name: string;
|
|
88
|
-
type: FieldType;
|
|
89
|
-
required?: boolean;
|
|
90
|
-
default?: JsonValue;
|
|
91
|
-
enumValues?: string[];
|
|
92
|
-
description?: string;
|
|
93
|
-
}
|
|
94
|
-
/** SDK input type for UniqueConstraint. */
|
|
95
|
-
export interface UniqueConstraintInput {
|
|
96
|
-
name: string;
|
|
97
|
-
fields?: string[];
|
|
98
|
-
where?: UniqueWhereInput;
|
|
99
|
-
message: string;
|
|
100
|
-
}
|
|
101
|
-
/** SDK input type for UniqueWhere. */
|
|
102
|
-
export interface UniqueWhereInput {
|
|
103
|
-
field: string;
|
|
104
|
-
equals: JsonValue;
|
|
105
|
-
}
|
|
106
|
-
/** SDK input type for CheckConstraint. */
|
|
107
|
-
export interface CheckConstraintInput {
|
|
108
|
-
name: string;
|
|
109
|
-
expression: string;
|
|
110
|
-
when?: string;
|
|
111
|
-
message: string;
|
|
112
|
-
}
|
|
113
|
-
/** SDK input type for ExistsConstraint. */
|
|
114
|
-
export interface ExistsConstraintInput {
|
|
115
|
-
name: string;
|
|
116
|
-
collection: string;
|
|
117
|
-
where: string;
|
|
118
|
-
when?: string;
|
|
119
|
-
message: string;
|
|
120
|
-
}
|
|
121
|
-
/** SDK input type for DatastoreGrant. */
|
|
122
|
-
export interface DatastoreGrantInput {
|
|
123
|
-
role: string;
|
|
124
|
-
verbs?: DatastoreVerb[];
|
|
125
|
-
scope?: DatastoreGrantScope;
|
|
126
|
-
readFields?: string[];
|
|
127
|
-
}
|
|
128
|
-
export declare function buildDatastoreProto(input: DatastoreInput): Datastore;
|
|
129
|
-
//# sourceMappingURL=datastore.d.ts.map
|
package/gen/datastore.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datastore.d.ts","s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