@rudderhq/cli 0.2.0-canary.28 → 0.2.0-canary.29
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/index.js +15 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7278,11 +7278,13 @@ var ApiRequestError = class extends Error {
|
|
|
7278
7278
|
var RudderApiClient = class {
|
|
7279
7279
|
apiBase;
|
|
7280
7280
|
apiKey;
|
|
7281
|
+
agentId;
|
|
7281
7282
|
runId;
|
|
7282
7283
|
recoverAuth;
|
|
7283
7284
|
constructor(opts) {
|
|
7284
7285
|
this.apiBase = opts.apiBase.replace(/\/+$/, "");
|
|
7285
7286
|
this.apiKey = opts.apiKey?.trim() || void 0;
|
|
7287
|
+
this.agentId = opts.agentId?.trim() || void 0;
|
|
7286
7288
|
this.runId = opts.runId?.trim() || void 0;
|
|
7287
7289
|
this.recoverAuth = opts.recoverAuth;
|
|
7288
7290
|
}
|
|
@@ -7331,8 +7333,13 @@ var RudderApiClient = class {
|
|
|
7331
7333
|
if (this.apiKey) {
|
|
7332
7334
|
headers.authorization = `Bearer ${this.apiKey}`;
|
|
7333
7335
|
}
|
|
7334
|
-
if (
|
|
7335
|
-
|
|
7336
|
+
if (shouldAttachAgentContext(init.method)) {
|
|
7337
|
+
if (this.agentId) {
|
|
7338
|
+
headers["x-rudder-agent-id"] = this.agentId;
|
|
7339
|
+
}
|
|
7340
|
+
if (this.runId) {
|
|
7341
|
+
headers["x-rudder-run-id"] = this.runId;
|
|
7342
|
+
}
|
|
7336
7343
|
}
|
|
7337
7344
|
const response = await fetch(url, {
|
|
7338
7345
|
...init,
|
|
@@ -7366,7 +7373,7 @@ var RudderApiClient = class {
|
|
|
7366
7373
|
return safeParseJson(text6);
|
|
7367
7374
|
}
|
|
7368
7375
|
};
|
|
7369
|
-
function
|
|
7376
|
+
function shouldAttachAgentContext(method) {
|
|
7370
7377
|
const normalized = String(method ?? "GET").toUpperCase();
|
|
7371
7378
|
return normalized !== "GET" && normalized !== "HEAD";
|
|
7372
7379
|
}
|
|
@@ -7441,6 +7448,7 @@ function resolveCommandContext(options, opts) {
|
|
|
7441
7448
|
const api = new RudderApiClient({
|
|
7442
7449
|
apiBase,
|
|
7443
7450
|
apiKey,
|
|
7451
|
+
agentId,
|
|
7444
7452
|
runId,
|
|
7445
7453
|
recoverAuth: explicitApiKey || !canAttemptInteractiveBoardAuth() ? void 0 : async ({ error }) => {
|
|
7446
7454
|
const requestedAccess = error.message.includes("Instance admin required") ? "instance_admin_required" : "board";
|
|
@@ -10183,6 +10191,10 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
|
|
|
10183
10191
|
"- Shared organization workspace root lives under `$RUDDER_ORG_WORKSPACE_ROOT`.",
|
|
10184
10192
|
"- Shared organization skills live under `$RUDDER_ORG_SKILLS_DIR`.",
|
|
10185
10193
|
"- Shared organization plans live under `$RUDDER_ORG_PLANS_DIR`.",
|
|
10194
|
+
"- Shared organization artifacts live under `$RUDDER_ORG_ARTIFACTS_DIR`.",
|
|
10195
|
+
"- Durable generated outputs such as screenshots, images, mockups, reports, CSVs, handoff logs, and other user-visible files should be written under `$RUDDER_ORG_ARTIFACTS_DIR` when available.",
|
|
10196
|
+
"- Use `/tmp` only for transient scratch files and temporary verification artifacts; do not put durable work product there.",
|
|
10197
|
+
"- Local trusted runtimes may expose the host operator home as `$RUDDER_OPERATOR_HOME`; use it only when a local skill or script intentionally needs operator-owned desktop app or CLI state. Do not replace `$HOME` with it.",
|
|
10186
10198
|
"- Durable shared work output should prefer these managed workspace paths instead of ad-hoc top-level `projects/` folders.",
|
|
10187
10199
|
"",
|
|
10188
10200
|
"When you create or copy a skill under `$AGENT_HOME/skills/<slug>/`, check the agent's Skills snapshot before claiming it will load in future runs. If it is installed but not enabled, say exactly that future runs will not load it until enabled, and offer to enable it with `rudder agent skills enable <agent-id> <selection-ref>` when you have permission.",
|