@ricsam/r5d-api 0.0.40 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,7 +50,7 @@ Trusted server-side callers that authenticate through custom headers, such as a
50
50
  - `projects.update(projectRef, { name?, mode? })`
51
51
  - `projects.delete(projectRef)`
52
52
  - `projects.branches.list/describe(projectRef, ...)`
53
- - `projects.env.get/update(projectId, branchName, ...)`
53
+ - `projects.env.get/update/remove(projectId, ...)`
54
54
  - `projects.sessions.list(projectRef, { branch? })`
55
55
  - `projects.sessions.create(projectRef, { branchName, name? })`
56
56
  - `sessions.describe(sessionId)`
@@ -61,7 +61,7 @@ Trusted server-side callers that authenticate through custom headers, such as a
61
61
  - `sessions.inspectConversationWork(sessionId, workId, { detail? })`
62
62
  - `sessions.prompt(sessionId, { message, mode, model })`
63
63
  - `sessions.answerQuestions(sessionId, { answers })`
64
- - `sessions.applyRequiredEnvs(sessionId, { envs })`
64
+ - `sessions.answerEnvRequest(sessionId, { envs?, additionalContext? })`
65
65
 
66
66
  ## Errors
67
67
 
@@ -237,14 +237,19 @@ class R5dctlClient {
237
237
  })
238
238
  },
239
239
  env: {
240
- get: (projectId, branchName) => this.request({
240
+ get: (projectId) => this.request({
241
241
  method: "GET",
242
- path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`
242
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`
243
243
  }),
244
- update: (projectId, branchName, input) => this.request({
244
+ update: (projectId, input) => this.request({
245
245
  method: "PUT",
246
- path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`,
246
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`,
247
247
  body: input
248
+ }),
249
+ remove: (projectId, names) => this.request({
250
+ method: "DELETE",
251
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`,
252
+ body: { names }
248
253
  })
249
254
  },
250
255
  sessions: {
@@ -344,9 +349,9 @@ class R5dctlClient {
344
349
  path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/answer-questions`,
345
350
  body: input
346
351
  }),
347
- applyRequiredEnvs: (sessionId, input) => this.request({
352
+ answerEnvRequest: (sessionId, input) => this.request({
348
353
  method: "POST",
349
- path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/apply-required-envs`,
354
+ path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/answer-env-request`,
350
355
  body: input
351
356
  })
352
357
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "commonjs"
5
5
  }
@@ -213,14 +213,19 @@ class R5dctlClient {
213
213
  })
214
214
  },
215
215
  env: {
216
- get: (projectId, branchName) => this.request({
216
+ get: (projectId) => this.request({
217
217
  method: "GET",
218
- path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`
218
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`
219
219
  }),
220
- update: (projectId, branchName, input) => this.request({
220
+ update: (projectId, input) => this.request({
221
221
  method: "PUT",
222
- path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`,
222
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`,
223
223
  body: input
224
+ }),
225
+ remove: (projectId, names) => this.request({
226
+ method: "DELETE",
227
+ path: `/api/projects/${encodeURIComponent(projectId)}/env`,
228
+ body: { names }
224
229
  })
225
230
  },
226
231
  sessions: {
@@ -320,9 +325,9 @@ class R5dctlClient {
320
325
  path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/answer-questions`,
321
326
  body: input
322
327
  }),
323
- applyRequiredEnvs: (sessionId, input) => this.request({
328
+ answerEnvRequest: (sessionId, input) => this.request({
324
329
  method: "POST",
325
- path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/apply-required-envs`,
330
+ path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}/answer-env-request`,
326
331
  body: input
327
332
  })
328
333
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "module"
5
5
  }
@@ -48,9 +48,8 @@ export type R5dctlPendingQuestion = {
48
48
  allowMultiple?: boolean;
49
49
  options: R5dctlPendingQuestionOption[];
50
50
  };
51
- export type R5dctlRequiredEnv = {
51
+ export type R5dctlRequestedEnv = {
52
52
  name: string;
53
- optional: boolean;
54
53
  description: string;
55
54
  };
56
55
  export type R5dctlConversationRenderOptions = {
@@ -64,7 +63,7 @@ export type R5dctlConversationResponse = {
64
63
  thread: unknown[];
65
64
  agentText: string;
66
65
  pendingQuestions: R5dctlPendingQuestion[];
67
- requiredEnvs: R5dctlRequiredEnv[];
66
+ requestedEnvs: R5dctlRequestedEnv[];
68
67
  };
69
68
  export type R5dctlConversationWorkDetail = "compact" | "summary" | "full";
70
69
  export type R5dctlConversationWorkMetadata = {
@@ -77,7 +76,7 @@ export type R5dctlConversationOverviewResponse = {
77
76
  overviewText: string;
78
77
  works: R5dctlConversationWorkMetadata[];
79
78
  pendingQuestions: R5dctlPendingQuestion[];
80
- requiredEnvs: R5dctlRequiredEnv[];
79
+ requestedEnvs: R5dctlRequestedEnv[];
81
80
  };
82
81
  export type R5dctlConversationWorkResponse = {
83
82
  session: R5dctlSessionDescription;
@@ -248,11 +247,14 @@ export type R5dctlProjectUpdateInput = {
248
247
  mode?: "greenfield" | "prod";
249
248
  };
250
249
  export type R5dctlEnvValue = {
251
- optional?: boolean;
252
250
  description: string;
253
251
  value: string | null;
254
252
  };
255
253
  export type R5dctlEnvData = Record<string, R5dctlEnvValue>;
254
+ export type R5dctlEnvUpdate = Record<string, {
255
+ description: string;
256
+ value?: string | null;
257
+ }>;
256
258
  export type R5dctlSessionCreateInput = {
257
259
  name?: string;
258
260
  branchName: string;
@@ -350,8 +352,11 @@ export declare class R5dctlClient {
350
352
  }>;
351
353
  };
352
354
  env: {
353
- get: (projectId: string, branchName: string) => Promise<R5dctlEnvData>;
354
- update: (projectId: string, branchName: string, input: R5dctlEnvData) => Promise<{
355
+ get: (projectId: string) => Promise<R5dctlEnvData>;
356
+ update: (projectId: string, input: R5dctlEnvUpdate) => Promise<{
357
+ success: boolean;
358
+ }>;
359
+ remove: (projectId: string, names: string[]) => Promise<{
355
360
  success: boolean;
356
361
  }>;
357
362
  };
@@ -407,8 +412,9 @@ export declare class R5dctlClient {
407
412
  answerQuestions: (sessionId: string, input: {
408
413
  answers: string[];
409
414
  }) => Promise<R5dctlConversationResponse>;
410
- applyRequiredEnvs: (sessionId: string, input: {
411
- envs: string[];
415
+ answerEnvRequest: (sessionId: string, input: {
416
+ envs?: string[];
417
+ additionalContext?: string;
412
418
  }) => Promise<R5dctlConversationResponse>;
413
419
  };
414
420
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "module": "./dist/mjs/index.mjs",