@north-light/cli 0.3.714 → 0.3.715

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 (55) hide show
  1. package/dist/api/client.d.ts +3 -1
  2. package/dist/api/client.js +2 -2
  3. package/dist/api/contract.d.ts +1 -1
  4. package/dist/api/contract.js +1 -1
  5. package/dist/api/dto/environments.d.ts +4 -0
  6. package/dist/api/dto/execution-start.d.ts +9 -0
  7. package/dist/api/routes.d.ts +1 -0
  8. package/dist/api/routes.js +1 -1
  9. package/dist/clients/attach/viewer.js +3 -3
  10. package/dist/commands/profile/environment.js +2 -2
  11. package/dist/commands/sys/feedback.js +5 -5
  12. package/dist/core/canvas/executions.d.ts +0 -2
  13. package/dist/core/canvas/executions.js +1 -1
  14. package/dist/core/canvas/schema-pg/030-environment-pull-request-write.sql +2 -0
  15. package/dist/core/canvas/schema-version.d.ts +1 -1
  16. package/dist/core/canvas/schema-version.js +1 -1
  17. package/dist/core/environment-recipe.d.ts +1 -0
  18. package/dist/core/environment-recipe.js +1 -1
  19. package/dist/core/ledger/rates.d.ts +0 -2
  20. package/dist/core/ledger/rates.js +1 -1
  21. package/dist/core/runtime/revive.js +2 -2
  22. package/dist/core/runtime/runner/blaxel/image-build.d.ts +3 -0
  23. package/dist/core/runtime/runner/blaxel/image-build.js +6 -6
  24. package/dist/core/runtime/runner/types.d.ts +0 -2
  25. package/dist/core/runtime/spawn.js +1 -1
  26. package/dist/daemon/api/handlers/environments.js +1 -1
  27. package/dist/daemon/api/handlers/feedback.d.ts +2 -0
  28. package/dist/daemon/api/handlers/feedback.js +9 -0
  29. package/dist/daemon/api/handlers/git-credential.d.ts +3 -2
  30. package/dist/daemon/api/handlers/git-credential.js +1 -1
  31. package/dist/daemon/api/operations.js +1 -1
  32. package/dist/daemon/api/server.js +1 -1
  33. package/dist/daemon/machine-daemon.js +1 -1
  34. package/dist/daemon/reconcilers/ledger-storage.js +2 -4
  35. package/package.json +3 -3
  36. package/packages/crouter-api/dist/api/client.js +4 -0
  37. package/packages/crouter-api/dist/api/contract.js +1 -1
  38. package/packages/crouter-api/dist/api/routes.js +1 -0
  39. package/packages/crouter-api/dist/commands/profile/environment.js +6 -2
  40. package/packages/crouter-api/dist/commands/sys/feedback.js +12 -2
  41. package/packages/crouter-api/dist/core/canvas/executions.js +2 -3
  42. package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
  43. package/packages/crouter-api/dist/core/environment-recipe.js +3 -0
  44. package/packages/crouter-api/dist/core/ledger/rates.js +0 -3
  45. package/packages/crouter-api/dist/core/runtime/revive.js +1 -1
  46. package/packages/crouter-api/dist/core/runtime/runner/blaxel/image-build.js +11 -1
  47. package/packages/crouter-api/dist/core/runtime/runner/types.js +1 -1
  48. package/packages/crouter-api/dist/core/runtime/spawn.js +1 -1
  49. package/packages/crouter-api/dist/daemon/api/handlers/git-credential.js +7 -5
  50. package/packages/crouter-api/dist/daemon/api/operations.js +1 -0
  51. package/packages/crouter-api/package.json +1 -1
  52. package/packages/crouter-identity/package.json +1 -1
  53. package/packages/crouter-plugin/package.json +3 -3
  54. package/runtime.lock.json +14 -14
  55. package/scripts/sandbox-start.mjs +1 -1
@@ -21,7 +21,7 @@ import { defineLeaf } from '../../core/command.js';
21
21
  import { usage } from '../../core/errors.js';
22
22
  import { userScopeRoot } from '../../core/scope.js';
23
23
  import { readTelemetry } from '../../core/canvas/telemetry.js';
24
- import { ApiError } from '../../api/index.js';
24
+ import { ApiError, routes } from '../../api/index.js';
25
25
  import { cliClient } from '../api-client.js';
26
26
  import { projectTier1Event, readLogSnapshot } from '../../core/events/read.js';
27
27
  import { readPackageVersion } from './shared.js';
@@ -125,6 +125,16 @@ function buildBody(message, ctx) {
125
125
  * answer with a `url` naming where the report landed; anything else about the
126
126
  * response body is the backend's business, not ours. */
127
127
  async function deliverToEndpoint(endpoint, title, body, message, ctx) {
128
+ // The endpoint is the control plane's own feedback route (a cloud sandbox): the node token lives in the broker's relay, so the call goes through it.
129
+ const apiUrl = process.env['CRTR_API_URL'];
130
+ if (apiUrl !== undefined && apiUrl !== '' && endpoint === `${apiUrl.replace(/\/$/, '')}${routes.feedback()}`) {
131
+ try {
132
+ return { url: (await cliClient().postFeedback({ title, body })).url };
133
+ }
134
+ catch (err) {
135
+ return { error: `${ENDPOINT_ENV} failed: ${err instanceof Error ? err.message : String(err)}` };
136
+ }
137
+ }
128
138
  const token = process.env[TOKEN_ENV];
129
139
  try {
130
140
  const res = await fetch(endpoint, {
@@ -201,7 +211,7 @@ export const sysFeedbackLeaf = defineLeaf({
201
211
  ],
202
212
  outputKind: 'object',
203
213
  effects: [
204
- `Sends the report where this install delivers harness feedback: the ${ENDPOINT_ENV} endpoint when the deployment sets one, otherwise a public GitHub issue on ${FEEDBACK_REPO} via gh.`,
214
+ `Sends the report where this install delivers harness feedback: the ${ENDPOINT_ENV} endpoint when the deployment sets one, otherwise a GitHub issue on ${FEEDBACK_REPO} via gh.`,
205
215
  'On delivery failure, writes the report to ~/.crouter/feedback/ instead — never lost.',
206
216
  ],
207
217
  },
@@ -21,7 +21,6 @@ function hydrate(row) {
21
21
  endedAt: row['ended_at'] ?? null,
22
22
  exitReason: row['exit_reason'] ?? null,
23
23
  runner: row['runner'],
24
- sandboxName: row['sandbox_name'] ?? null,
25
24
  attempt: Number(row['attempt']),
26
25
  release: row['release'] ?? null,
27
26
  heartbeatAt: row['heartbeat_at'] ?? null,
@@ -91,8 +90,8 @@ export async function beginExecution(nodeId, input) {
91
90
  await revokeNodeTokens(db, 'node_id', nodeId, at);
92
91
  const executionId = randomUUID();
93
92
  const attempt = input.attempt ?? Number((await db.prepare('SELECT COALESCE(MAX(attempt), 0) + 1 AS next FROM executions WHERE node_id = ?').get(nodeId)).next);
94
- await db.prepare("INSERT INTO executions (execution_id, node_id, daemon_epoch, pid, process_identity, state, started_at, ended_at, exit_reason, runner, sandbox_name, attempt, release, launch_json) VALUES (?, ?, ?, NULL, NULL, 'launching', ?, NULL, NULL, ?, ?, ?, ?, ?)")
95
- .run(executionId, nodeId, input.daemonEpoch, at, input.runner ?? 'process', input.sandboxName ?? null, attempt, input.release ?? null, input.launchJson ?? null);
93
+ await db.prepare("INSERT INTO executions (execution_id, node_id, daemon_epoch, pid, process_identity, state, started_at, ended_at, exit_reason, runner, attempt, release, launch_json) VALUES (?, ?, ?, NULL, NULL, 'launching', ?, NULL, NULL, ?, ?, ?, ?)")
94
+ .run(executionId, nodeId, input.daemonEpoch, at, input.runner ?? 'process', attempt, input.release ?? null, input.launchJson ?? null);
96
95
  return executionId;
97
96
  });
98
97
  }
@@ -6,7 +6,7 @@
6
6
  /** The canvas schema version this build supports: the number of the highest delta in `schema-pg/` (the baseline
7
7
  * `schema-pg.sql` is version 1). `scripts/install-runtime.mjs` reads this module from a candidate generation to refuse
8
8
  * one below the live database's `schema_min_reader`. */
9
- export const CANVAS_SCHEMA_VERSION = 29;
9
+ export const CANVAS_SCHEMA_VERSION = 30;
10
10
  /** The Postgres schema holding the canvas tables: `CRTR_DATABASE_SCHEMA` (`crtr` in the cloud deploy). Unset or empty
11
11
  * means the role's own search_path (`public` on a Mac and on a VM). A name that is not a plain identifier is an error:
12
12
  * it is put in a `search_path` connection option. */
@@ -55,5 +55,8 @@ export async function patchEnvironment(environmentId, patch) {
55
55
  }
56
56
  if (patch.memory_mb !== undefined)
57
57
  await db.prepare('UPDATE environments SET memory_mb = ? WHERE object = ?').run(patch.memory_mb, environmentId);
58
+ // Not part of the recipe: the credential route reads it per request, so it raises no revision and builds no image.
59
+ if (patch.allow_pull_request_write !== undefined)
60
+ await db.prepare('UPDATE environments SET allow_pull_request_write = ? WHERE object = ?').run(String(patch.allow_pull_request_write), environmentId);
58
61
  });
59
62
  }
@@ -7,7 +7,6 @@ export const LEDGER_ENV = {
7
7
  sandboxUsdPerGbHour: 'CRTR_LEDGER_SANDBOX_USD_PER_GB_HOUR',
8
8
  sandboxStandbyS: 'CRTR_LEDGER_SANDBOX_STANDBY_S',
9
9
  storageUsdPerGbMonth: 'CRTR_LEDGER_STORAGE_USD_PER_GB_MONTH',
10
- sandboxDiskUsdPerGbMonth: 'CRTR_LEDGER_SANDBOX_DISK_USD_PER_GB_MONTH',
11
10
  infraFreeUsdPerMonth: 'CRTR_LEDGER_INFRA_FREE_USD_PER_MONTH',
12
11
  takePct: 'CRTR_LEDGER_TAKE_PCT',
13
12
  r2Move: 'CRTR_LEDGER_R2_MOVE',
@@ -37,7 +36,6 @@ function flag(name) {
37
36
  export const sandboxUsdPerGbHour = () => number(LEDGER_ENV.sandboxUsdPerGbHour);
38
37
  export const sandboxStandbyS = () => number(LEDGER_ENV.sandboxStandbyS) ?? DEFAULT_STANDBY_S;
39
38
  export const storageUsdPerGbMonth = () => number(LEDGER_ENV.storageUsdPerGbMonth);
40
- export const sandboxDiskUsdPerGbMonth = () => number(LEDGER_ENV.sandboxDiskUsdPerGbMonth);
41
39
  export const infraFreeUsdPerMonth = () => number(LEDGER_ENV.infraFreeUsdPerMonth) ?? DEFAULT_INFRA_FREE_USD;
42
40
  /** Northlight's take on each priced model or tool charge, in percent; 0 (the default) writes no take rows. */
43
41
  export const takePercent = () => number(LEDGER_ENV.takePct, 100) ?? 0;
@@ -48,7 +46,6 @@ export function assertLedgerEnv() {
48
46
  sandboxUsdPerGbHour();
49
47
  sandboxStandbyS();
50
48
  storageUsdPerGbMonth();
51
- sandboxDiskUsdPerGbMonth();
52
49
  infraFreeUsdPerMonth();
53
50
  takePercent();
54
51
  r2MoveEnabled();
@@ -651,7 +651,7 @@ async function launchRevive(nodeId, meta, opts) {
651
651
  let launched;
652
652
  try {
653
653
  const row = await liveExecutionForNode(nodeId);
654
- const started = await runner.start({ executionId, nodeId, attempt: row?.attempt ?? 1, sandboxName: row?.sandboxName ?? null,
654
+ const started = await runner.start({ executionId, nodeId, attempt: row?.attempt ?? 1,
655
655
  release: row?.release ?? '', launchJson, cwd: meta.cwd, resuming });
656
656
  launched = started;
657
657
  if (!remote && launched.pid === null) {
@@ -27,6 +27,15 @@ export const REPOS_DIR = 'repos';
27
27
  /** Where the image keeps the setup script's output, and its exit status when it failed. `sandbox-start.mjs` reads both (it derives them from `/work/.crtr`). */
28
28
  export const SETUP_LOG_FILE = '/work/.crtr/setup.log';
29
29
  export const SETUP_FAILED_FILE = '/work/.crtr/setup-failed';
30
+ /** `gh` for a sandbox: /usr/local/bin comes before /usr/bin, so this wrapper runs first. It asks git's credential helper (set at sandbox start, so it reaches the control plane's
31
+ * git-credential route) for a fresh installation token, exports it as GH_TOKEN for this one call and runs the real gh. No token is stored on disk. */
32
+ export const GH_WRAPPER_PATH = '/usr/local/bin/gh';
33
+ const GH_WRAPPER_LINES = [
34
+ '#!/bin/sh',
35
+ 'token=$(printf "protocol=https\\nhost=github.com\\n\\n" | git credential fill 2>/dev/null | sed -n "s/^password=//p")',
36
+ '[ -n "$token" ] && export GH_TOKEN="$token"',
37
+ 'exec /usr/bin/gh "$@"',
38
+ ];
30
39
  const shellQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
31
40
  const lines = (text) => (text ?? '').split('\n').map((l) => l.trim()).filter((l) => l !== '');
32
41
  /** A RUN step that cannot fail the build (Blaxel hangs on a failed step and its build log is unreadable): its output goes to `SETUP_LOG_FILE` and a
@@ -40,7 +49,8 @@ export function recipeDockerfile(recipe, revision, packagesToken = false) {
40
49
  const hasScript = recipe.setup_script !== null && recipe.setup_script.trim() !== '';
41
50
  const base = [
42
51
  `FROM ${NODE_BASE_IMAGE}`,
43
- 'RUN apk add --no-cache bash git curl ripgrep',
52
+ 'RUN apk add --no-cache bash git curl ripgrep github-cli',
53
+ `RUN printf '%s\\n' ${GH_WRAPPER_LINES.map(shellQuote).join(' ')} > ${GH_WRAPPER_PATH} && chmod 755 ${GH_WRAPPER_PATH}`,
44
54
  `COPY --from=${SANDBOX_API_IMAGE} /sandbox-api /usr/local/bin/sandbox-api`,
45
55
  `RUN adduser -D -h /home/${RUN_USER} -s /bin/sh ${RUN_USER} && mkdir -p /work/.crtr ${RECIPE_PI_AGENT_DIR} && chown -R ${RUN_USER} /work /var/lib/crtr`,
46
56
  ];
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // Boundaries: the runner does not decide when to wake (the node-lifecycle lane
9
9
  // does), holds no mail, and writes the `executions` row only through its runner
10
- // columns (`pid`, `process_identity`, `sandbox_name`, `heartbeat_at`). Every
10
+ // columns (`pid`, `process_identity`, `heartbeat_at`). Every
11
11
  // method is safe to call twice: a reconciler whose lease was taken may repeat a
12
12
  // call, so a repeat must be harmless (design D76).
13
13
  //
@@ -333,7 +333,7 @@ async function startOnMachine(meta, environmentId, inv) {
333
333
  const start = await renderCarriedStart(meta.node_id);
334
334
  const nodeToken = await mintNodeToken(db, execId, meta.node_id, new Date().toISOString());
335
335
  return await enqueueMachineCall(environmentId, 'start', {
336
- executionId: execId, nodeId: meta.node_id, attempt: 1, sandboxName: null, release: acceptedRelease(), launchJson, cwd: meta.cwd, resuming: false,
336
+ executionId: execId, nodeId: meta.node_id, attempt: 1, release: acceptedRelease(), launchJson, cwd: meta.cwd, resuming: false,
337
337
  nodeToken, bundle, start,
338
338
  });
339
339
  }, { timingName: 'render_tx' }));
@@ -1,10 +1,11 @@
1
1
  // `POST /v1/environments/:environment_id/git-credential` — a GitHub token limited to the environment's recipe repositories.
2
2
  // The control plane asks the GitHub app's internal route with its service credential; GitHub enforces the restriction.
3
3
  import { ApiError } from '../../../api/errors.js';
4
+ import { openDb } from '../../../core/canvas/db.js';
4
5
  import { getNode } from '../../../core/canvas/canvas.js';
5
6
  import { environmentOfNode, recipeOf } from '../environment-of.js';
6
7
  import { invalidRequest, objectBody, optionalString, requiredString } from './validate.js';
7
- function requiredEnv(name) {
8
+ export function requiredEnv(name) {
8
9
  const value = process.env[name];
9
10
  if (value === undefined || value === '')
10
11
  throw new ApiError(500, 'github_service_unconfigured', `${name} is not set on this control plane`);
@@ -31,15 +32,16 @@ async function handleGitCredential(ctx) {
31
32
  const repositories = (await recipeOf(environmentId))?.repositories.map((r) => r.github_full_name) ?? [];
32
33
  if (repositories.length === 0)
33
34
  throw new ApiError(409, 'no_recipe_repositories', `environment ${environmentId} has no recipe repositories`);
34
- const minted = await mintInstallationToken(principal.sub, repositories);
35
+ const allow = await (await openDb()).prepare('SELECT allow_pull_request_write FROM environments WHERE object = ?').get(environmentId);
36
+ const minted = await mintInstallationToken(principal.sub, repositories, allow?.allow_pull_request_write === true);
35
37
  return { status: 200, body: { username: 'x-access-token', password: minted.token, expiry: minted.expires_at } };
36
38
  }
37
- /** The GitHub app's internal route: a token limited to `repositories` for the person, and the commit author for their GitHub link (null when unlinked). */
38
- export async function mintInstallationToken(sub, repositories) {
39
+ /** The GitHub app's internal route: a token limited to `repositories` for the person (with pull_requests write too when `allowPullRequestWrite`), and the commit author for their GitHub link (null when unlinked). */
40
+ export async function mintInstallationToken(sub, repositories, allowPullRequestWrite = false) {
39
41
  const response = await fetch(`${requiredEnv('GITHUB_SERVICE_URL').replace(/\/$/, '')}/internal/installation-token`, {
40
42
  method: 'POST',
41
43
  headers: { 'content-type': 'application/json', authorization: `Bearer ${requiredEnv('CROUTER_SERVICE_TOKEN')}` },
42
- body: JSON.stringify({ sub, repositories }),
44
+ body: JSON.stringify({ sub, repositories, allow_pull_request_write: allowPullRequestWrite }),
43
45
  });
44
46
  const text = await response.text();
45
47
  const parsed = text === '' ? {} : JSON.parse(text);
@@ -208,6 +208,7 @@ export const OPERATIONS = [
208
208
  { name: 'execution.import-unpacked', method: 'POST', path: '/v1/executions/:execution_id/import-unpacked', classes: ['broker'], resource: 'none' },
209
209
  { name: 'execution.start', method: 'GET', path: '/v1/executions/:execution_id/start', classes: ['broker'], resource: 'none' },
210
210
  { name: 'environment.git-credential', method: 'POST', path: '/v1/environments/:environment_id/git-credential', classes: ['broker'], resource: 'none' },
211
+ { name: 'feedback.file', method: 'POST', path: '/v1/feedback', classes: ['broker'], resource: 'none' },
211
212
  { name: 'node-outcomes.get.119', method: 'GET', path: '/v1/nodes/:id/outcome', classes: ['person', 'broker', 'cron'], resource: 'node-read' },
212
213
  { name: 'node-outcomes.put.120', method: 'PUT', path: '/v1/nodes/:id/outcome-delivery', classes: ['person', 'broker'], resource: 'node-write' },
213
214
  { name: 'node-outcomes.get.121', method: 'GET', path: '/v1/nodes/:id/outcome-delivery', classes: ['person', 'broker', 'cron'], resource: 'node-read' },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.714",
3
+ "version": "0.3.715",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/identity",
3
- "version": "0.3.714",
3
+ "version": "0.3.715",
4
4
  "description": "Northlight access-token verification and scope rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/plugin",
3
- "version": "0.3.714",
3
+ "version": "0.3.715",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
28
28
  },
29
29
  "dependencies": {
30
- "@north-light/api": "0.3.714",
31
- "@north-light/identity": "0.3.714"
30
+ "@north-light/api": "0.3.715",
31
+ "@north-light/identity": "0.3.715"
32
32
  },
33
33
  "license": "UNLICENSED",
34
34
  "publishConfig": {
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.714",
3
+ "version": "0.3.715",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/cli",
9
- "version": "0.3.714",
9
+ "version": "0.3.715",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "workspaces": [
@@ -28,8 +28,8 @@
28
28
  "@milkdown/preset-gfm": "^7.22.3",
29
29
  "@milkdown/prose": "^7.22.3",
30
30
  "@milkdown/utils": "^7.22.3",
31
- "@north-light/identity": "0.3.714",
32
- "@north-light/plugin": "0.3.714",
31
+ "@north-light/identity": "0.3.715",
32
+ "@north-light/plugin": "0.3.715",
33
33
  "cron-parser": "^5.6.0",
34
34
  "esbuild": "0.28.2",
35
35
  "jose": "^6.2.12",
@@ -11902,17 +11902,17 @@
11902
11902
  },
11903
11903
  "packages/crouter-api": {
11904
11904
  "name": "@north-light/api",
11905
- "version": "0.3.714",
11905
+ "version": "0.3.715",
11906
11906
  "license": "UNLICENSED"
11907
11907
  },
11908
11908
  "packages/crouter-env-docker": {
11909
11909
  "name": "@north-light/env-docker",
11910
- "version": "0.3.714",
11910
+ "version": "0.3.715",
11911
11911
  "license": "UNLICENSED"
11912
11912
  },
11913
11913
  "packages/crouter-identity": {
11914
11914
  "name": "@north-light/identity",
11915
- "version": "0.3.714",
11915
+ "version": "0.3.715",
11916
11916
  "license": "UNLICENSED",
11917
11917
  "dependencies": {
11918
11918
  "jose": "^6.2.1"
@@ -11920,21 +11920,21 @@
11920
11920
  },
11921
11921
  "packages/crouter-plugin": {
11922
11922
  "name": "@north-light/plugin",
11923
- "version": "0.3.714",
11923
+ "version": "0.3.715",
11924
11924
  "license": "UNLICENSED",
11925
11925
  "dependencies": {
11926
- "@north-light/api": "0.3.714",
11927
- "@north-light/identity": "0.3.714"
11926
+ "@north-light/api": "0.3.715",
11927
+ "@north-light/identity": "0.3.715"
11928
11928
  }
11929
11929
  },
11930
11930
  "packages/crouter-sdk": {
11931
11931
  "name": "@north-light/sdk",
11932
- "version": "0.3.714",
11932
+ "version": "0.3.715",
11933
11933
  "license": "UNLICENSED",
11934
11934
  "dependencies": {
11935
- "@north-light/api": "0.3.714",
11936
- "@north-light/identity": "0.3.714",
11937
- "@north-light/plugin": "0.3.714",
11935
+ "@north-light/api": "0.3.715",
11936
+ "@north-light/identity": "0.3.715",
11937
+ "@north-light/plugin": "0.3.715",
11938
11938
  "jose": "^6.2.1"
11939
11939
  },
11940
11940
  "bin": {
@@ -538,7 +538,7 @@ async function start(env) {
538
538
 
539
539
  // 5.9 the broker, with the token on fd 3 and not in its environment.
540
540
  const brokerEnv = { ...env, ...launch.env, HOME: home, PI_CODING_AGENT_DIR: agentDir, CRTR_HOME: root, CRTR_RUNTIME_HOME: join(root, 'runtime'),
541
- CRTR_FRONT_DOOR: '1', CRTR_EXECUTION_ID: executionId, CRTR_API_URL: apiUrl, CRTR_NO_AUTO_INIT: '1',
541
+ CRTR_FRONT_DOOR: '1', CRTR_EXECUTION_ID: executionId, CRTR_API_URL: apiUrl, CRTR_FEEDBACK_ENDPOINT: `${apiUrl.replace(/\/$/, '')}/v1/feedback`, CRTR_NO_AUTO_INIT: '1',
542
542
  CRTR_PLUGINS_REVISION: String(bundle.plugins_revision), ...(environmentId ? { CRTR_ENVIRONMENT_ID: environmentId } : {}), ...(scopesFile ? { CRTR_SCOPES_FILE: scopesFile } : {}),
543
543
  PATH: `${join(releaseDir, 'bin')}:${env.PATH ?? '/usr/local/bin:/usr/bin:/bin'}` };
544
544
  for (const name of ['CRTR_NODE_TOKEN', 'CRTR_RELEASE_URL', 'CRTR_RELEASE_SHA256', 'CRTR_BOOT_START_UP', 'CRTR_BOOT_RELEASE_UP', 'CRTR_BOOT_RELEASE_SOURCE', 'CRTR_BOOT_RG']) delete brokerEnv[name];