@orchestraworks/cli 0.5.2 → 0.5.4

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 (128) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/api/compute-provider-check.d.ts +29 -0
  3. package/dist/cli/api/compute-provider-check.js +207 -0
  4. package/dist/cli/api/tail.d.ts +66 -0
  5. package/dist/cli/api/tail.js +564 -0
  6. package/dist/cli/main.d.ts +5 -1
  7. package/dist/cli/main.js +22 -0
  8. package/dist/constructs/agent.d.ts +10 -0
  9. package/dist/constructs/agent.js +39 -4
  10. package/dist/constructs/environment.d.ts +29 -1
  11. package/dist/constructs/environment.js +28 -1
  12. package/dist/constructs/skill.d.ts +6 -1
  13. package/dist/constructs/skill.js +21 -2
  14. package/dist/engine/reconcile.js +15 -1
  15. package/dist/generated/cli-commands.json +1646 -198
  16. package/dist/generated/cli-dispatch.js +9 -0
  17. package/dist/generated/managed-skills.d.ts +2 -0
  18. package/dist/generated/managed-skills.js +18 -0
  19. package/dist/index.d.ts +1 -1
  20. package/docs/REFERENCE.md +21 -1
  21. package/node_modules/@orchestraworks/client/dist/apis/OrganizationInvitationsApi.d.ts +29 -0
  22. package/node_modules/@orchestraworks/client/dist/apis/OrganizationInvitationsApi.js +96 -0
  23. package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationInvitationsApi.d.ts +29 -0
  24. package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationInvitationsApi.js +96 -0
  25. package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProvider.d.ts +3 -3
  26. package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.d.ts +13 -0
  27. package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.js +5 -0
  28. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationInvitationRequest.d.ts +2 -2
  29. package/node_modules/@orchestraworks/client/dist/esm/models/Environment.d.ts +13 -0
  30. package/node_modules/@orchestraworks/client/dist/esm/models/Environment.js +5 -0
  31. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHook.d.ts +38 -0
  32. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHook.js +45 -0
  33. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooks.d.ts +39 -0
  34. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooks.js +44 -0
  35. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooksRequest.d.ts +39 -0
  36. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooksRequest.js +44 -0
  37. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentProvisionSpec.d.ts +2 -1
  38. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentProvisionSpecRequest.d.ts +2 -1
  39. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentSnapshot.d.ts +19 -0
  40. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentSnapshot.js +7 -0
  41. package/node_modules/@orchestraworks/client/dist/esm/models/Machine.d.ts +7 -1
  42. package/node_modules/@orchestraworks/client/dist/esm/models/Machine.js +2 -0
  43. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationAuthPolicy.d.ts +1 -1
  44. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.d.ts +14 -1
  45. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.js +8 -1
  46. package/node_modules/@orchestraworks/client/dist/esm/models/Principal.d.ts +6 -0
  47. package/node_modules/@orchestraworks/client/dist/esm/models/Principal.js +2 -0
  48. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateEnvironmentRequest.d.ts +13 -0
  49. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateEnvironmentRequest.js +5 -0
  50. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.d.ts +2 -1
  51. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.js +2 -1
  52. package/node_modules/@orchestraworks/client/dist/esm/models/User.d.ts +6 -0
  53. package/node_modules/@orchestraworks/client/dist/esm/models/User.js +4 -0
  54. package/node_modules/@orchestraworks/client/dist/esm/models/index.d.ts +3 -0
  55. package/node_modules/@orchestraworks/client/dist/esm/models/index.js +3 -0
  56. package/node_modules/@orchestraworks/client/dist/models/ComputeProvider.d.ts +3 -3
  57. package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.d.ts +13 -0
  58. package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.js +5 -0
  59. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationInvitationRequest.d.ts +2 -2
  60. package/node_modules/@orchestraworks/client/dist/models/Environment.d.ts +13 -0
  61. package/node_modules/@orchestraworks/client/dist/models/Environment.js +5 -0
  62. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHook.d.ts +38 -0
  63. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHook.js +52 -0
  64. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooks.d.ts +39 -0
  65. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooks.js +51 -0
  66. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooksRequest.d.ts +39 -0
  67. package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooksRequest.js +51 -0
  68. package/node_modules/@orchestraworks/client/dist/models/EnvironmentProvisionSpec.d.ts +2 -1
  69. package/node_modules/@orchestraworks/client/dist/models/EnvironmentProvisionSpecRequest.d.ts +2 -1
  70. package/node_modules/@orchestraworks/client/dist/models/EnvironmentSnapshot.d.ts +19 -0
  71. package/node_modules/@orchestraworks/client/dist/models/EnvironmentSnapshot.js +7 -0
  72. package/node_modules/@orchestraworks/client/dist/models/Machine.d.ts +7 -1
  73. package/node_modules/@orchestraworks/client/dist/models/Machine.js +2 -0
  74. package/node_modules/@orchestraworks/client/dist/models/OrganizationAuthPolicy.d.ts +1 -1
  75. package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.d.ts +14 -1
  76. package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.js +8 -1
  77. package/node_modules/@orchestraworks/client/dist/models/Principal.d.ts +6 -0
  78. package/node_modules/@orchestraworks/client/dist/models/Principal.js +2 -0
  79. package/node_modules/@orchestraworks/client/dist/models/UpdateEnvironmentRequest.d.ts +13 -0
  80. package/node_modules/@orchestraworks/client/dist/models/UpdateEnvironmentRequest.js +5 -0
  81. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.d.ts +2 -1
  82. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.js +2 -1
  83. package/node_modules/@orchestraworks/client/dist/models/User.d.ts +6 -0
  84. package/node_modules/@orchestraworks/client/dist/models/User.js +4 -0
  85. package/node_modules/@orchestraworks/client/dist/models/index.d.ts +3 -0
  86. package/node_modules/@orchestraworks/client/dist/models/index.js +3 -0
  87. package/node_modules/@orchestraworks/client/package.json +1 -1
  88. package/package.json +4 -4
  89. package/skills/orchestra/SKILL.md +167 -42
  90. package/skills/orchestra-fdk/SKILL.md +112 -545
  91. package/skills/orchestra-fdk/references/authoring.md +29 -2
  92. package/skills/orchestra-fdk/references/environment.md +295 -41
  93. package/skills/orchestra-fdk/references/integrations/analytics.md +18 -0
  94. package/skills/orchestra-fdk/references/integrations/ci-cd.md +20 -0
  95. package/skills/orchestra-fdk/references/integrations/cloud.md +19 -0
  96. package/skills/orchestra-fdk/references/integrations/code-repo.md +76 -0
  97. package/skills/orchestra-fdk/references/integrations/databases.md +22 -0
  98. package/skills/orchestra-fdk/references/integrations/dependencies.md +29 -0
  99. package/skills/orchestra-fdk/references/integrations/design.md +18 -0
  100. package/skills/orchestra-fdk/references/integrations/feature-flags.md +19 -0
  101. package/skills/orchestra-fdk/references/integrations/incident.md +29 -0
  102. package/skills/orchestra-fdk/references/integrations/issue-tracker.md +65 -0
  103. package/skills/orchestra-fdk/references/integrations/knowledge-base.md +43 -0
  104. package/skills/orchestra-fdk/references/integrations/messaging.md +38 -0
  105. package/skills/orchestra-fdk/references/integrations/observability.md +36 -0
  106. package/skills/orchestra-fdk/references/integrations/secrets-managers.md +25 -0
  107. package/skills/orchestra-fdk/references/integrations/support-desk.md +31 -0
  108. package/skills/orchestra-fdk/references/phases/0-start.md +62 -0
  109. package/skills/orchestra-fdk/references/phases/1-discover.md +111 -0
  110. package/skills/orchestra-fdk/references/phases/2-plan.md +157 -0
  111. package/skills/orchestra-fdk/references/phases/3-connect.md +99 -0
  112. package/skills/orchestra-fdk/references/phases/4-build.md +159 -0
  113. package/skills/orchestra-fdk/references/phases/5-prove.md +107 -0
  114. package/skills/orchestra-fdk/references/phases/6-handover.md +42 -0
  115. package/skills/orchestra-fdk/references/troubleshooting.md +128 -0
  116. package/templates/bug-fix/agents/bugfix.md +1 -1
  117. package/templates/bug-fix/main.ts +1 -1
  118. package/templates/engineering-team/README.md +45 -181
  119. package/templates/engineering-team/agents/engineer-agent.md +10 -7
  120. package/templates/engineering-team/agents/manager-agent.md +23 -120
  121. package/templates/engineering-team/inputs.json +1 -3
  122. package/templates/engineering-team/lib/environment.ts +10 -90
  123. package/templates/engineering-team/lib/inputs.ts +5 -97
  124. package/templates/engineering-team/main.ts +22 -69
  125. package/templates/todo-factory/agents/bugfix.md +1 -1
  126. package/templates/todo-factory/main.ts +1 -1
  127. package/templates/engineering-team/agents/engineer-bare.md +0 -22
  128. package/templates/engineering-team/onboarding/create-score-metrics.sh +0 -33
@@ -291,6 +291,10 @@ export const CLI_DISPATCH = {
291
291
  createWorkItemActivityRequest: bind(args.body),
292
292
  xOrganizationId: args.organizationId,
293
293
  }),
294
+ declineInvitation: (apis, args) => apis.organizationInvitations.declineInvitationRaw({
295
+ id: bind(args.pathParams["id"]),
296
+ xOrganizationId: args.organizationId,
297
+ }),
294
298
  deleteAgent: (apis, args) => apis.agents.deleteAgentRaw({
295
299
  id: bind(args.pathParams["id"]),
296
300
  xOrganizationId: args.organizationId,
@@ -718,6 +722,11 @@ export const CLI_DISPATCH = {
718
722
  projectId: bind(args.query["projectId"]),
719
723
  xOrganizationId: args.organizationId,
720
724
  }),
725
+ listCallerInvitations: (apis, args) => apis.organizationInvitations.listCallerInvitationsRaw({
726
+ page: bind(args.query["page"]),
727
+ limit: bind(args.query["limit"]),
728
+ xOrganizationId: args.organizationId,
729
+ }),
721
730
  listComments: (apis, args) => apis.artifacts.listCommentsRaw({
722
731
  id: bind(args.pathParams["id"]),
723
732
  page: bind(args.query["page"]),
@@ -0,0 +1,2 @@
1
+ /** The ids of the skills the platform manages, which the kit adds to each agent's skills at synth. */
2
+ export declare const MANAGED_SKILL_IDS: readonly string[];
@@ -0,0 +1,18 @@
1
+ // GENERATED — do not edit; run node scripts/generate-catalog-skills.mjs
2
+ //
3
+ // Source: PlatformSkillDefinition.declared in the platform, the skills every stack serves.
4
+ /** The ids of the skills the platform manages, which the kit adds to each agent's skills at synth. */
5
+ export const MANAGED_SKILL_IDS = Object.freeze([
6
+ "skill_artifacts",
7
+ "skill_code-review",
8
+ "skill_visualize",
9
+ "skill_assessment",
10
+ "skill_bug-fixing",
11
+ "skill_feature-development",
12
+ "skill_progress-report",
13
+ "skill_incident-response",
14
+ "skill_migrations",
15
+ "skill_code-quality",
16
+ "skill_hardening",
17
+ "skill_data-analytics",
18
+ ]);
package/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export type { GatewayKeyProps } from "./constructs/gateway-key.js";
29
29
  export { ModelProviderKey } from "./constructs/model-provider-key.js";
30
30
  export type { ModelProviderKeyProps } from "./constructs/model-provider-key.js";
31
31
  export { EgressPolicy, Environment, basic, bearer, header, inject, } from "./constructs/environment.js";
32
- export type { AllowConnectionOptions, DenyRuleOptions, DiskMount, EnvironmentProps, IngressEndpoint, PlatformSpec, ResourceSpec, RouteModelsViaGatewayOptions, VolumeMount, } from "./constructs/environment.js";
32
+ export type { AllowConnectionOptions, DenyRuleOptions, DiskMount, EnvironmentHook, EnvironmentHooks, EnvironmentProps, IngressEndpoint, PlatformSpec, ResourceSpec, RouteModelsViaGatewayOptions, VolumeMount, } from "./constructs/environment.js";
33
33
  export { egressPreset } from "./constructs/egress-preset.js";
34
34
  export type { EgressRuleBundle, PresetRule } from "./constructs/egress-preset.js";
35
35
  export { Agent } from "./constructs/agent.js";
package/docs/REFERENCE.md CHANGED
@@ -188,7 +188,7 @@ fitting a starter to your codebase.
188
188
  ### Start from another starter: `orchestra fdk init --template <name>`
189
189
 
190
190
  The kit carries more than one starter. `engineering-team` is a factory for one engineering team: a Manager
191
- Agent and Engineer Agents sm, md and lg, their machines, and four pipelines. A starter other than `bug-fix`
191
+ Agent and Engineer Agents sm, md and lg, their machines, and three pipelines. A starter other than `bug-fix`
192
192
  brings its own `package.json`, so run it in a new, empty folder, with nothing installed:
193
193
 
194
194
  ```bash
@@ -1109,6 +1109,25 @@ and polls until the grant activates — you finish it in your own signed-in brow
1109
1109
  what the platform's authenticated callback requires. `--timeout 0` mints and prints without waiting. Grants
1110
1110
  carry lifecycle metadata only; no surface ever reads the credential back.
1111
1111
 
1112
+ ### Check a Launcher (`orchestra compute-providers check`)
1113
+
1114
+ A Launcher is the program that runs machines in your own cloud. It polls the platform once a second
1115
+ for its compute provider record. When it does not run machines, run this command first:
1116
+
1117
+ ```bash
1118
+ orchestra compute-providers check azure-east
1119
+ ```
1120
+
1121
+ The command reads the record once. It shows the record's name and state (`connected`, `silent` or
1122
+ `never_connected`), the last poll time and its age, the protocol version and any protocol refusal,
1123
+ the health counts (orders held, cloud errors, reports pending), and each target with `passed` or
1124
+ the reason the platform refused it. A target whose self-check failed shows the cloud's message.
1125
+
1126
+ The exit code is 0 when the Launcher polls, its protocol was accepted, and every target passed.
1127
+ Otherwise it is 1, and stderr has one line that names each failure, so a script can wait on it.
1128
+ `--output json` prints the record as the platform returns it. A managed provider has no Launcher,
1129
+ so the command exits 0.
1130
+
1112
1131
  ### Chat presence (Slack and Microsoft Teams)
1113
1132
 
1114
1133
  There is **no chat construct** — the `Channel` construct was removed, because the orchestra convention is
@@ -1244,6 +1263,7 @@ every derived slug (factory name + construct path) must stay ≤ 60 chars, so ke
1244
1263
  | **401 / 403** | The token lacks access to the resolved org, or it expired and could not be renewed. A profile from a browser `login` renews itself silently, so a 401 that survives that means the renewal credential is gone too — re-run `orchestra auth login`. A pasted or exported token has no renewal path at all: replace it, or fix `ORCHESTRA_ORGANIZATION_ID`. |
1245
1264
  | **"the platform rejected the stored refresh credential… Run `orchestra auth login` to sign in again."** | The stored renewal credential was refused (revoked, expired, or a sibling process already rotated past it). Nothing on disk is changed by that failure, so re-running `orchestra auth login` is the whole remedy. A *retryable* failure — the platform unreachable, timing out, or answering `temporarily_unavailable` — reports itself as such and never tells you to log in again; run the command again. |
1246
1265
  | **`ERR_PACKAGE_PATH_NOT_EXPORTED` at first import** | The factory program's own `package.json` is missing `"type": "module"` (a fresh `npm init -y` defaults to CommonJS). orchestra is ESM-only — its `exports` map defines only an `import` condition — so add `"type": "module"` to the factory `package.json` (see §4). |
1266
+ | **A Launcher runs no machines** | Run `orchestra compute-providers check <id-or-slug>` (§7). It names what failed: no poll for 60 seconds, a refused protocol version, or a target the platform refused, with the reason. |
1247
1267
  | **Import 404** | The referenced slug/id isn't visible in the resolved org. Check the org and the reference. |
1248
1268
  | **"refusing to send secrets over plain HTTP to non-loopback host …"** | A secret write needs TLS. Use an `https://` base URL; only loopback (`127.0.0.1`/`localhost`/`::1`) dev stacks may use `http://`. |
1249
1269
  | **`tsc` error on `target: Targets.…({ binding })`** | The binding is scoped to events the trigger does not fully select (its field is absent from one payload shape). Split into per-shape triggers sharing one binding constant and one anchor (the composition pattern), or author a binding valid for the whole selection. |
@@ -22,6 +22,10 @@ export interface CreateInvitationRequest {
22
22
  createOrganizationInvitationRequest: CreateOrganizationInvitationRequest;
23
23
  xOrganizationId?: string;
24
24
  }
25
+ export interface DeclineInvitationRequest {
26
+ id: string;
27
+ xOrganizationId?: string;
28
+ }
25
29
  export interface DeleteInvitationRequest {
26
30
  id: string;
27
31
  xOrganizationId?: string;
@@ -30,6 +34,11 @@ export interface GetInvitationRequest {
30
34
  id: string;
31
35
  xOrganizationId?: string;
32
36
  }
37
+ export interface ListCallerInvitationsRequest {
38
+ page?: number;
39
+ limit?: number;
40
+ xOrganizationId?: string;
41
+ }
33
42
  export interface ListInvitationsRequest {
34
43
  organizationId: string;
35
44
  page?: number;
@@ -65,6 +74,16 @@ export declare class OrganizationInvitationsApi extends runtime.BaseAPI {
65
74
  /**
66
75
  */
67
76
  createInvitation(requestParameters: CreateInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
77
+ /**
78
+ * Creates request options for declineInvitation without sending the request
79
+ */
80
+ declineInvitationRequestOpts(requestParameters: DeclineInvitationRequest): Promise<runtime.RequestOpts>;
81
+ /**
82
+ */
83
+ declineInvitationRaw(requestParameters: DeclineInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationInvitation>>;
84
+ /**
85
+ */
86
+ declineInvitation(requestParameters: DeclineInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
68
87
  /**
69
88
  * Creates request options for deleteInvitation without sending the request
70
89
  */
@@ -85,6 +104,16 @@ export declare class OrganizationInvitationsApi extends runtime.BaseAPI {
85
104
  /**
86
105
  */
87
106
  getInvitation(requestParameters: GetInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
107
+ /**
108
+ * Creates request options for listCallerInvitations without sending the request
109
+ */
110
+ listCallerInvitationsRequestOpts(requestParameters: ListCallerInvitationsRequest): Promise<runtime.RequestOpts>;
111
+ /**
112
+ */
113
+ listCallerInvitationsRaw(requestParameters: ListCallerInvitationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PageOrganizationInvitation>>;
114
+ /**
115
+ */
116
+ listCallerInvitations(requestParameters?: ListCallerInvitationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageOrganizationInvitation>;
88
117
  /**
89
118
  * Creates request options for listInvitations without sending the request
90
119
  */
@@ -127,6 +127,53 @@ class OrganizationInvitationsApi extends runtime.BaseAPI {
127
127
  return yield response.value();
128
128
  });
129
129
  }
130
+ /**
131
+ * Creates request options for declineInvitation without sending the request
132
+ */
133
+ declineInvitationRequestOpts(requestParameters) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ if (requestParameters['id'] == null) {
136
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling declineInvitation().');
137
+ }
138
+ const queryParameters = {};
139
+ const headerParameters = {};
140
+ if (requestParameters['xOrganizationId'] != null) {
141
+ headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
142
+ }
143
+ if (this.configuration && this.configuration.accessToken) {
144
+ const token = this.configuration.accessToken;
145
+ const tokenString = yield token("bearerAuth", []);
146
+ if (tokenString) {
147
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
148
+ }
149
+ }
150
+ let urlPath = `/organization-invitations/{id}/decline`;
151
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
152
+ return {
153
+ path: urlPath,
154
+ method: 'POST',
155
+ headers: headerParameters,
156
+ query: queryParameters,
157
+ };
158
+ });
159
+ }
160
+ /**
161
+ */
162
+ declineInvitationRaw(requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ const requestOptions = yield this.declineInvitationRequestOpts(requestParameters);
165
+ const response = yield this.request(requestOptions, initOverrides);
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, OrganizationInvitation_1.OrganizationInvitationFromJSON)(jsonValue));
167
+ });
168
+ }
169
+ /**
170
+ */
171
+ declineInvitation(requestParameters, initOverrides) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const response = yield this.declineInvitationRaw(requestParameters, initOverrides);
174
+ return yield response.value();
175
+ });
176
+ }
130
177
  /**
131
178
  * Creates request options for deleteInvitation without sending the request
132
179
  */
@@ -220,6 +267,55 @@ class OrganizationInvitationsApi extends runtime.BaseAPI {
220
267
  return yield response.value();
221
268
  });
222
269
  }
270
+ /**
271
+ * Creates request options for listCallerInvitations without sending the request
272
+ */
273
+ listCallerInvitationsRequestOpts(requestParameters) {
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ const queryParameters = {};
276
+ if (requestParameters['page'] != null) {
277
+ queryParameters['page'] = requestParameters['page'];
278
+ }
279
+ if (requestParameters['limit'] != null) {
280
+ queryParameters['limit'] = requestParameters['limit'];
281
+ }
282
+ const headerParameters = {};
283
+ if (requestParameters['xOrganizationId'] != null) {
284
+ headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
285
+ }
286
+ if (this.configuration && this.configuration.accessToken) {
287
+ const token = this.configuration.accessToken;
288
+ const tokenString = yield token("bearerAuth", []);
289
+ if (tokenString) {
290
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
291
+ }
292
+ }
293
+ let urlPath = `/me/invitations`;
294
+ return {
295
+ path: urlPath,
296
+ method: 'GET',
297
+ headers: headerParameters,
298
+ query: queryParameters,
299
+ };
300
+ });
301
+ }
302
+ /**
303
+ */
304
+ listCallerInvitationsRaw(requestParameters, initOverrides) {
305
+ return __awaiter(this, void 0, void 0, function* () {
306
+ const requestOptions = yield this.listCallerInvitationsRequestOpts(requestParameters);
307
+ const response = yield this.request(requestOptions, initOverrides);
308
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PageOrganizationInvitation_1.PageOrganizationInvitationFromJSON)(jsonValue));
309
+ });
310
+ }
311
+ /**
312
+ */
313
+ listCallerInvitations() {
314
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
315
+ const response = yield this.listCallerInvitationsRaw(requestParameters, initOverrides);
316
+ return yield response.value();
317
+ });
318
+ }
223
319
  /**
224
320
  * Creates request options for listInvitations without sending the request
225
321
  */
@@ -22,6 +22,10 @@ export interface CreateInvitationRequest {
22
22
  createOrganizationInvitationRequest: CreateOrganizationInvitationRequest;
23
23
  xOrganizationId?: string;
24
24
  }
25
+ export interface DeclineInvitationRequest {
26
+ id: string;
27
+ xOrganizationId?: string;
28
+ }
25
29
  export interface DeleteInvitationRequest {
26
30
  id: string;
27
31
  xOrganizationId?: string;
@@ -30,6 +34,11 @@ export interface GetInvitationRequest {
30
34
  id: string;
31
35
  xOrganizationId?: string;
32
36
  }
37
+ export interface ListCallerInvitationsRequest {
38
+ page?: number;
39
+ limit?: number;
40
+ xOrganizationId?: string;
41
+ }
33
42
  export interface ListInvitationsRequest {
34
43
  organizationId: string;
35
44
  page?: number;
@@ -65,6 +74,16 @@ export declare class OrganizationInvitationsApi extends runtime.BaseAPI {
65
74
  /**
66
75
  */
67
76
  createInvitation(requestParameters: CreateInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
77
+ /**
78
+ * Creates request options for declineInvitation without sending the request
79
+ */
80
+ declineInvitationRequestOpts(requestParameters: DeclineInvitationRequest): Promise<runtime.RequestOpts>;
81
+ /**
82
+ */
83
+ declineInvitationRaw(requestParameters: DeclineInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationInvitation>>;
84
+ /**
85
+ */
86
+ declineInvitation(requestParameters: DeclineInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
68
87
  /**
69
88
  * Creates request options for deleteInvitation without sending the request
70
89
  */
@@ -85,6 +104,16 @@ export declare class OrganizationInvitationsApi extends runtime.BaseAPI {
85
104
  /**
86
105
  */
87
106
  getInvitation(requestParameters: GetInvitationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationInvitation>;
107
+ /**
108
+ * Creates request options for listCallerInvitations without sending the request
109
+ */
110
+ listCallerInvitationsRequestOpts(requestParameters: ListCallerInvitationsRequest): Promise<runtime.RequestOpts>;
111
+ /**
112
+ */
113
+ listCallerInvitationsRaw(requestParameters: ListCallerInvitationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PageOrganizationInvitation>>;
114
+ /**
115
+ */
116
+ listCallerInvitations(requestParameters?: ListCallerInvitationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageOrganizationInvitation>;
88
117
  /**
89
118
  * Creates request options for listInvitations without sending the request
90
119
  */
@@ -124,6 +124,53 @@ export class OrganizationInvitationsApi extends runtime.BaseAPI {
124
124
  return yield response.value();
125
125
  });
126
126
  }
127
+ /**
128
+ * Creates request options for declineInvitation without sending the request
129
+ */
130
+ declineInvitationRequestOpts(requestParameters) {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ if (requestParameters['id'] == null) {
133
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling declineInvitation().');
134
+ }
135
+ const queryParameters = {};
136
+ const headerParameters = {};
137
+ if (requestParameters['xOrganizationId'] != null) {
138
+ headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
139
+ }
140
+ if (this.configuration && this.configuration.accessToken) {
141
+ const token = this.configuration.accessToken;
142
+ const tokenString = yield token("bearerAuth", []);
143
+ if (tokenString) {
144
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
145
+ }
146
+ }
147
+ let urlPath = `/organization-invitations/{id}/decline`;
148
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
149
+ return {
150
+ path: urlPath,
151
+ method: 'POST',
152
+ headers: headerParameters,
153
+ query: queryParameters,
154
+ };
155
+ });
156
+ }
157
+ /**
158
+ */
159
+ declineInvitationRaw(requestParameters, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ const requestOptions = yield this.declineInvitationRequestOpts(requestParameters);
162
+ const response = yield this.request(requestOptions, initOverrides);
163
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationInvitationFromJSON(jsonValue));
164
+ });
165
+ }
166
+ /**
167
+ */
168
+ declineInvitation(requestParameters, initOverrides) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const response = yield this.declineInvitationRaw(requestParameters, initOverrides);
171
+ return yield response.value();
172
+ });
173
+ }
127
174
  /**
128
175
  * Creates request options for deleteInvitation without sending the request
129
176
  */
@@ -217,6 +264,55 @@ export class OrganizationInvitationsApi extends runtime.BaseAPI {
217
264
  return yield response.value();
218
265
  });
219
266
  }
267
+ /**
268
+ * Creates request options for listCallerInvitations without sending the request
269
+ */
270
+ listCallerInvitationsRequestOpts(requestParameters) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const queryParameters = {};
273
+ if (requestParameters['page'] != null) {
274
+ queryParameters['page'] = requestParameters['page'];
275
+ }
276
+ if (requestParameters['limit'] != null) {
277
+ queryParameters['limit'] = requestParameters['limit'];
278
+ }
279
+ const headerParameters = {};
280
+ if (requestParameters['xOrganizationId'] != null) {
281
+ headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
282
+ }
283
+ if (this.configuration && this.configuration.accessToken) {
284
+ const token = this.configuration.accessToken;
285
+ const tokenString = yield token("bearerAuth", []);
286
+ if (tokenString) {
287
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
288
+ }
289
+ }
290
+ let urlPath = `/me/invitations`;
291
+ return {
292
+ path: urlPath,
293
+ method: 'GET',
294
+ headers: headerParameters,
295
+ query: queryParameters,
296
+ };
297
+ });
298
+ }
299
+ /**
300
+ */
301
+ listCallerInvitationsRaw(requestParameters, initOverrides) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ const requestOptions = yield this.listCallerInvitationsRequestOpts(requestParameters);
304
+ const response = yield this.request(requestOptions, initOverrides);
305
+ return new runtime.JSONApiResponse(response, (jsonValue) => PageOrganizationInvitationFromJSON(jsonValue));
306
+ });
307
+ }
308
+ /**
309
+ */
310
+ listCallerInvitations() {
311
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
312
+ const response = yield this.listCallerInvitationsRaw(requestParameters, initOverrides);
313
+ return yield response.value();
314
+ });
315
+ }
220
316
  /**
221
317
  * Creates request options for listInvitations without sending the request
222
318
  */
@@ -20,7 +20,7 @@ import type { ComputeProviderHealth } from './ComputeProviderHealth';
20
20
  */
21
21
  export interface ComputeProvider {
22
22
  /**
23
- * Compute provider id: a self-hosted record's TypeID, or a managed provider's key
23
+ * Compute provider id: a self-hosted record's TypeID, or cprov_orchestra for the managed provider
24
24
  * @type {string}
25
25
  * @memberof ComputeProvider
26
26
  */
@@ -32,7 +32,7 @@ export interface ComputeProvider {
32
32
  */
33
33
  kind: ComputeProviderKindEnum;
34
34
  /**
35
- * A self-hosted record's slug, fixed at create
35
+ * A self-hosted record's slug, fixed at create, or orchestra for the managed provider
36
36
  * @type {string}
37
37
  * @memberof ComputeProvider
38
38
  */
@@ -92,7 +92,7 @@ export interface ComputeProvider {
92
92
  */
93
93
  state?: ComputeProviderStateEnum;
94
94
  /**
95
- * The operating systems and architectures a managed provider runs
95
+ * The operating systems and architectures the managed provider runs
96
96
  * @type {Array<EnvironmentPlatform>}
97
97
  * @memberof ComputeProvider
98
98
  */
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { EnvironmentIngressPolicy } from './EnvironmentIngressPolicy';
13
+ import type { EnvironmentHooks } from './EnvironmentHooks';
13
14
  import type { EnvironmentPlatformRequest } from './EnvironmentPlatformRequest';
14
15
  import type { EnvironmentEgressPolicy } from './EnvironmentEgressPolicy';
15
16
  import type { EnvironmentProvisionSpecRequest } from './EnvironmentProvisionSpecRequest';
@@ -67,6 +68,18 @@ export interface CreateEnvironmentRequest {
67
68
  * @memberof CreateEnvironmentRequest
68
69
  */
69
70
  projectId?: string;
71
+ /**
72
+ * The absolute folder every conversation's agent starts in, on every kind: a path starting with / on linux and macos, and a drive or UNC path on windows, at most 1024 characters. A machine keeps the value it was created with. The worker creates the folder when it is missing, owned by the account the agent runs as, and an agent placement whose folder cannot be created or entered fails. Absent, the agent starts in the worker's own folder for its harness. An empty value declares none.
73
+ * @type {string}
74
+ * @memberof CreateEnvironmentRequest
75
+ */
76
+ workingDirectory?: string;
77
+ /**
78
+ * Scripts the worker runs at points of a machine's and an agent's life. onStartMachine and onStartAgent are built; onStartSession, onStopSession, onStopAgent and onStopMachine are reserved.
79
+ * @type {EnvironmentHooks}
80
+ * @memberof CreateEnvironmentRequest
81
+ */
82
+ hooks?: EnvironmentHooks;
70
83
  /**
71
84
  * Labels: the customer's key-to-value tags; the platform reads no key
72
85
  * @type {{ [key: string]: string; }}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { EnvironmentIngressPolicyFromJSON, EnvironmentIngressPolicyToJSON, } from './EnvironmentIngressPolicy';
15
+ import { EnvironmentHooksFromJSON, EnvironmentHooksToJSON, } from './EnvironmentHooks';
15
16
  import { EnvironmentPlatformRequestFromJSON, EnvironmentPlatformRequestToJSON, } from './EnvironmentPlatformRequest';
16
17
  import { EnvironmentEgressPolicyFromJSON, EnvironmentEgressPolicyToJSON, } from './EnvironmentEgressPolicy';
17
18
  import { EnvironmentProvisionSpecRequestFromJSON, EnvironmentProvisionSpecRequestToJSON, } from './EnvironmentProvisionSpecRequest';
@@ -46,6 +47,8 @@ export function CreateEnvironmentRequestFromJSONTyped(json, ignoreDiscriminator)
46
47
  'kind': json['kind'] == null ? undefined : json['kind'],
47
48
  'provisionSpec': json['provisionSpec'] == null ? undefined : EnvironmentProvisionSpecRequestFromJSON(json['provisionSpec']),
48
49
  'projectId': json['projectId'] == null ? undefined : json['projectId'],
50
+ 'workingDirectory': json['workingDirectory'] == null ? undefined : json['workingDirectory'],
51
+ 'hooks': json['hooks'] == null ? undefined : EnvironmentHooksFromJSON(json['hooks']),
49
52
  'labels': json['labels'] == null ? undefined : json['labels'],
50
53
  };
51
54
  }
@@ -65,6 +68,8 @@ export function CreateEnvironmentRequestToJSONTyped(value, ignoreDiscriminator =
65
68
  'kind': value['kind'],
66
69
  'provisionSpec': EnvironmentProvisionSpecRequestToJSON(value['provisionSpec']),
67
70
  'projectId': value['projectId'],
71
+ 'workingDirectory': value['workingDirectory'],
72
+ 'hooks': EnvironmentHooksToJSON(value['hooks']),
68
73
  'labels': value['labels'],
69
74
  };
70
75
  }
@@ -29,13 +29,13 @@ export interface CreateOrganizationInvitationRequest {
29
29
  */
30
30
  email: string;
31
31
  /**
32
- * IAM role assignments to grant on the membership minted at acceptance, each with its optional project scope — the sole role grant surface (max 16)
32
+ * IAM role assignments to grant on the membership minted at acceptance, each with its optional project scope — the sole role grant surface (max 16). Empty grants the managed `factory-developer` role.
33
33
  * @type {Array<RoleAssignment>}
34
34
  * @memberof CreateOrganizationInvitationRequest
35
35
  */
36
36
  roleAssignments?: Array<RoleAssignment>;
37
37
  /**
38
- * Invitation expiration timestamp
38
+ * Invitation expiration timestamp, 1 to 30 days ahead. Defaults to 7 days ahead.
39
39
  * @type {Date}
40
40
  * @memberof CreateOrganizationInvitationRequest
41
41
  */
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { EnvironmentIngressPolicy } from './EnvironmentIngressPolicy';
13
13
  import type { EnvironmentPlatformWithRuntime } from './EnvironmentPlatformWithRuntime';
14
+ import type { EnvironmentHooks } from './EnvironmentHooks';
14
15
  import type { EnvironmentEgressPolicy } from './EnvironmentEgressPolicy';
15
16
  import type { EnvironmentProvisionSpec } from './EnvironmentProvisionSpec';
16
17
  /**
@@ -79,6 +80,18 @@ export interface Environment {
79
80
  * @memberof Environment
80
81
  */
81
82
  provisionSpec?: EnvironmentProvisionSpec;
83
+ /**
84
+ * The absolute folder every conversation's agent starts in, on every kind: a path starting with / on linux and macos, and a drive or UNC path on windows, at most 1024 characters. A machine keeps the value it was created with. The worker creates the folder when it is missing, owned by the account the agent runs as, and an agent placement whose folder cannot be created or entered fails. Absent, the agent starts in the worker's own folder for its harness.
85
+ * @type {string}
86
+ * @memberof Environment
87
+ */
88
+ workingDirectory?: string;
89
+ /**
90
+ * Scripts the worker runs at points of a machine's and an agent's life. onStartMachine and onStartAgent are built; onStartSession, onStopSession, onStopAgent and onStopMachine are reserved.
91
+ * @type {EnvironmentHooks}
92
+ * @memberof Environment
93
+ */
94
+ hooks?: EnvironmentHooks;
82
95
  /**
83
96
  * Creation timestamp
84
97
  * @type {Date}
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { EnvironmentIngressPolicyFromJSON, EnvironmentIngressPolicyToJSON, } from './EnvironmentIngressPolicy';
15
15
  import { EnvironmentPlatformWithRuntimeFromJSON, EnvironmentPlatformWithRuntimeToJSON, } from './EnvironmentPlatformWithRuntime';
16
+ import { EnvironmentHooksFromJSON, EnvironmentHooksToJSON, } from './EnvironmentHooks';
16
17
  import { EnvironmentEgressPolicyFromJSON, EnvironmentEgressPolicyToJSON, } from './EnvironmentEgressPolicy';
17
18
  import { EnvironmentProvisionSpecFromJSON, EnvironmentProvisionSpecToJSON, } from './EnvironmentProvisionSpec';
18
19
  /**
@@ -66,6 +67,8 @@ export function EnvironmentFromJSONTyped(json, ignoreDiscriminator) {
66
67
  'ingressPolicy': json['ingressPolicy'] == null ? undefined : EnvironmentIngressPolicyFromJSON(json['ingressPolicy']),
67
68
  'kind': json['kind'],
68
69
  'provisionSpec': json['provisionSpec'] == null ? undefined : EnvironmentProvisionSpecFromJSON(json['provisionSpec']),
70
+ 'workingDirectory': json['workingDirectory'] == null ? undefined : json['workingDirectory'],
71
+ 'hooks': json['hooks'] == null ? undefined : EnvironmentHooksFromJSON(json['hooks']),
69
72
  'createdAt': (new Date(json['createdAt'])),
70
73
  'updatedAt': (new Date(json['updatedAt'])),
71
74
  'labels': json['labels'],
@@ -88,6 +91,8 @@ export function EnvironmentToJSONTyped(value, ignoreDiscriminator = false) {
88
91
  'egressPolicy': EnvironmentEgressPolicyToJSON(value['egressPolicy']),
89
92
  'ingressPolicy': EnvironmentIngressPolicyToJSON(value['ingressPolicy']),
90
93
  'provisionSpec': EnvironmentProvisionSpecToJSON(value['provisionSpec']),
94
+ 'workingDirectory': value['workingDirectory'],
95
+ 'hooks': EnvironmentHooksToJSON(value['hooks']),
91
96
  'createdAt': value['createdAt'].toISOString(),
92
97
  'updatedAt': value['updatedAt'].toISOString(),
93
98
  'labels': value['labels'],
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Orchestra platform API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface EnvironmentHook
16
+ */
17
+ export interface EnvironmentHook {
18
+ /**
19
+ * The script's text. Required, at most 64 KiB.
20
+ * @type {string}
21
+ * @memberof EnvironmentHook
22
+ */
23
+ script: string;
24
+ /**
25
+ * How long the script may run, in whole seconds. onStartAgent takes 1 to 240, and absent means 120. onStartMachine takes 1 to 3600, and absent means the deployment's bound, 600 unless it sets another. At the bound the worker kills the script and every process it started.
26
+ * @type {number}
27
+ * @memberof EnvironmentHook
28
+ */
29
+ timeoutSeconds?: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the EnvironmentHook interface.
33
+ */
34
+ export declare function instanceOfEnvironmentHook(value: object): value is EnvironmentHook;
35
+ export declare function EnvironmentHookFromJSON(json: any): EnvironmentHook;
36
+ export declare function EnvironmentHookFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvironmentHook;
37
+ export declare function EnvironmentHookToJSON(json: any): EnvironmentHook;
38
+ export declare function EnvironmentHookToJSONTyped(value?: EnvironmentHook | null, ignoreDiscriminator?: boolean): any;