@stigmer/sdk 1.0.4 → 2.0.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.
Files changed (170) hide show
  1. package/__tests__/gen/invitation-client.test.d.ts +2 -0
  2. package/__tests__/gen/invitation-client.test.d.ts.map +1 -0
  3. package/__tests__/gen/invitation-client.test.js +106 -0
  4. package/__tests__/gen/invitation-client.test.js.map +1 -0
  5. package/__tests__/gen/proto-utils.test.js +41 -1
  6. package/__tests__/gen/proto-utils.test.js.map +1 -1
  7. package/__tests__/gen/session-client.test.js +10 -6
  8. package/__tests__/gen/session-client.test.js.map +1 -1
  9. package/__tests__/stigmer.test.d.ts +2 -0
  10. package/__tests__/stigmer.test.d.ts.map +1 -0
  11. package/__tests__/stigmer.test.js +94 -0
  12. package/__tests__/stigmer.test.js.map +1 -0
  13. package/activity.d.ts +26 -0
  14. package/activity.d.ts.map +1 -0
  15. package/activity.js +30 -0
  16. package/activity.js.map +1 -0
  17. package/billing.d.ts +9 -2
  18. package/billing.d.ts.map +1 -1
  19. package/billing.js +1 -0
  20. package/billing.js.map +1 -1
  21. package/config.d.ts +19 -0
  22. package/config.d.ts.map +1 -1
  23. package/config.js.map +1 -1
  24. package/gen/agent.d.ts +2 -0
  25. package/gen/agent.d.ts.map +1 -1
  26. package/gen/agent.js +1 -0
  27. package/gen/agent.js.map +1 -1
  28. package/gen/agentexecution.d.ts +7 -0
  29. package/gen/agentexecution.d.ts.map +1 -1
  30. package/gen/agentexecution.js +6 -0
  31. package/gen/agentexecution.js.map +1 -1
  32. package/gen/agentinstance.d.ts +4 -0
  33. package/gen/agentinstance.d.ts.map +1 -1
  34. package/gen/agentinstance.js +9 -0
  35. package/gen/agentinstance.js.map +1 -1
  36. package/gen/apikey.d.ts +2 -0
  37. package/gen/apikey.d.ts.map +1 -1
  38. package/gen/apikey.js +4 -2
  39. package/gen/apikey.js.map +1 -1
  40. package/gen/artifact.d.ts +2 -0
  41. package/gen/artifact.d.ts.map +1 -1
  42. package/gen/artifact.js +1 -0
  43. package/gen/artifact.js.map +1 -1
  44. package/gen/authorization-config.d.ts.map +1 -1
  45. package/gen/authorization-config.js +0 -1
  46. package/gen/authorization-config.js.map +1 -1
  47. package/gen/client.d.ts +0 -4
  48. package/gen/client.d.ts.map +1 -1
  49. package/gen/client.js +0 -4
  50. package/gen/client.js.map +1 -1
  51. package/gen/environment.d.ts +2 -0
  52. package/gen/environment.d.ts.map +1 -1
  53. package/gen/environment.js +1 -0
  54. package/gen/environment.js.map +1 -1
  55. package/gen/executioncontext.d.ts +2 -0
  56. package/gen/executioncontext.d.ts.map +1 -1
  57. package/gen/executioncontext.js +1 -0
  58. package/gen/executioncontext.js.map +1 -1
  59. package/gen/iampolicy.d.ts +2 -0
  60. package/gen/iampolicy.d.ts.map +1 -1
  61. package/gen/iampolicy.js +1 -0
  62. package/gen/iampolicy.js.map +1 -1
  63. package/gen/identityaccount.d.ts +2 -0
  64. package/gen/identityaccount.d.ts.map +1 -1
  65. package/gen/identityaccount.js +1 -0
  66. package/gen/identityaccount.js.map +1 -1
  67. package/gen/identityprovider.d.ts +2 -0
  68. package/gen/identityprovider.d.ts.map +1 -1
  69. package/gen/identityprovider.js +1 -0
  70. package/gen/identityprovider.js.map +1 -1
  71. package/gen/invitation.d.ts +2 -0
  72. package/gen/invitation.d.ts.map +1 -1
  73. package/gen/invitation.js +4 -2
  74. package/gen/invitation.js.map +1 -1
  75. package/gen/mcpserver.d.ts +2 -0
  76. package/gen/mcpserver.d.ts.map +1 -1
  77. package/gen/mcpserver.js +1 -0
  78. package/gen/mcpserver.js.map +1 -1
  79. package/gen/oauthapp.d.ts +2 -0
  80. package/gen/oauthapp.d.ts.map +1 -1
  81. package/gen/oauthapp.js +1 -0
  82. package/gen/oauthapp.js.map +1 -1
  83. package/gen/organization.d.ts +2 -0
  84. package/gen/organization.d.ts.map +1 -1
  85. package/gen/organization.js +1 -0
  86. package/gen/organization.js.map +1 -1
  87. package/gen/platformclient.d.ts +2 -0
  88. package/gen/platformclient.d.ts.map +1 -1
  89. package/gen/platformclient.js +4 -2
  90. package/gen/platformclient.js.map +1 -1
  91. package/gen/project.d.ts +2 -0
  92. package/gen/project.d.ts.map +1 -1
  93. package/gen/project.js +1 -0
  94. package/gen/project.js.map +1 -1
  95. package/gen/proto-utils.d.ts +6 -0
  96. package/gen/proto-utils.d.ts.map +1 -1
  97. package/gen/proto-utils.js +9 -0
  98. package/gen/proto-utils.js.map +1 -1
  99. package/gen/session.d.ts +5 -4
  100. package/gen/session.d.ts.map +1 -1
  101. package/gen/session.js +3 -3
  102. package/gen/session.js.map +1 -1
  103. package/gen/skill.d.ts +3 -0
  104. package/gen/skill.d.ts.map +1 -1
  105. package/gen/skill.js +3 -1
  106. package/gen/skill.js.map +1 -1
  107. package/gen/workflow.d.ts +11 -1
  108. package/gen/workflow.d.ts.map +1 -1
  109. package/gen/workflow.js +37 -1
  110. package/gen/workflow.js.map +1 -1
  111. package/gen/workflowexecution.d.ts +4 -0
  112. package/gen/workflowexecution.d.ts.map +1 -1
  113. package/gen/workflowexecution.js +2 -0
  114. package/gen/workflowexecution.js.map +1 -1
  115. package/gen/workflowinstance.d.ts +4 -0
  116. package/gen/workflowinstance.d.ts.map +1 -1
  117. package/gen/workflowinstance.js +9 -0
  118. package/gen/workflowinstance.js.map +1 -1
  119. package/index.d.ts +3 -0
  120. package/index.d.ts.map +1 -1
  121. package/index.js +2 -0
  122. package/index.js.map +1 -1
  123. package/package.json +2 -2
  124. package/runner-adapter.d.ts +22 -0
  125. package/runner-adapter.d.ts.map +1 -0
  126. package/runner-adapter.js +2 -0
  127. package/runner-adapter.js.map +1 -0
  128. package/src/__tests__/gen/invitation-client.test.ts +132 -0
  129. package/src/__tests__/gen/proto-utils.test.ts +47 -1
  130. package/src/__tests__/gen/session-client.test.ts +12 -6
  131. package/src/__tests__/stigmer.test.ts +133 -0
  132. package/src/activity.ts +51 -0
  133. package/src/billing.ts +10 -2
  134. package/src/config.ts +20 -0
  135. package/src/gen/agent.ts +3 -0
  136. package/src/gen/agentexecution.ts +11 -1
  137. package/src/gen/agentinstance.ts +10 -1
  138. package/src/gen/apikey.ts +6 -2
  139. package/src/gen/artifact.ts +3 -0
  140. package/src/gen/authorization-config.ts +0 -1
  141. package/src/gen/client.ts +0 -5
  142. package/src/gen/environment.ts +3 -0
  143. package/src/gen/executioncontext.ts +3 -0
  144. package/src/gen/iampolicy.ts +3 -0
  145. package/src/gen/identityaccount.ts +3 -0
  146. package/src/gen/identityprovider.ts +3 -0
  147. package/src/gen/invitation.ts +6 -2
  148. package/src/gen/mcpserver.ts +3 -0
  149. package/src/gen/oauthapp.ts +3 -0
  150. package/src/gen/organization.ts +3 -0
  151. package/src/gen/platformclient.ts +6 -2
  152. package/src/gen/project.ts +3 -0
  153. package/src/gen/proto-utils.ts +11 -0
  154. package/src/gen/session.ts +8 -7
  155. package/src/gen/skill.ts +6 -1
  156. package/src/gen/workflow.ts +35 -3
  157. package/src/gen/workflowexecution.ts +6 -0
  158. package/src/gen/workflowinstance.ts +10 -1
  159. package/src/index.ts +11 -0
  160. package/src/runner-adapter.ts +21 -0
  161. package/src/stigmer.ts +69 -0
  162. package/stigmer.d.ts +23 -0
  163. package/stigmer.d.ts.map +1 -1
  164. package/stigmer.js +51 -0
  165. package/stigmer.js.map +1 -1
  166. package/gen/runner.d.ts +0 -32
  167. package/gen/runner.d.ts.map +0 -1
  168. package/gen/runner.js +0 -130
  169. package/gen/runner.js.map +0 -1
  170. package/src/gen/runner.ts +0 -122
@@ -11,7 +11,8 @@ import { AgentInstanceIdSchema, GetAgentInstancesByAgentRequestSchema, AgentInst
11
11
  import { AgentInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/query_pb";
12
12
  import { AgentInstanceSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/spec_pb";
13
13
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
14
- import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
14
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
15
+ import { ApiResourceReferenceSchema, type UpdateVisibilityInput } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
15
16
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
16
17
 
17
18
  /** Provides operations on agentinstance resources. */
@@ -42,6 +43,12 @@ export class AgentInstanceClient {
42
43
  } catch (e) { throw wrapError(e); }
43
44
  }
44
45
 
46
+ async updateVisibility(input: UpdateVisibilityInput): Promise<AgentInstance> {
47
+ try {
48
+ return await this.command.updateVisibility(input);
49
+ } catch (e) { throw wrapError(e); }
50
+ }
51
+
45
52
  async delete(id: string): Promise<AgentInstance> {
46
53
  try {
47
54
  return await this.command.delete(create(AgentInstanceIdSchema, { value: id }));
@@ -79,6 +86,7 @@ export interface AgentInstanceInput {
79
86
  slug?: string;
80
87
  org: string;
81
88
  labels?: Record<string, string>;
89
+ visibility?: ApiResourceVisibility;
82
90
  agentId?: string;
83
91
  description?: string;
84
92
  environmentRefs?: ResourceRef[];
@@ -94,6 +102,7 @@ function buildAgentInstanceProto(input: AgentInstanceInput): AgentInstance {
94
102
  org: input.org,
95
103
  ...(input.slug && { slug: input.slug }),
96
104
  ...(input.labels && { labels: input.labels }),
105
+ ...(input.visibility && { visibility: input.visibility }),
97
106
  }),
98
107
  spec: Object.assign(create(AgentInstanceSpecSchema), stripUndefined({
99
108
  agentId: input.agentId,
package/src/gen/apikey.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  // Code generated by stigmer-codegen. DO NOT EDIT.
2
2
 
3
3
  import { wrapError } from "./errors";
4
- import { stripUndefined } from "./proto-utils";
4
+ import { stripUndefined, toTimestamp } from "./proto-utils";
5
5
  import { create } from "@bufbuild/protobuf";
6
6
  import { EmptySchema } from "@bufbuild/protobuf/wkt";
7
7
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
8
9
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
9
10
  import { ApiKeySchema, type ApiKey } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
10
11
  import { ApiKeyCommandController } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/command_pb";
@@ -65,6 +66,7 @@ export interface ApiKeyInput {
65
66
  slug?: string;
66
67
  org: string;
67
68
  labels?: Record<string, string>;
69
+ visibility?: ApiResourceVisibility;
68
70
  keyHash?: string;
69
71
  fingerprint?: string;
70
72
  expiresAt?: Date | string;
@@ -72,6 +74,7 @@ export interface ApiKeyInput {
72
74
  }
73
75
 
74
76
  function buildApiKeyProto(input: ApiKeyInput): ApiKey {
77
+ const expiresAt = input.expiresAt !== undefined ? toTimestamp(input.expiresAt) : undefined;
75
78
  return Object.assign(create(ApiKeySchema), {
76
79
  apiVersion: "iam.stigmer.ai/v1",
77
80
  kind: "ApiKey",
@@ -80,11 +83,12 @@ function buildApiKeyProto(input: ApiKeyInput): ApiKey {
80
83
  org: input.org,
81
84
  ...(input.slug && { slug: input.slug }),
82
85
  ...(input.labels && { labels: input.labels }),
86
+ ...(input.visibility && { visibility: input.visibility }),
83
87
  }),
84
88
  spec: Object.assign(create(ApiKeySpecSchema), stripUndefined({
85
89
  keyHash: input.keyHash,
86
90
  fingerprint: input.fingerprint,
87
- expiresAt: input.expiresAt,
91
+ expiresAt,
88
92
  neverExpires: input.neverExpires,
89
93
  })),
90
94
  }) as ApiKey;
@@ -9,6 +9,7 @@ import { ArtifactCommandController } from "@stigmer/protos/ai/stigmer/agentic/ar
9
9
  import { ArtifactIdSchema, CreateArtifactInputSchema, ListArtifactsByExecutionRequestSchema, ArtifactListSchema, ArtifactDownloadUrlSchema, type CreateArtifactInput, type ListArtifactsByExecutionRequest, type ArtifactList, type ArtifactDownloadUrl } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/io_pb";
10
10
  import { ArtifactQueryController } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/query_pb";
11
11
  import { ArtifactSpecSchema, ArtifactSourceSchema, RetentionPolicySchema } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/spec_pb";
12
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
12
13
  import { ApiResourceIdSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
13
14
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
14
15
 
@@ -59,6 +60,7 @@ export interface ArtifactInput {
59
60
  slug?: string;
60
61
  org: string;
61
62
  labels?: Record<string, string>;
63
+ visibility?: ApiResourceVisibility;
62
64
  contentType: string;
63
65
  displayName: string;
64
66
  source: ArtifactSourceInput;
@@ -102,6 +104,7 @@ function buildArtifactProto(input: ArtifactInput): Artifact {
102
104
  org: input.org,
103
105
  ...(input.slug && { slug: input.slug }),
104
106
  ...(input.labels && { labels: input.labels }),
107
+ ...(input.visibility && { visibility: input.visibility }),
105
108
  }),
106
109
  spec: Object.assign(create(ArtifactSpecSchema), stripUndefined({
107
110
  contentType: input.contentType,
@@ -23,7 +23,6 @@ export const GRANTABLE_ROLES: ReadonlyMap<ApiResourceKind, readonly IamRole[]> =
23
23
  [ApiResourceKind.skill, [IamRole.owner, IamRole.viewer]],
24
24
  [ApiResourceKind.mcp_server, [IamRole.owner, IamRole.viewer]],
25
25
  [ApiResourceKind.agent_instance, [IamRole.owner, IamRole.viewer]],
26
- [ApiResourceKind.runner, [IamRole.owner, IamRole.viewer]],
27
26
  [ApiResourceKind.workflow, [IamRole.owner, IamRole.viewer]],
28
27
  [ApiResourceKind.workflow_instance, [IamRole.owner, IamRole.viewer]],
29
28
  [ApiResourceKind.workflow_execution, [IamRole.owner, IamRole.viewer]],
package/src/gen/client.ts CHANGED
@@ -17,7 +17,6 @@ import { OAuthAppClient } from "./oauthapp";
17
17
  import { OrganizationClient } from "./organization";
18
18
  import { PlatformClientClient } from "./platformclient";
19
19
  import { ProjectClient } from "./project";
20
- import { RunnerClient } from "./runner";
21
20
  import { SessionClient } from "./session";
22
21
  import { SkillClient } from "./skill";
23
22
  import { WorkflowClient } from "./workflow";
@@ -42,7 +41,6 @@ export class GeneratedClient {
42
41
  readonly organization: OrganizationClient;
43
42
  readonly platformclient: PlatformClientClient;
44
43
  readonly project: ProjectClient;
45
- readonly runner: RunnerClient;
46
44
  readonly session: SessionClient;
47
45
  readonly skill: SkillClient;
48
46
  readonly workflow: WorkflowClient;
@@ -66,7 +64,6 @@ export class GeneratedClient {
66
64
  this.organization = new OrganizationClient(transport);
67
65
  this.platformclient = new PlatformClientClient(transport);
68
66
  this.project = new ProjectClient(transport);
69
- this.runner = new RunnerClient(transport);
70
67
  this.session = new SessionClient(transport);
71
68
  this.skill = new SkillClient(transport);
72
69
  this.workflow = new WorkflowClient(transport);
@@ -108,8 +105,6 @@ export { PlatformClientClient } from "./platformclient";
108
105
  export { type PlatformClientInput } from "./platformclient";
109
106
  export { ProjectClient } from "./project";
110
107
  export { type ProjectInput } from "./project";
111
- export { RunnerClient } from "./runner";
112
- export { type RunnerInput } from "./runner";
113
108
  export { SessionClient } from "./session";
114
109
  export { type SessionInput, type WorkspaceEntryInput, type WorkspaceSourceInput, type GitRepoSourceInput, type LocalPathSourceInput } from "./session";
115
110
  export { SkillClient } from "./skill";
@@ -11,6 +11,7 @@ import { UpdateEnvironmentVariablesRequestSchema, RemoveEnvironmentVariablesRequ
11
11
  import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
12
12
  import { EnvironmentValueSchema, EnvironmentSpecSchema, type EnvironmentValue } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/spec_pb";
13
13
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
14
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
14
15
  import { ApiResourceIdSchema, ApiResourceReferenceSchema, ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
15
16
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
16
17
 
@@ -95,6 +96,7 @@ export interface EnvironmentInput {
95
96
  slug?: string;
96
97
  org: string;
97
98
  labels?: Record<string, string>;
99
+ visibility?: ApiResourceVisibility;
98
100
  description?: string;
99
101
  data?: Record<string, EnvVarInput>;
100
102
  }
@@ -113,6 +115,7 @@ function buildEnvironmentProto(input: EnvironmentInput): Environment {
113
115
  org: input.org,
114
116
  ...(input.slug && { slug: input.slug }),
115
117
  ...(input.labels && { labels: input.labels }),
118
+ ...(input.visibility && { visibility: input.visibility }),
116
119
  }),
117
120
  spec: Object.assign(create(EnvironmentSpecSchema), stripUndefined({
118
121
  description: input.description,
@@ -11,6 +11,7 @@ import { ExecutionContextIdSchema, ExecutionContextExecutionIdInputSchema, type
11
11
  import { ExecutionContextQueryController } from "@stigmer/protos/ai/stigmer/agentic/executioncontext/v1/query_pb";
12
12
  import { ExecutionContextSpecSchema, ExecutionValueSchema } from "@stigmer/protos/ai/stigmer/agentic/executioncontext/v1/spec_pb";
13
13
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
14
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
14
15
  import { ApiResourceReferenceSchema, ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
15
16
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
16
17
 
@@ -71,6 +72,7 @@ export interface ExecutionContextInput {
71
72
  slug?: string;
72
73
  org: string;
73
74
  labels?: Record<string, string>;
75
+ visibility?: ApiResourceVisibility;
74
76
  executionId?: string;
75
77
  data?: Record<string, EnvVarInput>;
76
78
  }
@@ -89,6 +91,7 @@ function buildExecutionContextProto(input: ExecutionContextInput): ExecutionCont
89
91
  org: input.org,
90
92
  ...(input.slug && { slug: input.slug }),
91
93
  ...(input.labels && { labels: input.labels }),
94
+ ...(input.visibility && { visibility: input.visibility }),
92
95
  }),
93
96
  spec: Object.assign(create(ExecutionContextSpecSchema), stripUndefined({
94
97
  executionId: input.executionId,
@@ -4,6 +4,7 @@ import { wrapError } from "./errors";
4
4
  import { stripUndefined } from "./proto-utils";
5
5
  import { create } from "@bufbuild/protobuf";
6
6
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
7
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
7
8
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
8
9
  import { IamPolicySchema, type IamPolicy } from "@stigmer/protos/ai/stigmer/iam/iampolicy/v1/api_pb";
9
10
  import { IamPolicyCommandController } from "@stigmer/protos/ai/stigmer/iam/iampolicy/v1/command_pb";
@@ -100,6 +101,7 @@ export interface IamPolicyInput {
100
101
  slug?: string;
101
102
  org: string;
102
103
  labels?: Record<string, string>;
104
+ visibility?: ApiResourceVisibility;
103
105
  principal: ApiResourceRefInput;
104
106
  resource: ApiResourceRefInput;
105
107
  relation: string;
@@ -131,6 +133,7 @@ function buildIamPolicyProto(input: IamPolicyInput): IamPolicy {
131
133
  org: input.org,
132
134
  ...(input.slug && { slug: input.slug }),
133
135
  ...(input.labels && { labels: input.labels }),
136
+ ...(input.visibility && { visibility: input.visibility }),
134
137
  }),
135
138
  spec: Object.assign(create(IamPolicySpecSchema), stripUndefined({
136
139
  principal,
@@ -6,6 +6,7 @@ import { type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { EmptySchema } from "@bufbuild/protobuf/wkt";
8
8
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { type ApiResourceAuditActor } from "@stigmer/protos/ai/stigmer/commons/apiresource/status_pb";
@@ -111,6 +112,7 @@ export interface IdentityAccountInput {
111
112
  slug?: string;
112
113
  org: string;
113
114
  labels?: Record<string, string>;
115
+ visibility?: ApiResourceVisibility;
114
116
  idpId: string;
115
117
  email?: string;
116
118
  firstName?: string;
@@ -131,6 +133,7 @@ function buildIdentityAccountProto(input: IdentityAccountInput): IdentityAccount
131
133
  org: input.org,
132
134
  ...(input.slug && { slug: input.slug }),
133
135
  ...(input.labels && { labels: input.labels }),
136
+ ...(input.visibility && { visibility: input.visibility }),
134
137
  }),
135
138
  spec: Object.assign(create(IdentityAccountSpecSchema), stripUndefined({
136
139
  idpId: input.idpId,
@@ -6,6 +6,7 @@ import { type DeleteResourceInput, type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
8
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceIdSchema, ApiResourceReferenceSchema, ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { IdentityProviderSchema, type IdentityProvider } from "@stigmer/protos/ai/stigmer/iam/identityprovider/v1/api_pb";
@@ -84,6 +85,7 @@ export interface IdentityProviderInput {
84
85
  slug?: string;
85
86
  org: string;
86
87
  labels?: Record<string, string>;
88
+ visibility?: ApiResourceVisibility;
87
89
  displayName?: string;
88
90
  jwksUri?: string;
89
91
  allowedIssuers?: string[];
@@ -107,6 +109,7 @@ function buildIdentityProviderProto(input: IdentityProviderInput): IdentityProvi
107
109
  org: input.org,
108
110
  ...(input.slug && { slug: input.slug }),
109
111
  ...(input.labels && { labels: input.labels }),
112
+ ...(input.visibility && { visibility: input.visibility }),
110
113
  }),
111
114
  spec: Object.assign(create(IdentityProviderSpecSchema), stripUndefined({
112
115
  displayName: input.displayName,
@@ -1,9 +1,10 @@
1
1
  // Code generated by stigmer-codegen. DO NOT EDIT.
2
2
 
3
3
  import { wrapError } from "./errors";
4
- import { stripUndefined } from "./proto-utils";
4
+ import { stripUndefined, toTimestamp } from "./proto-utils";
5
5
  import { create } from "@bufbuild/protobuf";
6
6
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
7
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
7
8
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
8
9
  import { InvitationSchema, type Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
9
10
  import { InvitationCommandController } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/command_pb";
@@ -65,6 +66,7 @@ export interface InvitationInput {
65
66
  slug?: string;
66
67
  org: string;
67
68
  labels?: Record<string, string>;
69
+ visibility?: ApiResourceVisibility;
68
70
  role: IamRole;
69
71
  maxRedemptions?: number;
70
72
  expiresAt: Date | string;
@@ -72,6 +74,7 @@ export interface InvitationInput {
72
74
  }
73
75
 
74
76
  function buildInvitationProto(input: InvitationInput): Invitation {
77
+ const expiresAt = input.expiresAt !== undefined ? toTimestamp(input.expiresAt) : undefined;
75
78
  return Object.assign(create(InvitationSchema), {
76
79
  apiVersion: "iam.stigmer.ai/v1",
77
80
  kind: "Invitation",
@@ -80,11 +83,12 @@ function buildInvitationProto(input: InvitationInput): Invitation {
80
83
  org: input.org,
81
84
  ...(input.slug && { slug: input.slug }),
82
85
  ...(input.labels && { labels: input.labels }),
86
+ ...(input.visibility && { visibility: input.visibility }),
83
87
  }),
84
88
  spec: Object.assign(create(InvitationSpecSchema), stripUndefined({
85
89
  role: input.role,
86
90
  maxRedemptions: input.maxRedemptions,
87
- expiresAt: input.expiresAt,
91
+ expiresAt,
88
92
  label: input.label,
89
93
  })),
90
94
  }) as Invitation;
@@ -12,6 +12,7 @@ import { ConnectInputSchema, InitiateOAuthConnectInputSchema, InitiateOAuthConne
12
12
  import { McpServerQueryController } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/query_pb";
13
13
  import { McpServerSpecSchema, StdioServerConfigSchema, HttpServerConfigSchema, ToolApprovalPolicySchema, McpServerAuthSchema } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/spec_pb";
14
14
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
15
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
15
16
  import { ApiResourceIdSchema, ApiResourceReferenceSchema, ApiResourceDeleteInputSchema, type UpdateVisibilityInput } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
16
17
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
17
18
  import { PageInfoSchema } from "@stigmer/protos/ai/stigmer/commons/rpc/pagination_pb";
@@ -149,6 +150,7 @@ export interface McpServerInput {
149
150
  slug?: string;
150
151
  org: string;
151
152
  labels?: Record<string, string>;
153
+ visibility?: ApiResourceVisibility;
152
154
  description?: string;
153
155
  iconUrl?: string;
154
156
  stdio?: StdioServerConfigInput;
@@ -270,6 +272,7 @@ function buildMcpServerProto(input: McpServerInput): McpServer {
270
272
  org: input.org,
271
273
  ...(input.slug && { slug: input.slug }),
272
274
  ...(input.labels && { labels: input.labels }),
275
+ ...(input.visibility && { visibility: input.visibility }),
273
276
  }),
274
277
  spec,
275
278
  }) as McpServer;
@@ -6,6 +6,7 @@ import { type DeleteResourceInput, type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
8
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceIdSchema, ApiResourceReferenceSchema, ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { OAuthAppSchema, type OAuthApp } from "@stigmer/protos/ai/stigmer/iam/oauthapp/v1/api_pb";
@@ -77,6 +78,7 @@ export interface OAuthAppInput {
77
78
  slug?: string;
78
79
  org: string;
79
80
  labels?: Record<string, string>;
81
+ visibility?: ApiResourceVisibility;
80
82
  provider?: string;
81
83
  clientId?: string;
82
84
  clientSecret?: string;
@@ -98,6 +100,7 @@ function buildOAuthAppProto(input: OAuthAppInput): OAuthApp {
98
100
  org: input.org,
99
101
  ...(input.slug && { slug: input.slug }),
100
102
  ...(input.labels && { labels: input.labels }),
103
+ ...(input.visibility && { visibility: input.visibility }),
101
104
  }),
102
105
  spec: Object.assign(create(OAuthAppSpecSchema), stripUndefined({
103
106
  provider: input.provider,
@@ -6,6 +6,7 @@ import { type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { EmptySchema } from "@bufbuild/protobuf/wkt";
8
8
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceReferenceSchema, type FindApiResourcesRequest } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { OrganizationSchema, type Organization } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
@@ -80,6 +81,7 @@ export interface OrganizationInput {
80
81
  slug?: string;
81
82
  org: string;
82
83
  labels?: Record<string, string>;
84
+ visibility?: ApiResourceVisibility;
83
85
  description?: string;
84
86
  logoUrl?: string;
85
87
  managementMode?: ManagementMode;
@@ -98,6 +100,7 @@ function buildOrganizationProto(input: OrganizationInput): Organization {
98
100
  org: input.org,
99
101
  ...(input.slug && { slug: input.slug }),
100
102
  ...(input.labels && { labels: input.labels }),
103
+ ...(input.visibility && { visibility: input.visibility }),
101
104
  }),
102
105
  spec: Object.assign(create(OrganizationSpecSchema), stripUndefined({
103
106
  description: input.description,
@@ -1,11 +1,12 @@
1
1
  // Code generated by stigmer-codegen. DO NOT EDIT.
2
2
 
3
3
  import { wrapError } from "./errors";
4
- import { stripUndefined } from "./proto-utils";
4
+ import { stripUndefined, toTimestamp } from "./proto-utils";
5
5
  import { type DeleteResourceInput, type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
8
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceIdSchema, ApiResourceReferenceSchema, ApiResourceDeleteInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { PlatformClientSchema, type PlatformClient } from "@stigmer/protos/ai/stigmer/iam/platformclient/v1/api_pb";
@@ -87,6 +88,7 @@ export interface PlatformClientInput {
87
88
  slug?: string;
88
89
  org: string;
89
90
  labels?: Record<string, string>;
91
+ visibility?: ApiResourceVisibility;
90
92
  clientId?: string;
91
93
  clientSecretHash?: string;
92
94
  secretFingerprint?: string;
@@ -99,6 +101,7 @@ export interface PlatformClientInput {
99
101
  }
100
102
 
101
103
  function buildPlatformClientProto(input: PlatformClientInput): PlatformClient {
104
+ const expiresAt = input.expiresAt !== undefined ? toTimestamp(input.expiresAt) : undefined;
102
105
  return Object.assign(create(PlatformClientSchema), {
103
106
  apiVersion: "iam.stigmer.ai/v1",
104
107
  kind: "PlatformClient",
@@ -107,12 +110,13 @@ function buildPlatformClientProto(input: PlatformClientInput): PlatformClient {
107
110
  org: input.org,
108
111
  ...(input.slug && { slug: input.slug }),
109
112
  ...(input.labels && { labels: input.labels }),
113
+ ...(input.visibility && { visibility: input.visibility }),
110
114
  }),
111
115
  spec: Object.assign(create(PlatformClientSpecSchema), stripUndefined({
112
116
  clientId: input.clientId,
113
117
  clientSecretHash: input.clientSecretHash,
114
118
  secretFingerprint: input.secretFingerprint,
115
- expiresAt: input.expiresAt,
119
+ expiresAt,
116
120
  neverExpires: input.neverExpires,
117
121
  autoProvisionAccounts: input.autoProvisionAccounts,
118
122
  autoGrantOnOrg: input.autoGrantOnOrg,
@@ -6,6 +6,7 @@ import { type ResourceRef } from "./types";
6
6
  import { create } from "@bufbuild/protobuf";
7
7
  import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
8
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
9
10
  import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
10
11
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
11
12
  import { ProjectSchema, type Project } from "@stigmer/protos/ai/stigmer/tenancy/project/v1/api_pb";
@@ -67,6 +68,7 @@ export interface ProjectInput {
67
68
  slug?: string;
68
69
  org: string;
69
70
  labels?: Record<string, string>;
71
+ visibility?: ApiResourceVisibility;
70
72
  entryPoint?: string;
71
73
  description?: string;
72
74
  members?: ResourceRef[];
@@ -82,6 +84,7 @@ function buildProjectProto(input: ProjectInput): Project {
82
84
  org: input.org,
83
85
  ...(input.slug && { slug: input.slug }),
84
86
  ...(input.labels && { labels: input.labels }),
87
+ ...(input.visibility && { visibility: input.visibility }),
85
88
  }),
86
89
  spec: Object.assign(create(ProjectSpecSchema), stripUndefined({
87
90
  entryPoint: input.entryPoint,
@@ -1,5 +1,7 @@
1
1
  // Code generated by stigmer-codegen. DO NOT EDIT.
2
2
 
3
+ import { timestampFromDate, type Timestamp } from "@bufbuild/protobuf/wkt";
4
+
3
5
  /**
4
6
  * Remove keys whose values are `undefined` so that `Object.assign`
5
7
  * does not overwrite protobuf default values (empty maps, empty arrays).
@@ -13,3 +15,12 @@ export function stripUndefined<T extends Record<string, unknown>>(obj: T): Parti
13
15
  }
14
16
  return result as Partial<T>;
15
17
  }
18
+
19
+ /**
20
+ * Convert a Date or ISO-8601 string to a protobuf Timestamp message.
21
+ * Accepts both `Date` objects and ISO string representations.
22
+ */
23
+ export function toTimestamp(value: Date | string): Timestamp {
24
+ const date = value instanceof Date ? value : new Date(value);
25
+ return timestampFromDate(date);
26
+ }
@@ -8,11 +8,12 @@ import { createClient, type Client, type Transport } from "@connectrpc/connect";
8
8
  import { ToolApprovalOverrideSchema, McpServerUsageSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/spec_pb";
9
9
  import { SessionSchema, type Session } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
10
10
  import { SessionCommandController } from "@stigmer/protos/ai/stigmer/agentic/session/v1/command_pb";
11
- import { Harness, CursorMode, GitWriteBackMode } from "@stigmer/protos/ai/stigmer/agentic/session/v1/enum_pb";
11
+ import { Harness, CursorMode, ExecutionTarget, GitWriteBackMode } from "@stigmer/protos/ai/stigmer/agentic/session/v1/enum_pb";
12
12
  import { SessionIdSchema, UpdateSessionSubjectRequestSchema, UpdateSessionMemoryRequestSchema, ListSessionsRequestSchema, SessionListSchema, ListSessionsByAgentRequestSchema, type UpdateSessionSubjectRequest, type UpdateSessionMemoryRequest, type ListSessionsRequest, type SessionList, type ListSessionsByAgentRequest } from "@stigmer/protos/ai/stigmer/agentic/session/v1/io_pb";
13
13
  import { SessionQueryController } from "@stigmer/protos/ai/stigmer/agentic/session/v1/query_pb";
14
14
  import { SessionSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/session/v1/spec_pb";
15
15
  import { GitRepoSourceSchema, LocalPathSourceSchema, WorkspaceSourceSchema, WorkspaceEntrySchema } from "@stigmer/protos/ai/stigmer/agentic/session/v1/workspace_pb";
16
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
16
17
  import { ApiResourceReferenceSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
17
18
  import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
18
19
 
@@ -87,17 +88,17 @@ export interface SessionInput {
87
88
  slug?: string;
88
89
  org: string;
89
90
  labels?: Record<string, string>;
91
+ visibility?: ApiResourceVisibility;
90
92
  agentInstanceId?: string;
91
93
  subject?: string;
92
- threadId?: string;
93
- sandboxId?: string;
94
+ harnessStateId?: string;
94
95
  metadata?: Record<string, string>;
95
96
  workspaceEntries?: WorkspaceEntryInput[];
96
97
  mcpServerUsages?: McpServerUsageInput[];
97
- runnerId?: string;
98
98
  skillRefs?: ResourceRef[];
99
99
  harness?: Harness;
100
100
  cursorMode?: CursorMode;
101
+ executionTarget?: ExecutionTarget;
101
102
  }
102
103
 
103
104
  /** SDK input type for WorkspaceEntry. */
@@ -201,19 +202,19 @@ function buildSessionProto(input: SessionInput): Session {
201
202
  org: input.org,
202
203
  ...(input.slug && { slug: input.slug }),
203
204
  ...(input.labels && { labels: input.labels }),
205
+ ...(input.visibility && { visibility: input.visibility }),
204
206
  }),
205
207
  spec: Object.assign(create(SessionSpecSchema), stripUndefined({
206
208
  agentInstanceId: input.agentInstanceId,
207
209
  subject: input.subject,
208
- threadId: input.threadId,
209
- sandboxId: input.sandboxId,
210
+ harnessStateId: input.harnessStateId,
210
211
  metadata: input.metadata,
211
212
  workspaceEntries,
212
213
  mcpServerUsages,
213
- runnerId: input.runnerId,
214
214
  skillRefs,
215
215
  harness: input.harness,
216
216
  cursorMode: input.cursorMode,
217
+ executionTarget: input.executionTarget,
217
218
  })),
218
219
  }) as Session;
219
220
  }
package/src/gen/skill.ts CHANGED
@@ -11,8 +11,9 @@ import { SkillIdSchema, PushSkillRequestSchema, PushSkillFromExecutionArtifactRe
11
11
  import { SkillQueryController } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/query_pb";
12
12
  import { SkillSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/spec_pb";
13
13
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
14
+ import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
14
15
  import { ApiResourceReferenceSchema, type UpdateVisibilityInput } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
15
- import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
16
+ import { ApiResourceMetadataSchema, ApiResourceMetadataVersionSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
16
17
  import { PageInfoSchema } from "@stigmer/protos/ai/stigmer/commons/rpc/pagination_pb";
17
18
  import { SearchRequestSchema } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
18
19
  import { SearchService } from "@stigmer/protos/ai/stigmer/search/v1/query_pb";
@@ -102,6 +103,8 @@ export interface SkillInput {
102
103
  slug?: string;
103
104
  org: string;
104
105
  labels?: Record<string, string>;
106
+ visibility?: ApiResourceVisibility;
107
+ versionMessage?: string;
105
108
  skillMd?: string;
106
109
  tag?: string;
107
110
  description?: string;
@@ -116,6 +119,8 @@ function buildSkillProto(input: SkillInput): Skill {
116
119
  org: input.org,
117
120
  ...(input.slug && { slug: input.slug }),
118
121
  ...(input.labels && { labels: input.labels }),
122
+ ...(input.visibility && { visibility: input.visibility }),
123
+ ...(input.versionMessage && { version: Object.assign(create(ApiResourceMetadataVersionSchema), { message: input.versionMessage }) }),
119
124
  }),
120
125
  spec: Object.assign(create(SkillSpecSchema), stripUndefined({
121
126
  skillMd: input.skillMd,