@elevasis/sdk 1.36.2 → 1.36.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.
package/dist/cli.cjs CHANGED
@@ -45808,7 +45808,7 @@ function wrapAction(commandName, fn) {
45808
45808
  // package.json
45809
45809
  var package_default = {
45810
45810
  name: "@elevasis/sdk",
45811
- version: "1.36.2",
45811
+ version: "1.36.4",
45812
45812
  description: "SDK for building Elevasis organization resources",
45813
45813
  type: "module",
45814
45814
  bin: {
@@ -48296,6 +48296,13 @@ function registerTaskCreate(program3) {
48296
48296
  if (checklist !== void 0) body.checklist = checklist;
48297
48297
  const apiUrl = resolveApiUrl(options.apiUrl);
48298
48298
  const result = await apiPost("/api/external/project-tasks", body, apiUrl);
48299
+ if (!options.milestone) {
48300
+ process.stderr.write(
48301
+ source_default.yellow(
48302
+ "Warning: Task created without a milestone \u2014 it will appear under the 'Unassigned' group, not under a phase. Pass --milestone to link it.\n"
48303
+ )
48304
+ );
48305
+ }
48299
48306
  if (options.pretty) {
48300
48307
  const t = result.task;
48301
48308
  console.log(source_default.green(`
@@ -52362,6 +52369,49 @@ function registerGrantCreate(program3) {
52362
52369
  })
52363
52370
  );
52364
52371
  }
52372
+ function registerGrantUpdate(program3) {
52373
+ program3.command("grant:update <slug>").description("Update mutable fields on an existing agent access grant (branding, limits, mode, origins)").option("--mode <mode>", "Access mode: public | code").option("--code <code>", "Access code; required when switching --mode code without an existing code").option("--origins <origins>", "Comma-separated allowed origins (replaces existing)").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object (full replace)").option("--capture-fields <json>", "Capture fields JSON array (full replace)").option("--tool-policy <json>", "Tool policy JSON object (full replace)").option("--public-base-url <url>", "Client public app base URL for printed public URL").option("--api-url <url>", "API base URL").option("--json", "Output as JSON").action(
52374
+ wrapAction("grant:update", async (slug, options) => {
52375
+ const body = {};
52376
+ if (options.mode !== void 0) {
52377
+ if (options.mode !== "public" && options.mode !== "code") {
52378
+ throw new Error("--mode must be public or code");
52379
+ }
52380
+ body.mode = options.mode;
52381
+ }
52382
+ if (options.code) body.code = options.code;
52383
+ if (options.expiresAt) body.expiresAt = options.expiresAt;
52384
+ const allowedOrigins = parseOrigins(options.origins);
52385
+ if (allowedOrigins) body.allowedOrigins = allowedOrigins;
52386
+ const maxTurns = parsePositiveInt(options.maxTurns, "--max-turns");
52387
+ if (maxTurns !== void 0) body.maxTurnsPerSession = maxTurns;
52388
+ const maxSessions = parsePositiveInt(options.maxSessions, "--max-sessions");
52389
+ if (maxSessions !== void 0) body.maxSessionsPerVisitor = maxSessions;
52390
+ const branding = parseJson2(options.branding, "--branding");
52391
+ if (branding !== void 0) body.branding = branding;
52392
+ const captureFields = parseJson2(options.captureFields, "--capture-fields");
52393
+ if (captureFields !== void 0) body.captureFields = captureFields;
52394
+ const toolPolicy = parseJson2(options.toolPolicy, "--tool-policy");
52395
+ if (toolPolicy !== void 0) body.toolPolicy = toolPolicy;
52396
+ if (Object.keys(body).length === 0) {
52397
+ throw new Error("Provide at least one field to update (e.g. --branding, --mode, --max-turns)");
52398
+ }
52399
+ const apiUrl = resolveApiUrl(options.apiUrl);
52400
+ const result = await apiPatch(
52401
+ `/api/external/agent-access-grants/${encodeURIComponent(slug)}`,
52402
+ body,
52403
+ apiUrl
52404
+ );
52405
+ if (options.json) {
52406
+ printJson8(result.grant);
52407
+ return;
52408
+ }
52409
+ console.log(source_default.green(`Updated agent access grant ${result.grant.slug}.`));
52410
+ console.log(source_default.gray(` Public URL: ${resolvePublicUrl(result.grant.slug, options.publicBaseUrl)}`));
52411
+ printGrant(result.grant);
52412
+ })
52413
+ );
52414
+ }
52365
52415
  function registerGrantDisable(program3) {
52366
52416
  program3.command("grant:disable <slug>").description("Disable an agent access grant without deleting it").option("--api-url <url>", "API base URL").option("--json", "Output as JSON").action(
52367
52417
  wrapAction("grant:disable", async (slug, options) => {
@@ -52384,6 +52434,7 @@ function registerGrantDisable(program3) {
52384
52434
  function registerGrantCommands(program3) {
52385
52435
  registerGrantList(program3);
52386
52436
  registerGrantCreate(program3);
52437
+ registerGrantUpdate(program3);
52387
52438
  registerGrantDisable(program3);
52388
52439
  }
52389
52440
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.36.2",
3
+ "version": "1.36.4",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,9 +58,9 @@
58
58
  "tsup": "^8.0.0",
59
59
  "typescript": "5.9.2",
60
60
  "zod": "^4.1.0",
61
- "@repo/core": "0.49.1",
62
- "@repo/typescript-config": "0.0.0",
63
- "@repo/eslint-config": "0.0.0"
61
+ "@repo/core": "0.50.0",
62
+ "@repo/eslint-config": "0.0.0",
63
+ "@repo/typescript-config": "0.0.0"
64
64
  },
65
65
  "scripts": {
66
66
  "lint": "eslint src --max-warnings 0",
@@ -718,6 +718,8 @@ Onboarding & Scope — Checklist (2/3 complete)
718
718
 
719
719
  ### `task add <client> "<name>" [options]` — Add Task
720
720
 
721
+ > **Milestone linking guidance:** Task creation SHOULD resolve a milestone and pass `--milestone <milestone-id>`. An unmilestoned task is allowed (the CLI warns when `--milestone` is omitted, and the task saves with `milestone_id = null`), but it will appear under an "Unassigned / No milestone" group in the Project view rather than under its phase — so phase-grouped progress views will not reflect it until it is linked. Resolve the milestone first and link on creation whenever possible.
722
+
721
723
  **Options:**
722
724
 
723
725
  - `--milestone "<name>"` — link to a milestone (resolve by name first)
@@ -966,10 +968,10 @@ When args don't match any command pattern, infer intent from natural language:
966
968
  | "what's overdue?" | List milestones where `due_date < now() AND status != 'completed'` |
967
969
  | "block acme, waiting on client credentials" | `update acme --status blocked` |
968
970
  | "show checklist for phase 2" | Read and display checklist for milestone "phase 2" via psql or `project:milestone:list` |
969
- | "add 'deploy staging' to task X's checklist" | Read task X's checklist → append `{id: uuid, label: "deploy staging", completed: false}` → `project:task:update <id> --checklist '<json-array>'` |
970
- | "mark 'deploy staging' done on task X" | Read task X's checklist → flip `completed` on matching item → `project:task:update <id> --checklist '<json-array>'` |
971
+ | "add 'deploy staging' to task X's checklist" | Read task X's checklist → append `{id: uuid, label: "deploy staging", completed: false}` → `project:task:update <id> --checklist '<json-array>'` |
972
+ | "mark 'deploy staging' done on task X" | Read task X's checklist → flip `completed` on matching item → `project:task:update <id> --checklist '<json-array>'` |
971
973
  | "clear the checklist on task X" | `project:task:update <task-id> --checklist '[]'` |
972
- | "add checklist item to onboarding milestone: review scope doc" | Read milestone checklist → append item → `project:milestone:update <id> --checklist '<json-array>'` |
974
+ | "add checklist item to onboarding milestone: review scope doc" | Read milestone checklist → append item → `project:milestone:update <id> --checklist '<json-array>'` |
973
975
  | "I'm done" / "task complete" / "done with this" | Resolve active task → confirm → `project:task:update <task-id> --status completed` |
974
976
  | "save: Apify actor X rate-limits at 20rps" | Resolve active project/task → `project:note:create --project <id> --type agent_learning --task <task-id> "Apify actor X rate-limits at 20rps"` |
975
977
  | "remember: client requires ISO dates, not timestamps" | Resolve active project/task → `project:note:create --project <id> --type agent_learning --task <task-id> "client requires ISO dates, not timestamps"` |