@outerlayer/cli 0.16.1 → 0.18.0
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/CHANGELOG.md +64 -0
- package/README.md +26 -11
- package/dist/agent-setup-RBTEACYU.js +28 -0
- package/dist/artifact-link-cmd-AVM2EKTV.js +25 -0
- package/dist/{build-BG2YENGK.js → build-TQ6X5PYN.js} +5 -4
- package/dist/build-info.json +1 -1
- package/dist/{builder-2D3WSOOY.js → builder-DUI2ZH2H.js} +5 -6
- package/dist/{check-CNTMSGOG.js → check-5C4YDZYV.js} +53 -50
- package/dist/{chunk-R7PF5OOU.js → chunk-3CWUOFV6.js} +21 -14
- package/dist/{chunk-R4ZQQ7U2.js → chunk-3OFZM4X6.js} +551 -72
- package/dist/{chunk-2MNPHL23.js → chunk-47TTLEDX.js} +6 -5
- package/dist/{chunk-PLMTLGYH.js → chunk-52NC2FIU.js} +4 -3
- package/dist/chunk-6CHIYEZZ.js +564 -0
- package/dist/{chunk-TI7B7UEO.js → chunk-AMFWYESY.js} +1 -1
- package/dist/{chunk-YRYMNBGQ.js → chunk-ANPNT6PM.js} +2 -1
- package/dist/{chunk-JJEGKEFV.js → chunk-B3UKB46N.js} +6 -6
- package/dist/{chunk-JXYVA45C.js → chunk-BMYGAGBJ.js} +1050 -304
- package/dist/{chunk-4Q7OMKAT.js → chunk-BQXFBI7T.js} +81 -5
- package/dist/chunk-CRB3POP4.js +34 -0
- package/dist/{chunk-F47JBIAW.js → chunk-DSF2FWAZ.js} +2 -1
- package/dist/{chunk-N5FOE5PS.js → chunk-ECODQ7II.js} +4 -33
- package/dist/{chunk-NBGDBTO2.js → chunk-ESC6UR76.js} +6 -5
- package/dist/{chunk-HHJDN6AU.js → chunk-ESVW4MJY.js} +1 -1
- package/dist/{chunk-42ZI52JW.js → chunk-F4XSVQJ4.js} +4 -3
- package/dist/{chunk-FWX735W7.js → chunk-FUB7LRUE.js} +7 -7
- package/dist/chunk-G2YNJIGF.js +44 -0
- package/dist/{chunk-QKFB4K7X.js → chunk-GGOMT6KF.js} +1 -1
- package/dist/{chunk-CA3XMYFN.js → chunk-GOBOJMOJ.js} +6 -6
- package/dist/{chunk-N6LURUEF.js → chunk-GOSFARMS.js} +1 -1
- package/dist/chunk-JBJTC3UU.js +35 -0
- package/dist/{chunk-U3HXXRTY.js → chunk-JF42URPU.js} +16 -15
- package/dist/{chunk-ADJRGVZC.js → chunk-KDVIU23F.js} +1 -1
- package/dist/{chunk-6QRMLNH3.js → chunk-KK4VBOH6.js} +93 -37
- package/dist/{chunk-KMDLFI4P.js → chunk-L2USZT6T.js} +1 -1
- package/dist/{chunk-WTE3MQML.js → chunk-LXAY4A2G.js} +3 -12
- package/dist/{chunk-V7NIVOFD.js → chunk-M2ZWWTWZ.js} +1 -1
- package/dist/{chunk-ERI5GBNI.js → chunk-MLAAT4S6.js} +3 -3
- package/dist/{chunk-POJMEEJJ.js → chunk-MNTSH4CL.js} +1 -1
- package/dist/{chunk-WUYTWNMA.js → chunk-MQJSXHV7.js} +1 -1
- package/dist/{chunk-O765JR4W.js → chunk-MTP2QEVO.js} +1 -1
- package/dist/{chunk-ZM2IMMYN.js → chunk-N2PXGQRL.js} +9 -1
- package/dist/{chunk-J5M7BSJQ.js → chunk-N3CUDFCW.js} +9 -3
- package/dist/{chunk-4KSQKQXE.js → chunk-NACDBXUG.js} +19 -15
- package/dist/{chunk-RSPXEVDX.js → chunk-NL4XPC7W.js} +1 -1
- package/dist/{chunk-EHAAPRWY.js → chunk-QQM2UJ6T.js} +31 -26
- package/dist/{chunk-5FEK6PNE.js → chunk-RAZTWYZN.js} +10 -9
- package/dist/{chunk-4NPZVMJU.js → chunk-S26M3YBJ.js} +60 -4
- package/dist/{chunk-UGP76IZ5.js → chunk-S5PCA3SN.js} +1 -1
- package/dist/{chunk-YDSMROTB.js → chunk-S76AYB4M.js} +25 -20
- package/dist/{chunk-RMWLBUCJ.js → chunk-SADUQSO4.js} +1 -1
- package/dist/{chunk-OZGHL5Y5.js → chunk-SWCTGCSC.js} +2 -2
- package/dist/{chunk-GQD22KKN.js → chunk-T2Q7ISPE.js} +2 -1
- package/dist/{chunk-C5Y5ZJJZ.js → chunk-T4Y6SCG3.js} +5 -4
- package/dist/{chunk-6JNURGOA.js → chunk-ULSIJGLS.js} +45 -13
- package/dist/{chunk-ONRCEE6D.js → chunk-UYOYTKE2.js} +4 -4
- package/dist/{chunk-PTW6W5NR.js → chunk-VYAL7PUE.js} +1 -1
- package/dist/{chunk-JEHRUE3F.js → chunk-W5VPCONO.js} +166 -196
- package/dist/{chunk-NPQWKGUA.js → chunk-WBT5X3NH.js} +5 -4
- package/dist/{chunk-RLYZLUQ7.js → chunk-WGAUY5LE.js} +2 -2
- package/dist/{chunk-RSNSZ2LJ.js → chunk-X5H2WYMB.js} +1 -1
- package/dist/{chunk-OHVJA253.js → chunk-X5N6KC6V.js} +47 -29
- package/dist/{chunk-22RMZBGW.js → chunk-XGP3VYOG.js} +1 -1
- package/dist/{chunk-HYZRY4KZ.js → chunk-XNGMQ27R.js} +16 -6
- package/dist/{chunk-W3EKCZSQ.js → chunk-Y5GE76XC.js} +180 -53
- package/dist/{chunk-EWORLJMO.js → chunk-Y5MXET4M.js} +277 -526
- package/dist/{chunk-XCK2YAY5.js → chunk-YVZJ6GKF.js} +3 -2
- package/dist/{chunk-YO4PSLVB.js → chunk-ZRL6HKBY.js} +1 -1
- package/dist/claude-launcher-YVXI76NX.js +102 -0
- package/dist/{cli-AEWH62UE.js → cli-C77H54BV.js} +489 -174
- package/dist/{command-HHPBR6CS.js → command-H5CILO4S.js} +40 -37
- package/dist/{config-N3C6DFQA.js → config-FXDG4NPJ.js} +2 -3
- package/dist/connect-cmd-ZW5FV3ZW.js +17 -0
- package/dist/{context-adopt-VMMGFRUZ.js → context-adopt-O5OFXMKI.js} +13 -12
- package/dist/context-materialize-Y5IJ4MQT.js +23 -0
- package/dist/{dist-LKDWQWZ7.js → dist-QTX4RSCL.js} +2 -2
- package/dist/{docker-4J77Q2BF.js → docker-RC3PRX3Q.js} +7 -8
- package/dist/{doctor-N6Y7HKK3.js → doctor-2NQQML6P.js} +47 -39
- package/dist/{emit-artifact-cmd-H5MH3AOP.js → emit-artifact-cmd-7MP63KXU.js} +25 -22
- package/dist/emit-cmd-PPN4QQF2.js +14 -0
- package/dist/{emit-criteria-cmd-HBP6XS5C.js → emit-criteria-cmd-3RXPDLNK.js} +16 -14
- package/dist/{emit-finding-cmd-ZXDRL6PG.js → emit-finding-cmd-OL7JB6H3.js} +18 -16
- package/dist/{emit-result-cmd-RFKALS5Z.js → emit-result-cmd-UZVMOCF4.js} +20 -17
- package/dist/{exec-client-CQV746UF.js → exec-client-7UMESIE2.js} +3 -4
- package/dist/governing-source-BUU4IABS.js +35 -0
- package/dist/guest-init-KPBQOFE5.js +9 -0
- package/dist/hidden-prompt-UXBFMQC5.js +68 -0
- package/dist/{hook-fast-D7HV4IXG.js → hook-fast-W5MKHMJT.js} +4 -1
- package/dist/host-key-U4B5QETR.js +8 -0
- package/dist/{import-capture-cmd-EQ35EARA.js → import-capture-cmd-ZO6KGHI2.js} +7 -5
- package/dist/{import-ruler-cmd-BGAZXCQM.js → import-ruler-cmd-KJMWL5V6.js} +5 -3
- package/dist/index.js +8 -4
- package/dist/init-VWXIZEAN.js +54 -0
- package/dist/{init-FBCA4DRA.js → init-WNXXYMO7.js} +80 -53
- package/dist/{init-cmd-CAG572UE.js → init-cmd-WS6TIRYT.js} +28 -24
- package/dist/{init-update-VDFF4K3B.js → init-update-E3J6TVIN.js} +27 -26
- package/dist/{install-HDBIPHTX.js → install-CBWIEF3R.js} +4 -5
- package/dist/{install-cmd-5HYMXLEW.js → install-cmd-QDOTR4OM.js} +5 -4
- package/dist/{login-browser-QZCS3WW6.js → login-browser-O63QZN7D.js} +4 -3
- package/dist/{logout-cmd-QAUFDJ6J.js → logout-cmd-5V5MMBSY.js} +3 -2
- package/dist/{logs-H55NWW4H.js → logs-AMLKC3VP.js} +3 -1
- package/dist/loop-UGI2BJOT.js +76 -0
- package/dist/machine-JOW4RNZ7.js +49 -0
- package/dist/{mcp-install-cmd-FDTPQQS6.js → mcp-install-cmd-GGWB3JJ2.js} +3 -2
- package/dist/{mcp-serve-cmd-3KVYEUXG.js → mcp-serve-cmd-DOTY5FKY.js} +10 -8
- package/dist/paths-7XP63OAX.js +7 -0
- package/dist/pending-532ABZYC.js +8 -0
- package/dist/{pidfile-UZRH774M.js → pidfile-3DM4OBKO.js} +4 -2
- package/dist/{record-C43U4PKS.js → record-3WP6V2K5.js} +3 -2
- package/dist/{runner-env-EN7YE7QX.js → runner-env-4NB2GA7O.js} +5 -6
- package/dist/runner-key-TC3NFWFV.js +177 -0
- package/dist/{session-sender-24L5EW25.js → session-sender-NNVPSPY7.js} +17 -14
- package/dist/spec-cmd-OWVTBB4J.js +116 -0
- package/dist/{starter-pack-KF66HGZR.js → starter-pack-OPWUDOWX.js} +7 -5
- package/dist/{status-XHSGEYO5.js → status-TKCLLKFG.js} +42 -39
- package/dist/{statusline-fast-SVTMBMD7.js → statusline-fast-KN3BX67H.js} +2 -1
- package/dist/{sync-cmd-5G5EIEHD.js → sync-cmd-Q6VYNPWG.js} +16 -13
- package/dist/{watch-UTOXO4SE.js → watch-ARAGADTF.js} +16 -13
- package/dist/{work-claim-cmd-RKHYFE5Y.js → work-claim-cmd-34FERLYX.js} +25 -27
- package/dist/work-cmd-7S5B2H2P.js +25 -0
- package/dist/{work-comment-cmd-A55CUSYE.js → work-comment-cmd-SZJSPM5S.js} +15 -13
- package/dist/{work-launch-R5HTAP6X.js → work-launch-LEQ2MPM3.js} +3 -1
- package/dist/{work-open-pr-cmd-E6O53IJD.js → work-open-pr-cmd-RPXKCBWS.js} +17 -15
- package/dist/work-pr-cmd-5LGANL32.js +26 -0
- package/package.json +3 -2
- package/skill-pack/maintained/outerlayer-amend/SKILL.md +6 -2
- package/skill-pack/maintained/outerlayer-cli/SKILL.md +2 -0
- package/skill-pack/maintained/outerlayer-evidence/SKILL.md +4 -2
- package/skill-pack/maintained/outerlayer-findings/SKILL.md +2 -0
- package/skill-pack/shipped.json +27 -5
- package/skill-pack/template/build/SKILL.md +25 -10
- package/skill-pack/template/build/references/agent-briefs.md +3 -1
- package/skill-pack/template/build/references/criteria-judge.md +27 -0
- package/skill-pack/template/build/references/release.md +27 -34
- package/skill-pack/template/build/scripts/criterion-citations.mjs +8 -3
- package/skill-pack/template/build/scripts/record-criteria.mjs +8 -2
- package/skill-pack/template/spec/SKILL.md +37 -10
- package/skill-pack/validators/acceptance-criteria.yaml +25 -25
- package/skill-pack/validators/code-review.yaml +6 -5
- package/dist/agent-setup-K3ABU5NL.js +0 -27
- package/dist/chunk-BYT5O5RV.js +0 -61
- package/dist/connect-cmd-JUAW6MU4.js +0 -16
- package/dist/context-materialize-2WXTS4CW.js +0 -22
- package/dist/emit-cmd-IJ3GVRFD.js +0 -12
- package/dist/guest-init-LJP5GPZF.js +0 -9
- package/dist/host-key-YMLXY6QB.js +0 -7
- package/dist/init-MYX7YMIH.js +0 -51
- package/dist/loop-75J4YXLZ.js +0 -73
- package/dist/machine-A6ZCTUGS.js +0 -46
- package/dist/paths-OYKMVYJP.js +0 -6
- package/dist/pending-MXLSRYMO.js +0 -7
- package/dist/runner-key-W25ISHI3.js +0 -155
- package/dist/work-cmd-DJQJEZVB.js +0 -23
- package/dist/work-pr-cmd-L77K32WK.js +0 -24
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { authorEnvironment, withHooksPath } from './chunk-BYT5O5RV.js';
|
|
4
3
|
import { existsSync, unlinkSync, chmodSync } from 'fs';
|
|
5
4
|
import { request as request$1, createServer } from 'http';
|
|
6
5
|
import { request } from 'https';
|
|
@@ -345,6 +344,61 @@ async function startBuildServices(input) {
|
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
346
|
|
|
347
|
+
// src/runner/commit-identity.ts
|
|
348
|
+
var NOREPLY_SUFFIX = "@users.noreply.github.com";
|
|
349
|
+
var MAX_LENGTH = 200;
|
|
350
|
+
function parseIdentity(value) {
|
|
351
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
352
|
+
const { name, email } = value;
|
|
353
|
+
if (typeof name !== "string" || typeof email !== "string") return void 0;
|
|
354
|
+
if (name.trim() === "" || name.length > MAX_LENGTH || /[\r\n\0<>]/.test(name)) return void 0;
|
|
355
|
+
if (email.length > MAX_LENGTH || !email.endsWith(NOREPLY_SUFFIX) || /[\s\0<>]/.test(email) || email.length === NOREPLY_SUFFIX.length) return void 0;
|
|
356
|
+
return { name, email };
|
|
357
|
+
}
|
|
358
|
+
function parseClaimIdentity(data) {
|
|
359
|
+
const author = parseIdentity(data.commitAuthor);
|
|
360
|
+
if (author === void 0) return void 0;
|
|
361
|
+
const coAuthor = parseIdentity(data.coAuthor);
|
|
362
|
+
return coAuthor === void 0 ? { author } : { author, coAuthor };
|
|
363
|
+
}
|
|
364
|
+
function authorEnvironment(identity) {
|
|
365
|
+
if (identity === void 0) return {};
|
|
366
|
+
return {
|
|
367
|
+
GIT_AUTHOR_NAME: identity.name,
|
|
368
|
+
GIT_AUTHOR_EMAIL: identity.email,
|
|
369
|
+
GIT_COMMITTER_NAME: identity.name,
|
|
370
|
+
GIT_COMMITTER_EMAIL: identity.email
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
function configCount(env) {
|
|
374
|
+
const raw = String(env.GIT_CONFIG_COUNT);
|
|
375
|
+
return /^[0-9]+$/.test(raw) ? Number(raw) : 0;
|
|
376
|
+
}
|
|
377
|
+
function withGitConfig(env, key, value) {
|
|
378
|
+
const at = configCount(env);
|
|
379
|
+
return {
|
|
380
|
+
...env,
|
|
381
|
+
GIT_CONFIG_COUNT: String(at + 1),
|
|
382
|
+
[`GIT_CONFIG_KEY_${at}`]: key,
|
|
383
|
+
[`GIT_CONFIG_VALUE_${at}`]: value
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function tokenHeader(token) {
|
|
387
|
+
return `Authorization: Basic ${Buffer.from(`x-access-token:${token}`).toString("base64")}`;
|
|
388
|
+
}
|
|
389
|
+
function withTokenHeader(env, url, token) {
|
|
390
|
+
return withGitConfig(env, `http.${url}.extraHeader`, tokenHeader(token));
|
|
391
|
+
}
|
|
392
|
+
function withHooksPath(env, dir) {
|
|
393
|
+
return withGitConfig(env, "core.hooksPath", dir);
|
|
394
|
+
}
|
|
395
|
+
function commitIdentityRecord(identity) {
|
|
396
|
+
return {
|
|
397
|
+
author: identity === void 0 ? "host" : "app",
|
|
398
|
+
coAuthor: identity?.coAuthor !== void 0 && identity.hooksPath !== void 0 ? "credited" : "none"
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
|
|
348
402
|
// src/runner/repositories.ts
|
|
349
403
|
function parseClaimedRepositories(value) {
|
|
350
404
|
if (!Array.isArray(value) || value.length === 0) return void 0;
|
|
@@ -372,10 +426,19 @@ function primaryOf(repositories) {
|
|
|
372
426
|
var RELAY_PORT = 3128;
|
|
373
427
|
var JOB_MOUNT = "/outerlayer/job";
|
|
374
428
|
var EVAL_INPUT_DIR = `${JOB_MOUNT}/eval-input`;
|
|
429
|
+
var BUILD_HOME = "/build/home";
|
|
375
430
|
var CHECKOUT_DIR = "/build/work/checkout";
|
|
376
431
|
var REPOS_DIR = "/build/work/repos";
|
|
377
432
|
function checkoutPath(entry) {
|
|
378
|
-
return entry.primary ? CHECKOUT_DIR :
|
|
433
|
+
return entry.primary ? CHECKOUT_DIR : repositoryPath(entry.repository);
|
|
434
|
+
}
|
|
435
|
+
function repositoryPath(repository) {
|
|
436
|
+
return `${REPOS_DIR}/${repository.toLowerCase()}`;
|
|
437
|
+
}
|
|
438
|
+
function lifecycleWorkdir(repositories, governingRepository) {
|
|
439
|
+
const governing = governingRepository?.toLowerCase();
|
|
440
|
+
const entry = governing === void 0 ? void 0 : repositories.find((candidate) => candidate.repository.toLowerCase() === governing);
|
|
441
|
+
return entry === void 0 ? CHECKOUT_DIR : checkoutPath(entry);
|
|
379
442
|
}
|
|
380
443
|
var MAX_HOSTS = 200;
|
|
381
444
|
function tokenVariables() {
|
|
@@ -404,10 +467,16 @@ function proxyEnvironment(proxyUrl, alsoNoProxy) {
|
|
|
404
467
|
YARN_HTTP_PROXY: proxyUrl
|
|
405
468
|
};
|
|
406
469
|
}
|
|
470
|
+
var PROXY_WARNING_FLAG = "--disable-warning=UNDICI-EHPA";
|
|
471
|
+
function withProxyWarningHidden(options) {
|
|
472
|
+
const given = options?.trim() ?? "";
|
|
473
|
+
if (given.split(/\s+/).includes(PROXY_WARNING_FLAG)) return given;
|
|
474
|
+
return given === "" ? PROXY_WARNING_FLAG : `${given} ${PROXY_WARNING_FLAG}`;
|
|
475
|
+
}
|
|
407
476
|
function runnerLiterals(repository, repositories = []) {
|
|
408
477
|
return {
|
|
409
478
|
OUTERLAYER_JOB_DIR: JOB_MOUNT,
|
|
410
|
-
HOME:
|
|
479
|
+
HOME: BUILD_HOME,
|
|
411
480
|
TMPDIR: "/tmp",
|
|
412
481
|
...proxyEnvironment(PROXY_URL),
|
|
413
482
|
GIT_TERMINAL_PROMPT: "0",
|
|
@@ -466,6 +535,11 @@ function buildEnvironment(input) {
|
|
|
466
535
|
passed[name] = value;
|
|
467
536
|
variables.push(name);
|
|
468
537
|
}
|
|
538
|
+
const nodeOptions = {};
|
|
539
|
+
if (input.imageEnv !== void 0) {
|
|
540
|
+
if (passed.NODE_OPTIONS !== void 0) passed.NODE_OPTIONS = withProxyWarningHidden(passed.NODE_OPTIONS);
|
|
541
|
+
else nodeOptions.NODE_OPTIONS = withProxyWarningHidden(recipe.NODE_OPTIONS ?? input.imageEnv.NODE_OPTIONS);
|
|
542
|
+
}
|
|
469
543
|
const destinations = destinationEnvironment(input.config.build?.destinations, containerLocalAddress);
|
|
470
544
|
const builtInLiterals = builtIns ? builtInEnvironment(containerBuiltInAddress, claudeCredential(input.hostEnv)) : {};
|
|
471
545
|
const hooksPath = input.identity?.hooksPath;
|
|
@@ -483,6 +557,7 @@ function buildEnvironment(input) {
|
|
|
483
557
|
return {
|
|
484
558
|
literals: {
|
|
485
559
|
...recipe,
|
|
560
|
+
...nodeOptions,
|
|
486
561
|
...destinations,
|
|
487
562
|
...runnerLiterals(input.repository, repositoriesOf({ repositories: input.repositories, repository: input.repository, branch: input.branch })),
|
|
488
563
|
...builtInLiterals,
|
|
@@ -502,7 +577,8 @@ function checkEnvironment(input) {
|
|
|
502
577
|
repository: input.repository,
|
|
503
578
|
hostEnv: input.hostEnv,
|
|
504
579
|
containerEnv: input.containerEnv,
|
|
505
|
-
builtIns: false
|
|
580
|
+
builtIns: false,
|
|
581
|
+
imageEnv: input.imageEnv
|
|
506
582
|
});
|
|
507
583
|
const withheld = /* @__PURE__ */ new Set(["OUTERLAYER_URL", "OUTERLAYER_API_KEY", ...CLAUDE_CREDENTIAL_VARIABLES]);
|
|
508
584
|
const literals = { OUTERLAYER_EVAL_INPUT: EVAL_INPUT_DIR };
|
|
@@ -544,4 +620,4 @@ function withTunnelRecord(environment, record, onlyWhenUsed = false) {
|
|
|
544
620
|
};
|
|
545
621
|
}
|
|
546
622
|
|
|
547
|
-
export { AGENT_CREDENTIAL_MISSING, BUILT_IN_NAMES, CHECKOUT_DIR, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, RELAY_PORT, buildEnvironment, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, containerLocalAddress, destinationEnvironment, headerVariables, isRefusedInConfig, isReservedVariable, parseClaimedRepositories, parseIsolation, primaryOf, proxyEnvironment, repositoriesOf, resolveDestinations, sharedUserEnvironment, startBuildServices, withTunnelRecord };
|
|
623
|
+
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, RELAY_PORT, authorEnvironment, buildEnvironment, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, commitIdentityRecord, containerLocalAddress, destinationEnvironment, headerVariables, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, parseClaimIdentity, parseClaimedRepositories, parseIsolation, primaryOf, proxyEnvironment, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
4
|
+
import { join, sep } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
createRequire(import.meta.url);
|
|
8
|
+
var CLI_PACKAGE = "@outerlayer/cli";
|
|
9
|
+
function packageRunnerOf(bin) {
|
|
10
|
+
for (const part of bin.replace(/\\/g, "/").split("/")) {
|
|
11
|
+
if (part === "_npx") return "npx";
|
|
12
|
+
if (part === "dlx") return "pnpm dlx";
|
|
13
|
+
if (part.startsWith("dlx-")) return "yarn dlx";
|
|
14
|
+
if (part.startsWith("bunx-")) return "bunx";
|
|
15
|
+
}
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
function runningModule() {
|
|
19
|
+
try {
|
|
20
|
+
return fileURLToPath(import.meta.url);
|
|
21
|
+
} catch {
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function cliInvocation(opts = {}) {
|
|
26
|
+
const bin = opts.bin ?? runningModule();
|
|
27
|
+
const runner = packageRunnerOf(bin);
|
|
28
|
+
if (runner !== void 0) return `${runner} ${CLI_PACKAGE}`;
|
|
29
|
+
const installedCopy = join(opts.home ?? homeFromEnv(), ".outerlayer", "cli") + sep;
|
|
30
|
+
if (bin.startsWith(installedCopy)) return `npx ${CLI_PACKAGE}`;
|
|
31
|
+
return "outerlayer";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { cliInvocation, packageRunnerOf };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { recordReportedCost } from './chunk-BKO6JEZI.js';
|
|
4
4
|
import { decodeWrappedCommand } from './chunk-5QRP3MVS.js';
|
|
5
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
5
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
6
7
|
import { readFileSync } from 'fs';
|
|
7
8
|
import { spawn } from 'child_process';
|
|
@@ -69,7 +70,7 @@ function renderStatusline(stdin, state, now) {
|
|
|
69
70
|
segments.push(`${state.unsynced} unsynced`);
|
|
70
71
|
}
|
|
71
72
|
if (!fresh) {
|
|
72
|
-
segments.push(dim(
|
|
73
|
+
segments.push(dim(`${cliInvocation()} doctor`));
|
|
73
74
|
}
|
|
74
75
|
const prefix = "\u2B22 OL";
|
|
75
76
|
return segments.length === 0 ? prefix : `${prefix} ${segments.join(dim(" \xB7 "))}`;
|
|
@@ -1,40 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-N2PXGQRL.js';
|
|
5
|
+
import { existsSync, readFileSync, rmSync, mkdirSync, writeFileSync } from 'fs';
|
|
5
6
|
import { dirname } from 'path';
|
|
6
|
-
import { execFileSync } from 'child_process';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
9
|
-
function startTimeOf(pid) {
|
|
10
|
-
if (process.platform === "linux") return startTimeOfLinux(pid);
|
|
11
|
-
return startTimeOfPs(pid);
|
|
12
|
-
}
|
|
13
|
-
function startTimeOfLinux(pid) {
|
|
14
|
-
try {
|
|
15
|
-
const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
16
|
-
const afterComm = stat.slice(stat.lastIndexOf(")") + 1).trim();
|
|
17
|
-
const fields = afterComm.split(/\s+/);
|
|
18
|
-
if (fields[0] === "Z" || fields[0] === "X") return null;
|
|
19
|
-
const starttime = fields[19];
|
|
20
|
-
return starttime ?? null;
|
|
21
|
-
} catch {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function startTimeOfPs(pid) {
|
|
26
|
-
try {
|
|
27
|
-
const out = execFileSync("ps", ["-o", "lstart=", "-p", String(pid)], { encoding: "utf8" }).trim();
|
|
28
|
-
return out.length > 0 ? out : null;
|
|
29
|
-
} catch {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function isSameProcess(pid, start) {
|
|
34
|
-
return startTimeOf(pid) === start;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/runner/pidfile.ts
|
|
38
9
|
function readPidFile(path) {
|
|
39
10
|
if (!existsSync(path)) return null;
|
|
40
11
|
try {
|
|
@@ -68,4 +39,4 @@ function claimPidFile(path, self, isSameProcessFn = isSameProcess) {
|
|
|
68
39
|
writePidFile(path, self);
|
|
69
40
|
}
|
|
70
41
|
|
|
71
|
-
export { RunnerAlreadyRunningError, claimPidFile,
|
|
42
|
+
export { RunnerAlreadyRunningError, claimPidFile, readPidFile, releasePidFile };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-
|
|
4
|
-
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-
|
|
5
|
-
import { pinExists, readContextManifest } from './chunk-
|
|
6
|
-
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-
|
|
3
|
+
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-YVZJ6GKF.js';
|
|
4
|
+
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-F4XSVQJ4.js';
|
|
5
|
+
import { pinExists, readContextManifest } from './chunk-LXAY4A2G.js';
|
|
6
|
+
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-MNTSH4CL.js';
|
|
7
7
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
8
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
9
|
import { createHash } from 'crypto';
|
|
9
10
|
import { existsSync, readFileSync } from 'fs';
|
|
10
11
|
import { join } from 'path';
|
|
@@ -109,7 +110,7 @@ function contextIsGoverned(root, gitCommonDir) {
|
|
|
109
110
|
return pinExists(root) || readContextManifest(gitCommonDir) !== void 0;
|
|
110
111
|
}
|
|
111
112
|
var NAME = "Starter files";
|
|
112
|
-
var UPDATE =
|
|
113
|
+
var UPDATE = `${cliInvocation()} init --update`;
|
|
113
114
|
function shownPaths(items, all) {
|
|
114
115
|
const shown = [];
|
|
115
116
|
const whole = /* @__PURE__ */ new Set();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { C } from './chunk-
|
|
4
|
-
import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-
|
|
3
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
4
|
+
import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-MNTSH4CL.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
6
7
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
7
8
|
import { join, dirname } from 'path';
|
|
8
9
|
|
|
@@ -98,7 +99,7 @@ function formatStarterPackOutput(result) {
|
|
|
98
99
|
...result.validatorsKept.map((path) => `${C.dim}${path} already exists \u2014 left as it is${C.reset}`),
|
|
99
100
|
"",
|
|
100
101
|
`Next: create .outerlayer/config.json naming your agent tools, for example {"targets": ["claude-code"]},`,
|
|
101
|
-
`then run ${C.yellow}
|
|
102
|
+
`then run ${C.yellow}${cliInvocation()} context emit${C.reset} to compile the skills into their native files.`
|
|
102
103
|
);
|
|
103
104
|
return lines.join("\n") + "\n";
|
|
104
105
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isPlaceholderCommand } from './chunk-
|
|
4
|
-
import { describeCallFailure } from './chunk-
|
|
5
|
-
import { WorkCommandError, getJson } from './chunk-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { isPlaceholderCommand } from './chunk-GOBOJMOJ.js';
|
|
4
|
+
import { describeCallFailure } from './chunk-6CHIYEZZ.js';
|
|
5
|
+
import { WorkCommandError, getJson } from './chunk-KK4VBOH6.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-MQJSXHV7.js';
|
|
7
|
+
import { builtinKind } from './chunk-XGP3VYOG.js';
|
|
8
|
+
import { signerFor } from './chunk-M2ZWWTWZ.js';
|
|
9
|
+
import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-BQXFBI7T.js';
|
|
10
10
|
|
|
11
11
|
createRequire(import.meta.url);
|
|
12
12
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
|
|
4
|
+
createRequire(import.meta.url);
|
|
5
|
+
|
|
6
|
+
// src/control-plane-paths.ts
|
|
7
|
+
var CONTROL_PLANE_DIR_VARIABLE = "OUTERLAYER_CONTROL_PLANE_DIR";
|
|
8
|
+
var PROJECT_DIR_SPELLINGS = [
|
|
9
|
+
/"\$\{?CLAUDE_PROJECT_DIR\}?"\/\.claude(?![\w.-])/g,
|
|
10
|
+
/\$\{CLAUDE_PROJECT_DIR\}\/\.claude(?![\w.-])/g,
|
|
11
|
+
/\$CLAUDE_PROJECT_DIR\/\.claude(?![\w.-])/g
|
|
12
|
+
];
|
|
13
|
+
var CONTROL_PLANE_VARIABLE_FORMS = [
|
|
14
|
+
new RegExp(`\\$\\{${CONTROL_PLANE_DIR_VARIABLE}:-[^}]*\\}/\\.claude(?![\\w.-])`, "g"),
|
|
15
|
+
new RegExp(`\\$\\{${CONTROL_PLANE_DIR_VARIABLE}\\}/\\.claude(?![\\w.-])`, "g"),
|
|
16
|
+
new RegExp(`\\$${CONTROL_PLANE_DIR_VARIABLE}/\\.claude(?![\\w.-])`, "g")
|
|
17
|
+
];
|
|
18
|
+
function rewriteHookCommand(command, dir) {
|
|
19
|
+
return PROJECT_DIR_SPELLINGS.reduce((text, pattern) => text.replace(pattern, () => `${dir}/.claude`), command);
|
|
20
|
+
}
|
|
21
|
+
function rewriteControlPlanePaths(text, dir) {
|
|
22
|
+
return text.replace(/(?<![\w./~$}:-])(\.outerlayer|\.claude)\//g, (_match, root) => `${dir}/${root}/`);
|
|
23
|
+
}
|
|
24
|
+
function hookCommandEscapesControlPlane(command) {
|
|
25
|
+
const remaining = [...PROJECT_DIR_SPELLINGS, ...CONTROL_PLANE_VARIABLE_FORMS].reduce((text, pattern) => text.replace(pattern, " "), command);
|
|
26
|
+
return /\.claude(?:\/|["'\s;|&)]|$)/.test(remaining) || /\$\{?CLAUDE_PROJECT_DIR\}?"?\/\.claude/.test(remaining);
|
|
27
|
+
}
|
|
28
|
+
var MINIMUM_CLAUDE_VERSION = "2.1.284";
|
|
29
|
+
function versionParts(text) {
|
|
30
|
+
const found = /(\d+)\.(\d+)\.(\d+)/.exec(text);
|
|
31
|
+
return found === null ? void 0 : [Number(found[1]), Number(found[2]), Number(found[3])];
|
|
32
|
+
}
|
|
33
|
+
function versionAtLeast(text, minimum = MINIMUM_CLAUDE_VERSION) {
|
|
34
|
+
const have = versionParts(text);
|
|
35
|
+
const need = versionParts(minimum);
|
|
36
|
+
if (have === void 0 || need === void 0) return false;
|
|
37
|
+
const difference = have.map((part, i) => part - need[i]).find((delta) => delta !== 0);
|
|
38
|
+
return (difference ?? 0) >= 0;
|
|
39
|
+
}
|
|
40
|
+
var SHIM_SCRIPT = `#!/bin/sh
|
|
41
|
+
exec outerlayer claude "$@"
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
export { CONTROL_PLANE_DIR_VARIABLE, MINIMUM_CLAUDE_VERSION, SHIM_SCRIPT, hookCommandEscapesControlPlane, rewriteControlPlanePaths, rewriteHookCommand, versionAtLeast };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-
|
|
4
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
5
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
6
|
-
import { runnerCredentialProblem } from './chunk-
|
|
7
|
-
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-NL4XPC7W.js';
|
|
4
|
+
import { MIN_ENGINE_MAJOR } from './chunk-Y5MXET4M.js';
|
|
5
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-SWCTGCSC.js';
|
|
6
|
+
import { runnerCredentialProblem } from './chunk-XGP3VYOG.js';
|
|
7
|
+
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-N2PXGQRL.js';
|
|
8
8
|
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
9
9
|
import { dirname } from 'path';
|
|
10
10
|
|
|
@@ -112,7 +112,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
112
112
|
function writeRunnerInit(prepared, runnerKey) {
|
|
113
113
|
const { configPath, config, carried, credential, agent, machine, hooks } = prepared;
|
|
114
114
|
if (prepared.needsKey && runnerKey === void 0) {
|
|
115
|
-
throw new RunnerInitError(`${configPath}: apiKey is missing, and no runner key was
|
|
115
|
+
throw new RunnerInitError(`${configPath}: apiKey is missing, and no runner key was pasted.`);
|
|
116
116
|
}
|
|
117
117
|
if (runnerKey !== void 0) Object.assign(config, { url: runnerKey.url, apiKey: runnerKey.apiKey, appId: runnerKey.appId });
|
|
118
118
|
mkdirSync(runnerDir(configPath), { recursive: true, mode: RUNNER_DIR_MODE });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { C } from './chunk-
|
|
3
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
4
4
|
import { readCloudConfig, removeCloudConfigKeys } from './chunk-EABW6AJQ.js';
|
|
5
5
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
6
6
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { execFileSync } from 'child_process';
|
|
5
|
+
|
|
6
|
+
createRequire(import.meta.url);
|
|
7
|
+
function startTimeOf(pid) {
|
|
8
|
+
if (process.platform === "linux") return startTimeOfLinux(pid);
|
|
9
|
+
return startTimeOfPs(pid);
|
|
10
|
+
}
|
|
11
|
+
function startTimeOfLinux(pid) {
|
|
12
|
+
try {
|
|
13
|
+
const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
14
|
+
const afterComm = stat.slice(stat.lastIndexOf(")") + 1).trim();
|
|
15
|
+
const fields = afterComm.split(/\s+/);
|
|
16
|
+
if (fields[0] === "Z" || fields[0] === "X") return null;
|
|
17
|
+
const starttime = fields[19];
|
|
18
|
+
return starttime ?? null;
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function startTimeOfPs(pid) {
|
|
24
|
+
try {
|
|
25
|
+
const out = execFileSync("ps", ["-o", "lstart=", "-p", String(pid)], { encoding: "utf8" }).trim();
|
|
26
|
+
return out.length > 0 ? out : null;
|
|
27
|
+
} catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function isSameProcess(pid, start) {
|
|
32
|
+
return startTimeOf(pid) === start;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { isSameProcess, startTimeOf };
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LaunchFilter } from './chunk-
|
|
3
|
+
import { LaunchFilter } from './chunk-ESVW4MJY.js';
|
|
4
4
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
5
|
+
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-MQJSXHV7.js';
|
|
5
6
|
import { hookExecSpoolPath } from './chunk-F7CU5ABH.js';
|
|
6
7
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH.js';
|
|
14
|
-
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-J5M7BSJQ.js';
|
|
8
|
+
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-BMYGAGBJ.js';
|
|
9
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
10
|
+
import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-T2Q7ISPE.js';
|
|
11
|
+
import { defaultFetch } from './chunk-ZRL6HKBY.js';
|
|
12
|
+
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-52NC2FIU.js';
|
|
13
|
+
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-N3CUDFCW.js';
|
|
15
14
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-EABW6AJQ.js';
|
|
16
|
-
import { signerFor, signRunnerRequest } from './chunk-
|
|
17
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
15
|
+
import { signerFor, signRunnerRequest } from './chunk-M2ZWWTWZ.js';
|
|
16
|
+
import { writeSyncStatus, spoolDir } from './chunk-ULSIJGLS.js';
|
|
18
17
|
import { removeJournalHooks } from './chunk-XCCLFVXM.js';
|
|
18
|
+
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
19
19
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
20
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
20
21
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
21
22
|
import { dirname, basename, join } from 'path';
|
|
22
23
|
import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
|
|
@@ -668,7 +669,7 @@ var LiveUploader = class {
|
|
|
668
669
|
const credential = this.env.OUTERLAYER_API_KEY;
|
|
669
670
|
const appId = this.env.OUTERLAYER_APP_ID;
|
|
670
671
|
if (!url || !credential || !appId) {
|
|
671
|
-
this.warnOnce("incomplete", `live upload is idle: this build's environment lacks ${[!url && "OUTERLAYER_URL", !credential && "OUTERLAYER_API_KEY", !appId && "OUTERLAYER_APP_ID"].filter(Boolean).join(", ")}, so nothing streams until
|
|
672
|
+
this.warnOnce("incomplete", `live upload is idle: this build's environment lacks ${[!url && "OUTERLAYER_URL", !credential && "OUTERLAYER_API_KEY", !appId && "OUTERLAYER_APP_ID"].filter(Boolean).join(", ")}, so nothing streams until \`${cliInvocation()} sync\` runs.
|
|
672
673
|
`);
|
|
673
674
|
return false;
|
|
674
675
|
}
|
|
@@ -724,7 +725,7 @@ var LiveUploader = class {
|
|
|
724
725
|
this.stopped = true;
|
|
725
726
|
this.onUnauthorized?.();
|
|
726
727
|
this.stderr(
|
|
727
|
-
destination.credential.startsWith("olu_") ? `live upload stopped: the login was refused (expired or revoked). No session streams from this daemon until you run
|
|
728
|
+
destination.credential.startsWith("olu_") ? `live upload stopped: the login was refused (expired or revoked). No session streams from this daemon until you run \`${cliInvocation()} login\` and it restarts.
|
|
728
729
|
` : `live upload stopped: the API key was refused. No session streams from this daemon until it restarts with a valid key.
|
|
729
730
|
`
|
|
730
731
|
);
|
|
@@ -739,7 +740,7 @@ var LiveUploader = class {
|
|
|
739
740
|
lastError: reason,
|
|
740
741
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
741
742
|
});
|
|
742
|
-
this.stderr(`live upload stopped for session ${prepared.id}: ${reason}. The next
|
|
743
|
+
this.stderr(`live upload stopped for session ${prepared.id}: ${reason}. The next \`${cliInvocation()} sync\` uploads it whole.
|
|
743
744
|
`);
|
|
744
745
|
return true;
|
|
745
746
|
}
|
|
@@ -1439,7 +1440,7 @@ async function runSyncInner(opts, stats) {
|
|
|
1439
1440
|
if (opts.quiet || shippedBatches === 0) return;
|
|
1440
1441
|
process.stderr.write(
|
|
1441
1442
|
`
|
|
1442
|
-
${C.yellow}!${C.reset} progress saved: ${synced} session(s) in ${shippedBatches}/${batches.length} batch(es) shipped before the failure \u2014 re-run ${C.dim}
|
|
1443
|
+
${C.yellow}!${C.reset} progress saved: ${synced} session(s) in ${shippedBatches}/${batches.length} batch(es) shipped before the failure \u2014 re-run ${C.dim}${cliInvocation()} sync${C.reset} to resume from there.
|
|
1443
1444
|
`
|
|
1444
1445
|
);
|
|
1445
1446
|
};
|