deepline 0.3.395 → 0.3.397
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/bundling-sources/sdk/src/plays/play-description.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
- package/dist/cli/{auth-NMQXZRS7.mjs → auth-AZJFXGKP.mjs} +5 -4
- package/dist/cli/auth-CZJQU7B5.js +40 -0
- package/dist/cli/{billing-Z4JTGUU3.js → billing-MQV5AGDJ.js} +77 -76
- package/dist/cli/{billing-5MVXZRS6.mjs → billing-MZAAUHGH.mjs} +6 -5
- package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-2LDADJNO.mjs} +7 -107
- package/dist/cli/{chunk-UKU6JM3S.js → chunk-3VP34TAU.js} +8 -8
- package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-4D745XZO.mjs} +21 -108
- package/dist/cli/chunk-7DRPTGCK.js +930 -0
- package/dist/cli/{chunk-ZMVJSS6N.js → chunk-BQR6UN3C.js} +62 -78
- package/dist/cli/{chunk-HRWUQJ4K.js → chunk-DQ65ZVHN.js} +6 -6
- package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
- package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-F3BUFYKE.mjs} +182 -1031
- package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
- package/dist/cli/{describe-DBRY5BNK.mjs → chunk-HFYQBC2D.mjs} +51 -171
- package/dist/cli/chunk-HGFFYVXN.js +210 -0
- package/dist/cli/{chunk-VB6KECLU.mjs → chunk-IHG7UAHD.mjs} +63 -79
- package/dist/cli/{chunk-TO2MWPGR.js → chunk-IZ74ABSX.js} +1 -1
- package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-J7ABTQQ7.mjs} +5 -3
- package/dist/cli/{chunk-LZLBR2SF.js → chunk-K33MXVXQ.js} +323 -1172
- package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
- package/dist/cli/chunk-LJ5747UC.mjs +107 -0
- package/dist/cli/{chunk-BON3DRC6.mjs → chunk-MRXMMERY.mjs} +1 -1
- package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-MV7QRALK.mjs} +3 -3
- package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-MYPH2LUU.mjs} +2 -2
- package/dist/cli/{chunk-RDXFGPJU.js → chunk-NA4T3B62.js} +64 -272
- package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-NOX2TCBP.mjs} +1 -1
- package/dist/cli/chunk-OSDXE27V.mjs +88 -0
- package/dist/cli/{chunk-R4XZO6Z5.js → chunk-PSGEDGLT.js} +28 -115
- package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
- package/dist/cli/chunk-RFG3MRAC.js +286 -0
- package/dist/cli/{chunk-47M6HPGP.mjs → chunk-RNSWDKBM.mjs} +1 -1
- package/dist/cli/{chunk-56IFFVIB.js → chunk-RYW4HPSM.js} +21 -121
- package/dist/cli/{chunk-K5T3EN6D.js → chunk-SO7RUVTY.js} +26 -26
- package/dist/cli/{chunk-KZZC33PY.mjs → chunk-TXZVVBQZ.mjs} +63 -271
- package/dist/cli/{chunk-36ML3YKA.js → chunk-UVXBVUZQ.js} +15 -13
- package/dist/cli/{chunk-PZ5BZ76S.js → chunk-VTF4RRWJ.js} +50 -50
- package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-W3HMGKMI.mjs} +2 -2
- package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-WM2QEHZL.mjs} +2 -2
- package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
- package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
- package/dist/cli/{chunk-UCXK2DS4.js → chunk-YLRME7MK.js} +15 -15
- package/dist/cli/{chunk-MYIBHORT.js → chunk-YSVORIEW.js} +2 -2
- package/dist/cli/{chunk-OCSG6X67.mjs → chunk-YUDKBQUD.mjs} +4 -4
- package/dist/cli/chunk-ZAAKSJAS.js +88 -0
- package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-ZHUMDMOS.js} +65 -65
- package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
- package/dist/cli/{csv-HTS5ZYQ4.js → csv-AQBQ5O3I.js} +13 -12
- package/dist/cli/{csv-SVOD5UBH.mjs → csv-MB7PJMYQ.mjs} +4 -3
- package/dist/cli/{db-7AP4P52N.js → db-JPUYC5RB.js} +31 -30
- package/dist/cli/{db-7QLNI3Q4.mjs → db-L5IEI2AU.mjs} +6 -5
- package/dist/cli/describe-6WT74AOR.js +164 -0
- package/dist/cli/describe-S6BFANVI.mjs +164 -0
- package/dist/cli/describe-core.d.mts +100 -0
- package/dist/cli/describe-core.d.ts +100 -0
- package/dist/cli/describe-core.js +18 -0
- package/dist/cli/describe-core.mjs +18 -0
- package/dist/cli/{executions-GRQXTB2P.js → executions-6TMQTFP4.js} +8 -7
- package/dist/cli/{executions-QNZTPNG4.mjs → executions-L7I2ZW4Z.mjs} +6 -5
- package/dist/cli/{feedback-JMCSR624.mjs → feedback-DSJ63HK6.mjs} +4 -3
- package/dist/cli/{feedback-ZOLA2KY7.js → feedback-XF7CQGMD.js} +8 -7
- package/dist/cli/{git-LJGL2IHS.mjs → git-C3ENM67D.mjs} +5 -4
- package/dist/cli/git-HYDZK2QR.js +24 -0
- package/dist/cli/index.js +96 -94
- package/dist/cli/index.mjs +41 -39
- package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-B2NHWIVD.js} +8 -7
- package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
- package/dist/cli/{monitors-WMZ6HJZX.js → monitors-ORFWOVZB.js} +87 -86
- package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-TCEDBDGY.mjs} +6 -5
- package/dist/cli/{org-U3WA2NQM.mjs → org-45KREIKZ.mjs} +6 -5
- package/dist/cli/{org-PFHM5ZLY.js → org-T74CJESN.js} +66 -65
- package/dist/cli/{chunk-XMAPE2KH.mjs → play-MU7MYBIM.mjs} +78 -131
- package/dist/cli/{chunk-4KLCLLTO.js → play-XHK2LPON.js} +273 -326
- package/dist/cli/{providers-XYMHLKCA.js → providers-4MGQKYFD.js} +9 -8
- package/dist/cli/{providers-QBBRFBOH.mjs → providers-VYCXIJT5.mjs} +6 -5
- package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-47G3VEOT.js} +6 -5
- package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-H724EFM2.mjs} +4 -3
- package/dist/cli/search-3356ENLD.js +30 -0
- package/dist/cli/{search-X6W6GRHS.mjs → search-VQHXEFQ4.mjs} +8 -6
- package/dist/cli/{secrets-UHG6OQFD.js → secrets-ALLKCU35.js} +15 -14
- package/dist/cli/{secrets-N55B67H6.mjs → secrets-CPBNGA44.mjs} +6 -5
- package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-7RSQB7IX.mjs} +5 -4
- package/dist/cli/sessions-FKGAY7WQ.js +16 -0
- package/dist/cli/{settings-Q24HRAQI.mjs → settings-UYSGV4IC.mjs} +9 -8
- package/dist/cli/{settings-ATX4U5AS.js → settings-Y5BI42P7.js} +76 -75
- package/dist/cli/{setup-77ZWLVHT.mjs → setup-L3ZBBTS4.mjs} +7 -6
- package/dist/cli/{setup-EJCNOUCE.js → setup-VXQPEU3E.js} +42 -41
- package/dist/cli/skills-DUZQTDTE.js +29 -0
- package/dist/cli/{skills-XIS5AWQI.mjs → skills-QHVDLSFE.mjs} +5 -4
- package/dist/cli/{tools-WCKLYEGQ.mjs → tools-LSCEK4K2.mjs} +16 -19
- package/dist/cli/tools-YWU5QOQ5.js +39 -0
- package/dist/cli/update-5LYQAI55.js +29 -0
- package/dist/cli/{update-UT5WANMV.mjs → update-CU22OTBM.mjs} +7 -6
- package/dist/cli/{workflow-226QYUN2.js → workflow-ERFLTRNX.js} +17 -16
- package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-KQARK5BZ.mjs} +7 -6
- package/dist/{client-hdFtwhTm.d.mts → client-D0j-_aaa.d.mts} +2 -1
- package/dist/{client-CivP-PAI.d.ts → client-DflfVyj6.d.ts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -11
- package/dist/index.mjs +19 -15
- package/dist/install-integrity.json +94 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +4 -2
- package/dist/plays/play-description.mjs +3 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +6 -1
- package/dist/cli/auth-UYCOBAL5.js +0 -39
- package/dist/cli/describe-YKOE54ZO.js +0 -406
- package/dist/cli/git-EJQLRK27.js +0 -23
- package/dist/cli/play-AGSECQFN.mjs +0 -159
- package/dist/cli/play-BR2LWGXK.js +0 -159
- package/dist/cli/search-ZVSYH5GY.js +0 -28
- package/dist/cli/sessions-57L5MGHN.js +0 -15
- package/dist/cli/skills-SPXUBLII.js +0 -28
- package/dist/cli/tools-DBHUUZJX.js +0 -42
- package/dist/cli/update-VSNFXRHJ.js +0 -28
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
|
|
4
|
-
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
|
+
var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
10
|
+
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
11
|
+
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -14,105 +17,7 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
14
17
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
15
18
|
|
|
16
19
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
// src/errors.ts
|
|
20
|
-
var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
21
|
-
__init() {this.outcome = "unknown"}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
constructor(cause, operationKey, options = {}) {
|
|
25
|
-
const recoveryAvailable = operationKey !== void 0 && options.recoveryAvailable !== false;
|
|
26
|
-
super(
|
|
27
|
-
operationKey === void 0 ? "SQL outcome is unknown. The unkeyed request was attempted once; inspect the database before issuing another write. An operation key added afterwards cannot recover this request." : recoveryAvailable ? "SQL outcome is unknown. Recover by submitting the same SQL and options with the original operation key; do not use a new key." : "SQL outcome is unknown. The server did not confirm atomic recovery support. Do not resubmit this write; inspect the database and confirm reader support before recovering with the original operation key.",
|
|
28
|
-
cause.statusCode,
|
|
29
|
-
"CUSTOMER_DB_QUERY_OUTCOME_UNKNOWN",
|
|
30
|
-
{
|
|
31
|
-
outcome: "unknown",
|
|
32
|
-
recovery: recoveryAvailable ? "original_operation_key" : "unavailable",
|
|
33
|
-
causeCode: cause.code
|
|
34
|
-
}
|
|
35
|
-
);_class.prototype.__init.call(this);;
|
|
36
|
-
this.name = "CustomerDbQueryOutcomeUnknownError";
|
|
37
|
-
this.operationKey = operationKey;
|
|
38
|
-
this.retryable = recoveryAvailable;
|
|
39
|
-
Object.defineProperty(this, "cause", { value: cause, configurable: true });
|
|
40
|
-
}
|
|
41
|
-
}, _class);
|
|
42
|
-
var AuthError = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
43
|
-
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
44
|
-
constructor(message = "Authentication failed. Check your DEEPLINE_API_KEY.") {
|
|
45
|
-
super(message, 401, "AUTH_ERROR");
|
|
46
|
-
this.name = "AuthError";
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var RateLimitError = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
50
|
-
/** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
|
|
51
|
-
|
|
52
|
-
/** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
|
|
53
|
-
constructor(retryAfterMs = 5e3, message) {
|
|
54
|
-
super(
|
|
55
|
-
_nullishCoalesce(message, () => ( `Rate limited. Retry after ${retryAfterMs}ms.`)),
|
|
56
|
-
429,
|
|
57
|
-
"RATE_LIMIT"
|
|
58
|
-
);
|
|
59
|
-
this.name = "RateLimitError";
|
|
60
|
-
this.retryAfterMs = retryAfterMs;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var ToolRateLimitError = class extends RateLimitError {
|
|
64
|
-
/** Public tool id passed to `tools.execute`. */
|
|
65
|
-
|
|
66
|
-
/** Provider responsible for the operation, or `null`. */
|
|
67
|
-
|
|
68
|
-
/** Provider operation name, or `null`. */
|
|
69
|
-
|
|
70
|
-
/** Stable machine-readable failure code when one exists. */
|
|
71
|
-
|
|
72
|
-
/** Boundary responsible for the failure. */
|
|
73
|
-
|
|
74
|
-
/** Stable reason family for policy and diagnostics. */
|
|
75
|
-
|
|
76
|
-
/** Whether repeating the same semantic call is delivery-safe. */
|
|
77
|
-
|
|
78
|
-
/** Provider or Deepline request id, or `null`. */
|
|
79
|
-
|
|
80
|
-
/** Network failure kind, or `null` for non-network failures. */
|
|
81
|
-
|
|
82
|
-
/** Network boundary that failed, or `null` for non-network failures. */
|
|
83
|
-
|
|
84
|
-
/** Explicitly allowlisted diagnostics safe for SDK callers. */
|
|
85
|
-
|
|
86
|
-
/** Constructed by the SDK after a structured tool HTTP 429. */
|
|
87
|
-
constructor(message, options) {
|
|
88
|
-
super(_nullishCoalesce(options.retryAfterMs, () => ( 5e3)), message);
|
|
89
|
-
this.name = "ToolRateLimitError";
|
|
90
|
-
this.statusCode = _nullishCoalesce(options.statusCode, () => ( 429));
|
|
91
|
-
this.code = _nullishCoalesce(options.code, () => ( void 0));
|
|
92
|
-
this.toolId = options.toolId;
|
|
93
|
-
this.provider = options.provider;
|
|
94
|
-
this.operation = options.operation;
|
|
95
|
-
this.origin = options.origin;
|
|
96
|
-
this.category = options.category;
|
|
97
|
-
this.retryable = options.retryable;
|
|
98
|
-
this.requestId = options.requestId;
|
|
99
|
-
this.networkKind = options.networkKind;
|
|
100
|
-
this.networkScope = options.networkScope;
|
|
101
|
-
this.publicDetails = _nullishCoalesce(options.publicDetails, () => ( null));
|
|
102
|
-
this.details = options.details;
|
|
103
|
-
_chunk7P5AA3SNjs.brandAsToolExecutionError.call(void 0, this);
|
|
104
|
-
if (_chunk7P5AA3SNjs.isProviderTransientFailure.call(void 0, this)) {
|
|
105
|
-
_chunk7P5AA3SNjs.brandAsProviderTransientError.call(void 0, this);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
var ConfigError = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
110
|
-
/** Construct a local SDK configuration failure. */
|
|
111
|
-
constructor(message) {
|
|
112
|
-
super(message, void 0, "CONFIG_ERROR");
|
|
113
|
-
this.name = "ConfigError";
|
|
114
|
-
}
|
|
115
|
-
};
|
|
20
|
+
var _chunkIZ74ABSXjs = require('./chunk-IZ74ABSX.js');
|
|
116
21
|
|
|
117
22
|
// src/config.ts
|
|
118
23
|
|
|
@@ -473,7 +378,7 @@ function resolveBaseUrlOnly(options) {
|
|
|
473
378
|
_optionalChain([options, 'optionalAccess', _32 => _32.baseUrl, 'optionalAccess', _33 => _33.trim, 'call', _34 => _34()]) || autoDetectBaseUrl()
|
|
474
379
|
);
|
|
475
380
|
if (!baseUrl) {
|
|
476
|
-
throw new ConfigError(
|
|
381
|
+
throw new (0, _chunkQ2E4E4FJjs.ConfigError)(
|
|
477
382
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
478
383
|
);
|
|
479
384
|
}
|
|
@@ -484,13 +389,13 @@ function resolveConfig(options) {
|
|
|
484
389
|
_optionalChain([options, 'optionalAccess', _35 => _35.baseUrl, 'optionalAccess', _36 => _36.trim, 'call', _37 => _37()]) || autoDetectBaseUrl()
|
|
485
390
|
);
|
|
486
391
|
if (!baseUrl) {
|
|
487
|
-
throw new ConfigError(
|
|
392
|
+
throw new (0, _chunkQ2E4E4FJjs.ConfigError)(
|
|
488
393
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
489
394
|
);
|
|
490
395
|
}
|
|
491
396
|
const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess', _38 => _38.apiKey]));
|
|
492
397
|
if (!apiKey) {
|
|
493
|
-
throw new ConfigError(
|
|
398
|
+
throw new (0, _chunkQ2E4E4FJjs.ConfigError)(
|
|
494
399
|
`No API key found. Set ${API_KEY_ENV}, add it to .env.deepline, or run: deepline auth register`
|
|
495
400
|
);
|
|
496
401
|
}
|
|
@@ -593,7 +498,7 @@ function findNearestGitCommonDir(startDir) {
|
|
|
593
498
|
function saveProjectDeeplineEnvValues(values, startDir = process.cwd()) {
|
|
594
499
|
const target = resolveProjectPinTarget(startDir);
|
|
595
500
|
if (!target.ok) {
|
|
596
|
-
throw new ConfigError(
|
|
501
|
+
throw new (0, _chunkQ2E4E4FJjs.ConfigError)(
|
|
597
502
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
598
503
|
", "
|
|
599
504
|
)}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder before running this command.`
|
|
@@ -744,9 +649,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
744
649
|
}
|
|
745
650
|
|
|
746
651
|
// src/version.ts
|
|
747
|
-
var SDK_VERSION =
|
|
748
|
-
var SDK_API_MAJOR =
|
|
749
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
652
|
+
var SDK_VERSION = _chunkIZ74ABSXjs.SDK_RELEASE.version;
|
|
653
|
+
var SDK_API_MAJOR = _chunkIZ74ABSXjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
654
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkIZ74ABSXjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
750
655
|
|
|
751
656
|
// src/agent-runtime.ts
|
|
752
657
|
|
|
@@ -1549,7 +1454,7 @@ var HttpClient = class {
|
|
|
1549
1454
|
if (response.status === 429) {
|
|
1550
1455
|
const retryAfter = parseRetryAfter(response);
|
|
1551
1456
|
const failure = _chunk7P5AA3SNjs.serializeToolExecutionFailure.call(void 0, structuredToolError);
|
|
1552
|
-
lastError = failure === null ? structuredToolError : new ToolRateLimitError(structuredToolError.message, {
|
|
1457
|
+
lastError = failure === null ? structuredToolError : new (0, _chunkQ2E4E4FJjs.ToolRateLimitError)(structuredToolError.message, {
|
|
1553
1458
|
...failure,
|
|
1554
1459
|
retryAfterMs: _nullishCoalesce(failure.retryAfterMs, () => ( Math.max(0, retryAfter)))
|
|
1555
1460
|
});
|
|
@@ -1571,7 +1476,7 @@ var HttpClient = class {
|
|
|
1571
1476
|
);
|
|
1572
1477
|
}
|
|
1573
1478
|
const retryAfter = parseRetryAfter(response);
|
|
1574
|
-
lastError = new RateLimitError(retryAfter);
|
|
1479
|
+
lastError = new (0, _chunkQ2E4E4FJjs.RateLimitError)(retryAfter);
|
|
1575
1480
|
if (attempt < maxRetries) {
|
|
1576
1481
|
retryAfterDelayMs = retryAfter;
|
|
1577
1482
|
break;
|
|
@@ -1579,7 +1484,7 @@ var HttpClient = class {
|
|
|
1579
1484
|
throw lastError;
|
|
1580
1485
|
}
|
|
1581
1486
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
1582
|
-
throw new AuthError(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1487
|
+
throw new (0, _chunkQ2E4E4FJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1583
1488
|
}
|
|
1584
1489
|
if (!response.ok) {
|
|
1585
1490
|
const retryableApiError = _optionalChain([options, 'optionalAccess', _199 => _199.retryApiErrors]) === true && isRetryableApiErrorResponse(response.status);
|
|
@@ -1638,10 +1543,10 @@ var HttpClient = class {
|
|
|
1638
1543
|
lastError = requestCancelledError(options.signal);
|
|
1639
1544
|
break requestAttempts;
|
|
1640
1545
|
}
|
|
1641
|
-
if (error instanceof AuthError || error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
1546
|
+
if (error instanceof _chunkQ2E4E4FJjs.AuthError || error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
1642
1547
|
throw error;
|
|
1643
1548
|
}
|
|
1644
|
-
if (error instanceof RateLimitError) {
|
|
1549
|
+
if (error instanceof _chunkQ2E4E4FJjs.RateLimitError) {
|
|
1645
1550
|
lastError = error;
|
|
1646
1551
|
break;
|
|
1647
1552
|
}
|
|
@@ -1752,7 +1657,7 @@ var HttpClient = class {
|
|
|
1752
1657
|
const body = await response.text();
|
|
1753
1658
|
const parsed = parseResponseBody(body);
|
|
1754
1659
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
1755
|
-
throw new AuthError(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1660
|
+
throw new (0, _chunkQ2E4E4FJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1756
1661
|
}
|
|
1757
1662
|
const htmlError = detectHtmlErrorBody(
|
|
1758
1663
|
body,
|
|
@@ -1783,7 +1688,7 @@ var HttpClient = class {
|
|
|
1783
1688
|
yield* decodeSseStream(response.body);
|
|
1784
1689
|
return;
|
|
1785
1690
|
} catch (error) {
|
|
1786
|
-
if (error instanceof AuthError || error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
1691
|
+
if (error instanceof _chunkQ2E4E4FJjs.AuthError || error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
1787
1692
|
throw error;
|
|
1788
1693
|
}
|
|
1789
1694
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
@@ -2048,9 +1953,4 @@ ${COWORK_NETWORK_HINT}`;
|
|
|
2048
1953
|
|
|
2049
1954
|
|
|
2050
1955
|
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
exports.CustomerDbQueryOutcomeUnknownError = CustomerDbQueryOutcomeUnknownError; exports.AuthError = AuthError; exports.RateLimitError = RateLimitError; exports.ToolRateLimitError = ToolRateLimitError; exports.ConfigError = ConfigError; exports.HOST_URL_ENV = HOST_URL_ENV; exports.API_KEY_ENV = API_KEY_ENV; exports.ACTIVE_ORG_ID_ENV = ACTIVE_ORG_ID_ENV; exports.ACTIVE_ORG_NAME_ENV = ACTIVE_ORG_NAME_ENV; exports.FEATURES_ENV = FEATURES_ENV; exports.PROD_URL = PROD_URL; exports.featureEnvValues = featureEnvValues; exports.storedHostApiKey = storedHostApiKey; exports.storedHostFeatures = storedHostFeatures; exports.baseUrlSlug = baseUrlSlug; exports.sdkCliStateDirPath = sdkCliStateDirPath; exports.hostConfigDirPath = hostConfigDirPath; exports.hostEnvFilePath = hostEnvFilePath; exports.saveHostEnvValues = saveHostEnvValues; exports.autoDetectBaseUrl = autoDetectBaseUrl; exports.resolveApiKeyForBaseUrl = resolveApiKeyForBaseUrl; exports.resolveProjectApiKeyForBaseUrl = resolveProjectApiKeyForBaseUrl; exports.resolveGlobalApiKeyForBaseUrl = resolveGlobalApiKeyForBaseUrl; exports.getResolvedProjectAuthSource = getResolvedProjectAuthSource; exports.resolveBaseUrlOnly = resolveBaseUrlOnly; exports.resolveConfig = resolveConfig; exports.ensureProjectPrivatePathsIgnored = ensureProjectPrivatePathsIgnored; exports.saveProjectDeeplineEnvValues = saveProjectDeeplineEnvValues; exports.resolveProjectPinTarget = resolveProjectPinTarget; exports.getActiveProjectAuthSource = getActiveProjectAuthSource; exports.resolveCliAuthProvenance = resolveCliAuthProvenance; exports.resolveCliCommandContext = resolveCliCommandContext; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.agentSessionIdFromEnvironment = agentSessionIdFromEnvironment; exports.detectAgentRuntime = detectAgentRuntime; exports.hasActivePluginSkills = hasActivePluginSkills; exports.KNOWN_SKILL_AGENTS = KNOWN_SKILL_AGENTS; exports.DEFAULT_SKILL_AGENTS = DEFAULT_SKILL_AGENTS; exports.skillsAgentPathSegment = skillsAgentPathSegment; exports.resolveAutoSyncSkillAgents = resolveAutoSyncSkillAgents; exports.readSdkSkillsLocalVersion = readSdkSkillsLocalVersion; exports.writeSdkSkillsLocalVersion = writeSdkSkillsLocalVersion; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; exports.COORDINATOR_INTERNAL_TOKEN_HEADER = COORDINATOR_INTERNAL_TOKEN_HEADER; exports.RUNTIME_ENVIRONMENT_TOKEN_HEADER = RUNTIME_ENVIRONMENT_TOKEN_HEADER; exports.RETAINED_PIPELINE_RECEIVERS_HEADER = RETAINED_PIPELINE_RECEIVERS_HEADER; exports.HttpClient = HttpClient;
|
|
1956
|
+
exports.HOST_URL_ENV = HOST_URL_ENV; exports.API_KEY_ENV = API_KEY_ENV; exports.ACTIVE_ORG_ID_ENV = ACTIVE_ORG_ID_ENV; exports.ACTIVE_ORG_NAME_ENV = ACTIVE_ORG_NAME_ENV; exports.FEATURES_ENV = FEATURES_ENV; exports.PROD_URL = PROD_URL; exports.featureEnvValues = featureEnvValues; exports.storedHostApiKey = storedHostApiKey; exports.storedHostFeatures = storedHostFeatures; exports.baseUrlSlug = baseUrlSlug; exports.sdkCliStateDirPath = sdkCliStateDirPath; exports.hostConfigDirPath = hostConfigDirPath; exports.hostEnvFilePath = hostEnvFilePath; exports.saveHostEnvValues = saveHostEnvValues; exports.autoDetectBaseUrl = autoDetectBaseUrl; exports.resolveApiKeyForBaseUrl = resolveApiKeyForBaseUrl; exports.resolveProjectApiKeyForBaseUrl = resolveProjectApiKeyForBaseUrl; exports.resolveGlobalApiKeyForBaseUrl = resolveGlobalApiKeyForBaseUrl; exports.getResolvedProjectAuthSource = getResolvedProjectAuthSource; exports.resolveBaseUrlOnly = resolveBaseUrlOnly; exports.resolveConfig = resolveConfig; exports.ensureProjectPrivatePathsIgnored = ensureProjectPrivatePathsIgnored; exports.saveProjectDeeplineEnvValues = saveProjectDeeplineEnvValues; exports.resolveProjectPinTarget = resolveProjectPinTarget; exports.getActiveProjectAuthSource = getActiveProjectAuthSource; exports.resolveCliAuthProvenance = resolveCliAuthProvenance; exports.resolveCliCommandContext = resolveCliCommandContext; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.agentSessionIdFromEnvironment = agentSessionIdFromEnvironment; exports.detectAgentRuntime = detectAgentRuntime; exports.hasActivePluginSkills = hasActivePluginSkills; exports.KNOWN_SKILL_AGENTS = KNOWN_SKILL_AGENTS; exports.DEFAULT_SKILL_AGENTS = DEFAULT_SKILL_AGENTS; exports.skillsAgentPathSegment = skillsAgentPathSegment; exports.resolveAutoSyncSkillAgents = resolveAutoSyncSkillAgents; exports.readSdkSkillsLocalVersion = readSdkSkillsLocalVersion; exports.writeSdkSkillsLocalVersion = writeSdkSkillsLocalVersion; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; exports.COORDINATOR_INTERNAL_TOKEN_HEADER = COORDINATOR_INTERNAL_TOKEN_HEADER; exports.RUNTIME_ENVIRONMENT_TOKEN_HEADER = RUNTIME_ENVIRONMENT_TOKEN_HEADER; exports.RETAINED_PIPELINE_RECEIVERS_HEADER = RETAINED_PIPELINE_RECEIVERS_HEADER; exports.HttpClient = HttpClient;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRYW4HPSMjs = require('./chunk-RYW4HPSM.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkRYW4HPSMjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkDQ65ZVHNjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|