@stigmer/sdk 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +199 -0
  3. package/config.d.ts +40 -0
  4. package/config.d.ts.map +1 -0
  5. package/config.js +17 -0
  6. package/config.js.map +1 -0
  7. package/errors.d.ts +77 -0
  8. package/errors.d.ts.map +1 -0
  9. package/errors.js +163 -0
  10. package/errors.js.map +1 -0
  11. package/gen/agent.d.ts +56 -0
  12. package/gen/agent.d.ts.map +1 -0
  13. package/gen/agent.js +113 -0
  14. package/gen/agent.js.map +1 -0
  15. package/gen/agentexecution.d.ts +68 -0
  16. package/gen/agentexecution.d.ts.map +1 -0
  17. package/gen/agentexecution.js +197 -0
  18. package/gen/agentexecution.js.map +1 -0
  19. package/gen/agentinstance.d.ts +26 -0
  20. package/gen/agentinstance.d.ts.map +1 -0
  21. package/gen/agentinstance.js +92 -0
  22. package/gen/agentinstance.js.map +1 -0
  23. package/gen/apikey.d.ts +25 -0
  24. package/gen/apikey.d.ts.map +1 -0
  25. package/gen/apikey.js +85 -0
  26. package/gen/apikey.js.map +1 -0
  27. package/gen/client.d.ts +76 -0
  28. package/gen/client.d.ts.map +1 -0
  29. package/gen/client.js +77 -0
  30. package/gen/client.js.map +1 -0
  31. package/gen/environment.d.ts +23 -0
  32. package/gen/environment.d.ts.map +1 -0
  33. package/gen/environment.js +86 -0
  34. package/gen/environment.js.map +1 -0
  35. package/gen/errors.d.ts +15 -0
  36. package/gen/errors.d.ts.map +1 -0
  37. package/gen/errors.js +52 -0
  38. package/gen/errors.js.map +1 -0
  39. package/gen/executioncontext.d.ts +24 -0
  40. package/gen/executioncontext.d.ts.map +1 -0
  41. package/gen/executioncontext.js +87 -0
  42. package/gen/executioncontext.js.map +1 -0
  43. package/gen/iampolicy.d.ts +34 -0
  44. package/gen/iampolicy.d.ts.map +1 -0
  45. package/gen/iampolicy.js +107 -0
  46. package/gen/iampolicy.js.map +1 -0
  47. package/gen/identityaccount.d.ts +35 -0
  48. package/gen/identityaccount.d.ts.map +1 -0
  49. package/gen/identityaccount.js +113 -0
  50. package/gen/identityaccount.js.map +1 -0
  51. package/gen/identityprovider.d.ts +27 -0
  52. package/gen/identityprovider.d.ts.map +1 -0
  53. package/gen/identityprovider.js +90 -0
  54. package/gen/identityprovider.js.map +1 -0
  55. package/gen/mcpserver.d.ts +50 -0
  56. package/gen/mcpserver.d.ts.map +1 -0
  57. package/gen/mcpserver.js +124 -0
  58. package/gen/mcpserver.js.map +1 -0
  59. package/gen/organization.d.ts +31 -0
  60. package/gen/organization.d.ts.map +1 -0
  61. package/gen/organization.js +102 -0
  62. package/gen/organization.js.map +1 -0
  63. package/gen/project.d.ts +24 -0
  64. package/gen/project.d.ts.map +1 -0
  65. package/gen/project.js +84 -0
  66. package/gen/project.js.map +1 -0
  67. package/gen/session.d.ts +49 -0
  68. package/gen/session.d.ts.map +1 -0
  69. package/gen/session.js +94 -0
  70. package/gen/session.js.map +1 -0
  71. package/gen/skill.d.ts +26 -0
  72. package/gen/skill.d.ts.map +1 -0
  73. package/gen/skill.js +101 -0
  74. package/gen/skill.js.map +1 -0
  75. package/gen/types.d.ts +43 -0
  76. package/gen/types.d.ts.map +1 -0
  77. package/gen/types.js +3 -0
  78. package/gen/types.js.map +1 -0
  79. package/gen/workflow.d.ts +51 -0
  80. package/gen/workflow.d.ts.map +1 -0
  81. package/gen/workflow.js +85 -0
  82. package/gen/workflow.js.map +1 -0
  83. package/gen/workflowexecution.d.ts +37 -0
  84. package/gen/workflowexecution.d.ts.map +1 -0
  85. package/gen/workflowexecution.js +161 -0
  86. package/gen/workflowexecution.js.map +1 -0
  87. package/gen/workflowinstance.d.ts +26 -0
  88. package/gen/workflowinstance.d.ts.map +1 -0
  89. package/gen/workflowinstance.js +92 -0
  90. package/gen/workflowinstance.js.map +1 -0
  91. package/index.d.ts +23 -0
  92. package/index.d.ts.map +1 -0
  93. package/index.js +26 -0
  94. package/index.js.map +1 -0
  95. package/internal/interceptors.d.ts +25 -0
  96. package/internal/interceptors.d.ts.map +1 -0
  97. package/internal/interceptors.js +75 -0
  98. package/internal/interceptors.js.map +1 -0
  99. package/package.json +40 -0
  100. package/search.d.ts +41 -0
  101. package/search.d.ts.map +1 -0
  102. package/search.js +45 -0
  103. package/search.js.map +1 -0
  104. package/src/config.ts +64 -0
  105. package/src/errors.ts +219 -0
  106. package/src/gen/agent.ts +146 -0
  107. package/src/gen/agentexecution.ts +205 -0
  108. package/src/gen/agentinstance.ts +91 -0
  109. package/src/gen/apikey.ts +86 -0
  110. package/src/gen/client.ts +99 -0
  111. package/src/gen/environment.ts +86 -0
  112. package/src/gen/errors.ts +74 -0
  113. package/src/gen/executioncontext.ts +87 -0
  114. package/src/gen/iampolicy.ts +108 -0
  115. package/src/gen/identityaccount.ts +115 -0
  116. package/src/gen/identityprovider.ts +94 -0
  117. package/src/gen/mcpserver.ts +147 -0
  118. package/src/gen/organization.ts +103 -0
  119. package/src/gen/project.ts +85 -0
  120. package/src/gen/session.ts +120 -0
  121. package/src/gen/skill.ts +102 -0
  122. package/src/gen/types.ts +51 -0
  123. package/src/gen/workflow.ts +116 -0
  124. package/src/gen/workflowexecution.ts +147 -0
  125. package/src/gen/workflowinstance.ts +91 -0
  126. package/src/index.ts +124 -0
  127. package/src/internal/interceptors.ts +83 -0
  128. package/src/search.ts +71 -0
  129. package/src/stigmer.ts +83 -0
  130. package/src/transport.ts +46 -0
  131. package/stigmer.d.ts +57 -0
  132. package/stigmer.d.ts.map +1 -0
  133. package/stigmer.js +64 -0
  134. package/stigmer.js.map +1 -0
  135. package/transport.d.ts +13 -0
  136. package/transport.d.ts.map +1 -0
  137. package/transport.js +34 -0
  138. package/transport.js.map +1 -0
package/gen/skill.js ADDED
@@ -0,0 +1,101 @@
1
+ // Code generated by stigmer-codegen. DO NOT EDIT.
2
+ import { wrapError } from "./errors";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { createClient } from "@connectrpc/connect";
5
+ import { SkillSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/api_pb";
6
+ import { SkillCommandController } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/command_pb";
7
+ import { SkillIdSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/io_pb";
8
+ import { SkillQueryController } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/query_pb";
9
+ import { SkillSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/spec_pb";
10
+ import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
11
+ import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
12
+ import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
13
+ import { PageInfoSchema } from "@stigmer/protos/ai/stigmer/commons/rpc/pagination_pb";
14
+ import { SearchRequestSchema } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
15
+ import { SearchService } from "@stigmer/protos/ai/stigmer/search/v1/query_pb";
16
+ /** Provides operations on skill resources. */
17
+ export class SkillClient {
18
+ command;
19
+ query;
20
+ search;
21
+ constructor(transport) {
22
+ this.command = createClient(SkillCommandController, transport);
23
+ this.query = createClient(SkillQueryController, transport);
24
+ this.search = createClient(SearchService, transport);
25
+ }
26
+ async push(input) {
27
+ try {
28
+ return await this.command.push(input);
29
+ }
30
+ catch (e) {
31
+ throw wrapError(e);
32
+ }
33
+ }
34
+ async delete(id) {
35
+ try {
36
+ return await this.command.delete(create(SkillIdSchema, { value: id }));
37
+ }
38
+ catch (e) {
39
+ throw wrapError(e);
40
+ }
41
+ }
42
+ async get(id) {
43
+ try {
44
+ return await this.query.get(create(SkillIdSchema, { value: id }));
45
+ }
46
+ catch (e) {
47
+ throw wrapError(e);
48
+ }
49
+ }
50
+ async getByReference(ref) {
51
+ try {
52
+ return await this.query.getByReference(create(ApiResourceReferenceSchema, ref));
53
+ }
54
+ catch (e) {
55
+ throw wrapError(e);
56
+ }
57
+ }
58
+ async getArtifact(input) {
59
+ try {
60
+ return await this.query.getArtifact(input);
61
+ }
62
+ catch (e) {
63
+ throw wrapError(e);
64
+ }
65
+ }
66
+ async list(params) {
67
+ try {
68
+ const resp = await this.search.search(create(SearchRequestSchema, {
69
+ kinds: [ApiResourceKind.skill],
70
+ query: params.query,
71
+ org: params.org,
72
+ excludePublic: params.excludePublic ?? false,
73
+ page: params.page ? create(PageInfoSchema, params.page) : undefined,
74
+ }));
75
+ return {
76
+ entries: resp.entries,
77
+ totalCount: resp.totalCount,
78
+ totalPages: resp.totalPages,
79
+ };
80
+ }
81
+ catch (e) {
82
+ throw wrapError(e);
83
+ }
84
+ }
85
+ }
86
+ function buildSkillProto(input) {
87
+ return Object.assign(create(SkillSchema), {
88
+ apiVersion: "agentic.stigmer.ai/v1",
89
+ kind: "Skill",
90
+ metadata: Object.assign(create(ApiResourceMetadataSchema), {
91
+ name: input.name,
92
+ org: input.org,
93
+ }),
94
+ spec: Object.assign(create(SkillSpecSchema), {
95
+ skillMd: input.skillMd,
96
+ tag: input.tag,
97
+ description: input.description,
98
+ }),
99
+ });
100
+ }
101
+ //# sourceMappingURL=skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/gen/skill.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAc,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAE,aAAa,EAAyJ,MAAM,mDAAmD,CAAC;AACzO,OAAO,EAAE,oBAAoB,EAAE,MAAM,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,CAAC,CAAC,CAAC,SAAS;aACpE,CAAC,CAAC,CAAC;YACJ,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IACrC,CAAC;CACF;AAWD,SAAS,eAAe,CAAC,KAAiB;IACxC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;QACxC,UAAU,EAAE,uBAAuB;QACnC,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE;YACzD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,GAAG;SACf,CAAC;QACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;YAC3C,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC;KACH,CAAU,CAAC;AACd,CAAC"}
package/gen/types.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
2
+ /** Arguments for deleting a resource. */
3
+ export interface DeleteResourceInput {
4
+ readonly resourceId: string;
5
+ readonly versionMessage?: string;
6
+ readonly force?: boolean;
7
+ }
8
+ /** Identifies an API resource by org, slug, and optional version. */
9
+ export interface ResourceRef {
10
+ readonly org: string;
11
+ readonly slug: string;
12
+ readonly version?: string;
13
+ readonly kind?: number;
14
+ }
15
+ /** Offset-based pagination parameters. */
16
+ export interface Page {
17
+ readonly num: number;
18
+ readonly size: number;
19
+ }
20
+ /** Parameters for SearchService-backed list queries. */
21
+ export interface ListParams {
22
+ readonly org: string;
23
+ readonly query?: string;
24
+ readonly excludePublic?: boolean;
25
+ readonly page?: Page;
26
+ }
27
+ /** Response from a SearchService-backed list query. */
28
+ export interface ListResult {
29
+ readonly entries: SearchResult[];
30
+ readonly totalCount: number;
31
+ readonly totalPages: number;
32
+ }
33
+ /** Environment variable configuration. */
34
+ export interface EnvSpecInput {
35
+ readonly variables: Record<string, EnvVarInput>;
36
+ }
37
+ /** A single environment variable. */
38
+ export interface EnvVarInput {
39
+ readonly value: string;
40
+ readonly isSecret?: boolean;
41
+ readonly description?: string;
42
+ }
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/gen/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE/E,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CACtB;AAED,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACjD;AAED,qCAAqC;AACrC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B"}
package/gen/types.js ADDED
@@ -0,0 +1,3 @@
1
+ // Code generated by stigmer-codegen. DO NOT EDIT.
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/gen/types.ts"],"names":[],"mappings":"AAAA,kDAAkD"}
@@ -0,0 +1,51 @@
1
+ import { type EnvSpecInput, type ResourceRef } from "./types";
2
+ import { type JsonObject } from "@bufbuild/protobuf";
3
+ import { type Transport } from "@connectrpc/connect";
4
+ import { type Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
5
+ import { WorkflowTaskKind } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/enum_pb";
6
+ /** Provides operations on workflow resources. */
7
+ export declare class WorkflowClient {
8
+ private readonly command;
9
+ private readonly query;
10
+ constructor(transport: Transport);
11
+ apply(input: WorkflowInput): Promise<Workflow>;
12
+ create(input: WorkflowInput): Promise<Workflow>;
13
+ update(input: WorkflowInput): Promise<Workflow>;
14
+ delete(id: string): Promise<Workflow>;
15
+ get(id: string): Promise<Workflow>;
16
+ getByReference(ref: ResourceRef): Promise<Workflow>;
17
+ }
18
+ /** Input for creating/updating a Workflow. */
19
+ export interface WorkflowInput {
20
+ name: string;
21
+ org: string;
22
+ description?: string;
23
+ document: WorkflowDocumentInput;
24
+ tasks?: WorkflowTaskInput[];
25
+ envSpec?: EnvSpecInput;
26
+ }
27
+ /** SDK input type for WorkflowDocument. */
28
+ export interface WorkflowDocumentInput {
29
+ dsl?: string;
30
+ namespace: string;
31
+ name: string;
32
+ version: string;
33
+ description?: string;
34
+ }
35
+ /** SDK input type for WorkflowTask. */
36
+ export interface WorkflowTaskInput {
37
+ name: string;
38
+ kind: WorkflowTaskKind;
39
+ taskConfig: JsonObject;
40
+ export?: ExportInput;
41
+ flow?: FlowControlInput;
42
+ }
43
+ /** SDK input type for Export. */
44
+ export interface ExportInput {
45
+ as?: string;
46
+ }
47
+ /** SDK input type for FlowControl. */
48
+ export interface FlowControlInput {
49
+ then?: string;
50
+ }
51
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/gen/workflow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AAEtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAO1F,iDAAiD;AACjD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2C;IACnE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyC;gBAEnD,SAAS,EAAE,SA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AC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,85 @@
1
+ // Code generated by stigmer-codegen. DO NOT EDIT.
2
+ import { wrapError } from "./errors";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { createClient } from "@connectrpc/connect";
5
+ import { WorkflowSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
6
+ import { WorkflowCommandController } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/command_pb";
7
+ import { WorkflowIdSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/io_pb";
8
+ import { WorkflowQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/query_pb";
9
+ import { WorkflowSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/spec_pb";
10
+ import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
11
+ import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
12
+ /** Provides operations on workflow resources. */
13
+ export class WorkflowClient {
14
+ command;
15
+ query;
16
+ constructor(transport) {
17
+ this.command = createClient(WorkflowCommandController, transport);
18
+ this.query = createClient(WorkflowQueryController, transport);
19
+ }
20
+ async apply(input) {
21
+ try {
22
+ return await this.command.apply(buildWorkflowProto(input));
23
+ }
24
+ catch (e) {
25
+ throw wrapError(e);
26
+ }
27
+ }
28
+ async create(input) {
29
+ try {
30
+ return await this.command.create(buildWorkflowProto(input));
31
+ }
32
+ catch (e) {
33
+ throw wrapError(e);
34
+ }
35
+ }
36
+ async update(input) {
37
+ try {
38
+ return await this.command.update(buildWorkflowProto(input));
39
+ }
40
+ catch (e) {
41
+ throw wrapError(e);
42
+ }
43
+ }
44
+ async delete(id) {
45
+ try {
46
+ return await this.command.delete(create(WorkflowIdSchema, { value: id }));
47
+ }
48
+ catch (e) {
49
+ throw wrapError(e);
50
+ }
51
+ }
52
+ async get(id) {
53
+ try {
54
+ return await this.query.get(create(WorkflowIdSchema, { value: id }));
55
+ }
56
+ catch (e) {
57
+ throw wrapError(e);
58
+ }
59
+ }
60
+ async getByReference(ref) {
61
+ try {
62
+ return await this.query.getByReference(create(ApiResourceReferenceSchema, ref));
63
+ }
64
+ catch (e) {
65
+ throw wrapError(e);
66
+ }
67
+ }
68
+ }
69
+ function buildWorkflowProto(input) {
70
+ return Object.assign(create(WorkflowSchema), {
71
+ apiVersion: "agentic.stigmer.ai/v1",
72
+ kind: "Workflow",
73
+ metadata: Object.assign(create(ApiResourceMetadataSchema), {
74
+ name: input.name,
75
+ org: input.org,
76
+ }),
77
+ spec: Object.assign(create(WorkflowSpecSchema), {
78
+ description: input.description,
79
+ document: input.document,
80
+ tasks: input.tasks,
81
+ envSpec: input.envSpec,
82
+ }),
83
+ });
84
+ }
85
+ //# sourceMappingURL=workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/gen/workflow.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,MAAM,EAAmB,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAiB,MAAM,uDAAuD,CAAC;AACtG,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAEtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AAEvG,iDAAiD;AACjD,MAAM,OAAO,cAAc;IACR,OAAO,CAA2C;IAClD,KAAK,CAAyC;IAE/D,YAAY,SAA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AK,CAAC,GAAG,CAAC,EAAU;QAClB,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACvE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,GAAgB;QACnC,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC,CAAC;QAClF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IACrC,CAAC;CACF;AAwCD,SAAS,kBAAkB,CAAC,KAAoB;IAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAC3C,UAAU,EAAE,uBAAuB;QACnC,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE;YACzD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,GAAG;SACf,CAAC;QACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;YAC9C,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;KACH,CAAa,CAAC;AACjB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { type EnvVarInput } from "./types";
2
+ import { type Transport } from "@connectrpc/connect";
3
+ import { type WorkflowExecution } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/api_pb";
4
+ import { type WorkflowExecutionUpdateStatusInput, type SubmitWorkflowApprovalInput, type SendSignalInput, type CancelWorkflowExecutionInput, type TerminateWorkflowExecutionInput, type RecoverWorkflowExecutionInput, type PauseWorkflowExecutionInput, type ResumeWorkflowExecutionInput, type ListWorkflowExecutionsRequest, type WorkflowExecutionList, type ListWorkflowExecutionsByWorkflowRequest, type SubscribeWorkflowExecutionRequest } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/io_pb";
5
+ /** Provides operations on workflowexecution resources. */
6
+ export declare class WorkflowExecutionClient {
7
+ private readonly command;
8
+ private readonly query;
9
+ constructor(transport: Transport);
10
+ create(input: WorkflowExecutionInput): Promise<WorkflowExecution>;
11
+ update(input: WorkflowExecutionInput): Promise<WorkflowExecution>;
12
+ updateStatus(input: WorkflowExecutionUpdateStatusInput): Promise<WorkflowExecution>;
13
+ submitApproval(input: SubmitWorkflowApprovalInput): Promise<WorkflowExecution>;
14
+ delete(id: string): Promise<WorkflowExecution>;
15
+ sendSignal(input: SendSignalInput): Promise<WorkflowExecution>;
16
+ cancel(input: CancelWorkflowExecutionInput): Promise<WorkflowExecution>;
17
+ terminate(input: TerminateWorkflowExecutionInput): Promise<WorkflowExecution>;
18
+ recover(input: RecoverWorkflowExecutionInput): Promise<WorkflowExecution>;
19
+ pause(input: PauseWorkflowExecutionInput): Promise<WorkflowExecution>;
20
+ resume(input: ResumeWorkflowExecutionInput): Promise<WorkflowExecution>;
21
+ get(id: string): Promise<WorkflowExecution>;
22
+ list(input: ListWorkflowExecutionsRequest): Promise<WorkflowExecutionList>;
23
+ listByWorkflow(input: ListWorkflowExecutionsByWorkflowRequest): Promise<WorkflowExecutionList>;
24
+ subscribe(input: SubscribeWorkflowExecutionRequest, signal?: AbortSignal): AsyncGenerator<WorkflowExecution>;
25
+ }
26
+ /** Input for creating/updating a WorkflowExecution. */
27
+ export interface WorkflowExecutionInput {
28
+ name: string;
29
+ org: string;
30
+ workflowInstanceId?: string;
31
+ workflowId?: string;
32
+ triggerMessage?: string;
33
+ triggerMetadata?: Record<string, string>;
34
+ runtimeEnv?: Record<string, EnvVarInput>;
35
+ callbackToken?: Uint8Array;
36
+ }
37
+ //# sourceMappingURL=workflowexecution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowexecution.d.ts","sourceRoot":"","sources":["../../src/gen/workflowexecution.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;AAEjI,OAAO,EAAkd,KAAK,kCAAkC,EAAE,KAAK,2BAA2B,EAAE,KAAK,eAAe,EAAE,KAAK,4BAA4B,EAAE,KAAK,+BAA+B,EAAE,KAAK,6BAA6B,EAAE,KAAK,2BAA2B,EAAE,KAAK,4BAA4B,EAAE,KAAK,6BAA6B,EAAE,KAAK,qBAAqB,EAAE,KAAK,uCAAuC,EAAE,KAAK,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAMx8B,0DAA0D;AAC1D,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoD;IAC5E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkD;gBAE5D,SAAS,EAAE,SAAS;IAK1B,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMjE,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMjE,YAAY,CAAC,KAAK,EAAE,kCAAkC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMnF,cAAc,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAM9E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAA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Error } from "./errors";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { createClient } from "@connectrpc/connect";
5
+ import { WorkflowExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/api_pb";
6
+ import { WorkflowExecutionCommandController } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/command_pb";
7
+ import { WorkflowExecutionIdSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/io_pb";
8
+ import { WorkflowExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/query_pb";
9
+ import { WorkflowExecutionSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/spec_pb";
10
+ import { ApiResourceIdSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
11
+ import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
12
+ /** Provides operations on workflowexecution resources. */
13
+ export class WorkflowExecutionClient {
14
+ command;
15
+ query;
16
+ constructor(transport) {
17
+ this.command = createClient(WorkflowExecutionCommandController, transport);
18
+ this.query = createClient(WorkflowExecutionQueryController, transport);
19
+ }
20
+ async create(input) {
21
+ try {
22
+ return await this.command.create(buildWorkflowExecutionProto(input));
23
+ }
24
+ catch (e) {
25
+ throw wrapError(e);
26
+ }
27
+ }
28
+ async update(input) {
29
+ try {
30
+ return await this.command.update(buildWorkflowExecutionProto(input));
31
+ }
32
+ catch (e) {
33
+ throw wrapError(e);
34
+ }
35
+ }
36
+ async updateStatus(input) {
37
+ try {
38
+ return await this.command.updateStatus(input);
39
+ }
40
+ catch (e) {
41
+ throw wrapError(e);
42
+ }
43
+ }
44
+ async submitApproval(input) {
45
+ try {
46
+ return await this.command.submitApproval(input);
47
+ }
48
+ catch (e) {
49
+ throw wrapError(e);
50
+ }
51
+ }
52
+ async delete(id) {
53
+ try {
54
+ return await this.command.delete(create(ApiResourceIdSchema, { value: id }));
55
+ }
56
+ catch (e) {
57
+ throw wrapError(e);
58
+ }
59
+ }
60
+ async sendSignal(input) {
61
+ try {
62
+ return await this.command.sendSignal(input);
63
+ }
64
+ catch (e) {
65
+ throw wrapError(e);
66
+ }
67
+ }
68
+ async cancel(input) {
69
+ try {
70
+ return await this.command.cancel(input);
71
+ }
72
+ catch (e) {
73
+ throw wrapError(e);
74
+ }
75
+ }
76
+ async terminate(input) {
77
+ try {
78
+ return await this.command.terminate(input);
79
+ }
80
+ catch (e) {
81
+ throw wrapError(e);
82
+ }
83
+ }
84
+ async recover(input) {
85
+ try {
86
+ return await this.command.recover(input);
87
+ }
88
+ catch (e) {
89
+ throw wrapError(e);
90
+ }
91
+ }
92
+ async pause(input) {
93
+ try {
94
+ return await this.command.pause(input);
95
+ }
96
+ catch (e) {
97
+ throw wrapError(e);
98
+ }
99
+ }
100
+ async resume(input) {
101
+ try {
102
+ return await this.command.resume(input);
103
+ }
104
+ catch (e) {
105
+ throw wrapError(e);
106
+ }
107
+ }
108
+ async get(id) {
109
+ try {
110
+ return await this.query.get(create(WorkflowExecutionIdSchema, { value: id }));
111
+ }
112
+ catch (e) {
113
+ throw wrapError(e);
114
+ }
115
+ }
116
+ async list(input) {
117
+ try {
118
+ return await this.query.list(input);
119
+ }
120
+ catch (e) {
121
+ throw wrapError(e);
122
+ }
123
+ }
124
+ async listByWorkflow(input) {
125
+ try {
126
+ return await this.query.listByWorkflow(input);
127
+ }
128
+ catch (e) {
129
+ throw wrapError(e);
130
+ }
131
+ }
132
+ async *subscribe(input, signal) {
133
+ try {
134
+ for await (const msg of this.query.subscribe(input, { signal })) {
135
+ yield msg;
136
+ }
137
+ }
138
+ catch (e) {
139
+ throw wrapError(e);
140
+ }
141
+ }
142
+ }
143
+ function buildWorkflowExecutionProto(input) {
144
+ return Object.assign(create(WorkflowExecutionSchema), {
145
+ apiVersion: "agentic.stigmer.ai/v1",
146
+ kind: "WorkflowExecution",
147
+ metadata: Object.assign(create(ApiResourceMetadataSchema), {
148
+ name: input.name,
149
+ org: input.org,
150
+ }),
151
+ spec: Object.assign(create(WorkflowExecutionSpecSchema), {
152
+ workflowInstanceId: input.workflowInstanceId,
153
+ workflowId: input.workflowId,
154
+ triggerMessage: input.triggerMessage,
155
+ triggerMetadata: input.triggerMetadata,
156
+ runtimeEnv: input.runtimeEnv,
157
+ callbackToken: input.callbackToken,
158
+ }),
159
+ });
160
+ }
161
+ //# sourceMappingURL=workflowexecution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowexecution.js","sourceRoot":"","sources":["../../src/gen/workflowexecution.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAA0B,MAAM,gEAAgE,CAAC;AACjI,OAAO,EAAE,kCAAkC,EAAE,MAAM,oEAAoE,CAAC;AACxH,OAAO,EAAE,yBAAyB,EAAg2B,MAAM,+DAA+D,CAAC;AACx8B,OAAO,EAAE,gCAAgC,EAAE,MAAM,kEAAkE,CAAC;AACpH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AAEvG,0DAA0D;AAC1D,MAAM,OAAO,uBAAuB;IACjB,OAAO,CAAoD;IAC3D,KAAK,CAAkD;IAExE,YAAY,SAAoB;QAC9B,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,gCAAgC,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAA6B;QACxC,IAAI,CAAC;YACH,OAAO,MAAM,IA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,CAAC;CACF;AAcD,SAAS,2BAA2B,CAAC,KAA6B;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE;QACpD,UAAU,EAAE,uBAAuB;QACnC,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE;YACzD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,GAAG;SACf,CAAC;QACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,EAAE;YACvD,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;YAC5C,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC,CAAC;KACH,CAAsB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type ResourceRef } from "./types";
2
+ import { type Transport } from "@connectrpc/connect";
3
+ import { type WorkflowInstance } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/api_pb";
4
+ import { type GetWorkflowInstancesByWorkflowRequest, type WorkflowInstanceList } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/io_pb";
5
+ /** Provides operations on workflowinstance resources. */
6
+ export declare class WorkflowInstanceClient {
7
+ private readonly command;
8
+ private readonly query;
9
+ constructor(transport: Transport);
10
+ apply(input: WorkflowInstanceInput): Promise<WorkflowInstance>;
11
+ create(input: WorkflowInstanceInput): Promise<WorkflowInstance>;
12
+ update(input: WorkflowInstanceInput): Promise<WorkflowInstance>;
13
+ delete(id: string): Promise<WorkflowInstance>;
14
+ get(id: string): Promise<WorkflowInstance>;
15
+ getByWorkflow(input: GetWorkflowInstancesByWorkflowRequest): Promise<WorkflowInstanceList>;
16
+ getByReference(ref: ResourceRef): Promise<WorkflowInstance>;
17
+ }
18
+ /** Input for creating/updating a WorkflowInstance. */
19
+ export interface WorkflowInstanceInput {
20
+ name: string;
21
+ org: string;
22
+ workflowId?: string;
23
+ description?: string;
24
+ envRefs?: ResourceRef[];
25
+ }
26
+ //# sourceMappingURL=workflowinstance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowinstance.d.ts","sourceRoot":"","sources":["../../src/gen/workflowinstance.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AAE9H,OAAO,EAAqG,KAAK,qCAAqC,EAAE,KAAK,oBAAoB,EAAE,MAAM,8DAA8D,CAAC;AAMxP,yDAAyD;AACzD,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmD;IAC3E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiD;gBAE3D,SAAS,EAAE,SAAS;IAK1B,KAAK,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM9D,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM/D,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM/D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM7C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM1C,aAAa,CAAC,KAAK,EAAE,qCAAqC,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAM1F,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAKlE;AAED,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB"}
@@ -0,0 +1,92 @@
1
+ // Code generated by stigmer-codegen. DO NOT EDIT.
2
+ import { wrapError } from "./errors";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { createClient } from "@connectrpc/connect";
5
+ import { WorkflowInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/api_pb";
6
+ import { WorkflowInstanceCommandController } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/command_pb";
7
+ import { WorkflowInstanceIdSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/io_pb";
8
+ import { WorkflowInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/query_pb";
9
+ import { WorkflowInstanceSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/spec_pb";
10
+ import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
11
+ import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
12
+ /** Provides operations on workflowinstance resources. */
13
+ export class WorkflowInstanceClient {
14
+ command;
15
+ query;
16
+ constructor(transport) {
17
+ this.command = createClient(WorkflowInstanceCommandController, transport);
18
+ this.query = createClient(WorkflowInstanceQueryController, transport);
19
+ }
20
+ async apply(input) {
21
+ try {
22
+ return await this.command.apply(buildWorkflowInstanceProto(input));
23
+ }
24
+ catch (e) {
25
+ throw wrapError(e);
26
+ }
27
+ }
28
+ async create(input) {
29
+ try {
30
+ return await this.command.create(buildWorkflowInstanceProto(input));
31
+ }
32
+ catch (e) {
33
+ throw wrapError(e);
34
+ }
35
+ }
36
+ async update(input) {
37
+ try {
38
+ return await this.command.update(buildWorkflowInstanceProto(input));
39
+ }
40
+ catch (e) {
41
+ throw wrapError(e);
42
+ }
43
+ }
44
+ async delete(id) {
45
+ try {
46
+ return await this.command.delete(create(WorkflowInstanceIdSchema, { value: id }));
47
+ }
48
+ catch (e) {
49
+ throw wrapError(e);
50
+ }
51
+ }
52
+ async get(id) {
53
+ try {
54
+ return await this.query.get(create(WorkflowInstanceIdSchema, { value: id }));
55
+ }
56
+ catch (e) {
57
+ throw wrapError(e);
58
+ }
59
+ }
60
+ async getByWorkflow(input) {
61
+ try {
62
+ return await this.query.getByWorkflow(input);
63
+ }
64
+ catch (e) {
65
+ throw wrapError(e);
66
+ }
67
+ }
68
+ async getByReference(ref) {
69
+ try {
70
+ return await this.query.getByReference(create(ApiResourceReferenceSchema, ref));
71
+ }
72
+ catch (e) {
73
+ throw wrapError(e);
74
+ }
75
+ }
76
+ }
77
+ function buildWorkflowInstanceProto(input) {
78
+ return Object.assign(create(WorkflowInstanceSchema), {
79
+ apiVersion: "agentic.stigmer.ai/v1",
80
+ kind: "WorkflowInstance",
81
+ metadata: Object.assign(create(ApiResourceMetadataSchema), {
82
+ name: input.name,
83
+ org: input.org,
84
+ }),
85
+ spec: Object.assign(create(WorkflowInstanceSpecSchema), {
86
+ workflowId: input.workflowId,
87
+ description: input.description,
88
+ envRefs: input.envRefs,
89
+ }),
90
+ });
91
+ }
92
+ //# sourceMappingURL=workflowinstance.js.map