deepline 0.3.546 → 0.3.547
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/client-core.ts +13 -0
- package/dist/bundling-sources/sdk/src/index.ts +7 -1
- package/dist/bundling-sources/sdk/src/integrations.ts +17 -7
- package/dist/bundling-sources/sdk/src/play.ts +71 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +13 -4
- package/dist/bundling-sources/sdk/src/types.ts +33 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/calendar-delegation.ts +7 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +19 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +17 -2
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +57 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +295 -52
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +10 -1
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-decision-tracker.ts +135 -0
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-fail-open.ts +177 -0
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-node-io.ts +99 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +16 -10
- package/dist/bundling-sources/shared_libs/play-runtime/fenced-call-diagnostics.ts +211 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +52 -14
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +21 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +48 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +6 -1
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +716 -51
- package/dist/bundling-sources/shared_libs/plays/docflow-decision-arms.ts +146 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-flow-order.ts +94 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-unreached-reason.ts +10 -1
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +787 -117
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +8 -2
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +13 -0
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +25 -0
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +56 -0
- package/dist/cli/auth-AC5277PI.js +43 -0
- package/dist/cli/{auth-KFWG72AZ.mjs → auth-WJEY4IDX.mjs} +5 -5
- package/dist/cli/{billing-OQVOAZ4S.js → billing-IJITDDRQ.js} +96 -96
- package/dist/cli/{billing-MMZ336HO.mjs → billing-PHJUDYF3.mjs} +10 -10
- package/dist/cli/{chunk-TBWYZOSV.js → chunk-2AHY47SI.js} +3 -3
- package/dist/cli/{chunk-MXQP7CXZ.js → chunk-2HPTLBNB.js} +3 -3
- package/dist/cli/{chunk-TI6DTURF.js → chunk-4WAM6TLD.js} +7 -1
- package/dist/cli/{chunk-JARZ47OP.mjs → chunk-56MEAGWA.mjs} +2 -2
- package/dist/cli/{chunk-GYTSDSQD.mjs → chunk-5SFHPMBY.mjs} +11 -11
- package/dist/cli/{chunk-Z3UEBFIN.js → chunk-ABLTVG3J.js} +41 -41
- package/dist/cli/{chunk-LX2TC3HO.mjs → chunk-AEQ5VWZ5.mjs} +4 -4
- package/dist/cli/{chunk-MI7X6V6V.mjs → chunk-CKIRKYW7.mjs} +3 -3
- package/dist/cli/{chunk-2JHYYB3F.js → chunk-CSPHSNBW.js} +3 -3
- package/dist/cli/{chunk-IVWU7SJC.js → chunk-D6OIEH47.js} +5 -5
- package/dist/cli/{chunk-KUK7ARXA.mjs → chunk-DIUNDLSX.mjs} +2 -2
- package/dist/cli/{chunk-RO66FPTS.mjs → chunk-DJI5CLLW.mjs} +1 -1
- package/dist/cli/{chunk-LIJKRDDG.js → chunk-DZC7LMYM.js} +6 -6
- package/dist/cli/{chunk-UQJBV5PM.js → chunk-E2OIYPB4.js} +10 -10
- package/dist/cli/{chunk-JA633HRV.mjs → chunk-ECUD4QPD.mjs} +3 -3
- package/dist/cli/{chunk-VPERQ3U6.mjs → chunk-ESCVHDNY.mjs} +5 -5
- package/dist/cli/{chunk-JVOUQFHT.js → chunk-FFBXLFKV.js} +1 -1
- package/dist/cli/{chunk-3DUNNZB6.mjs → chunk-FMQXAOVE.mjs} +4 -4
- package/dist/cli/{chunk-HXIR3VQL.mjs → chunk-FZHMNK6F.mjs} +7 -1
- package/dist/cli/{chunk-PU3ZAG6V.mjs → chunk-G6KW764N.mjs} +1 -1
- package/dist/cli/{chunk-EEG46QZY.mjs → chunk-G6XTCG3J.mjs} +2 -2
- package/dist/cli/{chunk-EEJHB76U.js → chunk-GIGAYLY6.js} +12 -12
- package/dist/cli/{chunk-BLYW6FFB.js → chunk-GJA2PRHJ.js} +2 -2
- package/dist/cli/{chunk-H7Q5IDO3.js → chunk-GJOGFWX3.js} +20 -20
- package/dist/cli/{chunk-6Y5TU3R7.mjs → chunk-GPAWLXW3.mjs} +1 -1
- package/dist/cli/{chunk-5W4ENHWM.js → chunk-GZFZZQL4.js} +285 -264
- package/dist/cli/{chunk-P7A3H6G5.mjs → chunk-HARZ4AAX.mjs} +1 -1
- package/dist/cli/{chunk-MEGHIX4M.js → chunk-HFIFKP3A.js} +5 -5
- package/dist/cli/{chunk-LHE2TSV6.mjs → chunk-IGAK22XO.mjs} +1 -1
- package/dist/cli/{chunk-VTK3HGMN.mjs → chunk-IKYN6PLO.mjs} +5 -5
- package/dist/cli/{chunk-UREAIHUU.mjs → chunk-ITLZBDSR.mjs} +3 -3
- package/dist/cli/{chunk-6LG7MLJ2.js → chunk-IVFFCAV2.js} +44 -44
- package/dist/cli/{chunk-SYTWWVIQ.js → chunk-K3GMDSUX.js} +5 -5
- package/dist/cli/{chunk-WKHPLBJK.js → chunk-L5J6UJ2X.js} +15 -15
- package/dist/cli/{chunk-X5KOHDJN.mjs → chunk-L6QE2XVM.mjs} +1 -1
- package/dist/cli/{chunk-SH32HL7I.js → chunk-LMLSOHTU.js} +53 -53
- package/dist/cli/{chunk-JCWNF44W.js → chunk-MBQELFL7.js} +22 -22
- package/dist/cli/{chunk-Z7SXGOIQ.mjs → chunk-MF7PCM6C.mjs} +1 -1
- package/dist/cli/{chunk-F2VEFMU5.js → chunk-MO7TGNXB.js} +13 -13
- package/dist/cli/{chunk-7ZW67ME6.mjs → chunk-MOZEAGSR.mjs} +1 -1
- package/dist/cli/{chunk-5VNQMVCU.js → chunk-N63U5CRG.js} +26 -26
- package/dist/cli/{chunk-JCH4UNNS.js → chunk-NBYFQZ6O.js} +2 -2
- package/dist/cli/{chunk-BTFUAGHC.js → chunk-OVYXYTEP.js} +16 -16
- package/dist/cli/{chunk-J65HJCJO.mjs → chunk-PBMO36BP.mjs} +2 -2
- package/dist/cli/{chunk-F5YQXCP3.js → chunk-PVQCX6KQ.js} +50 -7
- package/dist/cli/{chunk-K2XELBPF.mjs → chunk-QLE3QKJ2.mjs} +5 -5
- package/dist/cli/{chunk-VAT2SXFF.js → chunk-QU3K3IY6.js} +12 -12
- package/dist/cli/{chunk-JYG4XZLT.js → chunk-REAFIEV5.js} +99 -99
- package/dist/cli/{chunk-5OEFXAKP.mjs → chunk-RMCCB3XY.mjs} +50 -7
- package/dist/cli/{chunk-HJR2DDJS.mjs → chunk-RXRC2COC.mjs} +2 -2
- package/dist/cli/{chunk-4AZLGNXV.js → chunk-SAJWYN4B.js} +4 -4
- package/dist/cli/{chunk-VXTTAYOT.mjs → chunk-TNJG4ZPN.mjs} +3 -3
- package/dist/cli/{chunk-PMDHY2YK.js → chunk-VNOQEDVC.js} +7 -7
- package/dist/cli/{chunk-GOOF7E2B.mjs → chunk-VPF54TXQ.mjs} +5 -5
- package/dist/cli/{chunk-2HSZCQMT.mjs → chunk-WYT3H6JD.mjs} +1 -1
- package/dist/cli/{chunk-OAKWSLKS.mjs → chunk-XMBVHJPR.mjs} +28 -7
- package/dist/cli/{chunk-7MY7KWJS.mjs → chunk-XNTDTAKC.mjs} +1 -1
- package/dist/cli/{chunk-5V7NZKGG.js → chunk-YURGAKI3.js} +2 -2
- package/dist/cli/{chunk-ND7SFRQL.js → chunk-YVKLF7RW.js} +2 -2
- package/dist/cli/{chunk-6FBDTYR2.mjs → chunk-Z2YGQZWV.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-C2O5YKQA.mjs → concurrent-runs-help-ZNGP563R.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-ZYISYOQA.js +21 -0
- package/dist/cli/{csv-Z4DNGR54.mjs → csv-VAHQHYYV.mjs} +4 -4
- package/dist/cli/{csv-MJDNOIQJ.js → csv-X6D4ZELE.js} +13 -13
- package/dist/cli/{db-4RL2BNOF.mjs → db-4G4S2VOV.mjs} +7 -7
- package/dist/cli/{db-S5QVPK5E.js → db-YA5ZGVEX.js} +28 -28
- package/dist/cli/{describe-L4P5SZLQ.mjs → describe-EVXEM2S6.mjs} +19 -19
- package/dist/cli/describe-GYYSLZLV.js +50 -0
- package/dist/cli/describe-core.d.mts +4 -4
- package/dist/cli/describe-core.d.ts +4 -4
- package/dist/cli/{executions-MFZ2Z36O.js → executions-5YC7ABF6.js} +9 -9
- package/dist/cli/{executions-RR6O3XK5.mjs → executions-HR6CTN5M.mjs} +7 -7
- package/dist/cli/{feedback-EQBQ3ABB.mjs → feedback-GEU5SPLR.mjs} +6 -6
- package/dist/cli/{feedback-YDAG7VH2.js → feedback-MJHSYLFF.js} +14 -14
- package/dist/cli/git-FZIQZNI4.js +25 -0
- package/dist/cli/{git-YGLCCU35.mjs → git-NPFF6QUS.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-IQXYMRMW.js → integrations-YPHFI77G.js} +19 -17
- package/dist/cli/{integrations-FWYXSBHK.mjs → integrations-Z7EGVBHF.mjs} +11 -9
- package/dist/cli/{legacy-noops-U7LI7UXC.js → legacy-noops-246E3KKG.js} +9 -9
- package/dist/cli/{legacy-noops-I4YRIX5F.mjs → legacy-noops-5IYCFWWX.mjs} +6 -6
- package/dist/cli/{mcp-QJBMB6VS.mjs → mcp-WUYGZXPI.mjs} +4 -4
- package/dist/cli/{mcp-GX2UKKWU.js → mcp-YTYTW67G.js} +24 -24
- package/dist/cli/{monitors-Z6EGKYJP.mjs → monitors-73DQKCU7.mjs} +26 -8
- package/dist/cli/{monitors-WCJYINGX.js → monitors-SA6ILD6Z.js} +119 -101
- package/dist/cli/{org-NNHICBR2.mjs → org-WVQRB2KX.mjs} +7 -7
- package/dist/cli/{org-7SKG423N.js → org-X7ELDV7B.js} +89 -89
- package/dist/cli/{play-CXDFPJ7Z.mjs → play-QI6V2EUQ.mjs} +295 -67
- package/dist/cli/{play-4P4DTG3Q.js → play-QTYOAJPE.js} +897 -669
- package/dist/cli/{providers-VQLQ7DTR.mjs → providers-DPVMVDS4.mjs} +7 -7
- package/dist/cli/{providers-EE4TUE3O.js → providers-XXFLVREV.js} +10 -10
- package/dist/cli/{quickstart-RVXHK4WA.js → quickstart-33ISXQJU.js} +6 -6
- package/dist/cli/{quickstart-IYNJRB5G.mjs → quickstart-YWGNHULM.mjs} +4 -4
- package/dist/cli/{run-R3F34KU3.js → run-BWHZXLTD.js} +45 -45
- package/dist/cli/{run-VBQPPMEX.mjs → run-J6FCAKQC.mjs} +25 -25
- package/dist/cli/search-JCWJX2XD.js +32 -0
- package/dist/cli/{search-B7R62HX5.mjs → search-Z3UU3WBB.mjs} +8 -8
- package/dist/cli/{search-output-LNQQXIGZ.mjs → search-output-OJYY4J7E.mjs} +4 -4
- package/dist/cli/{search-output-LWHWEPOT.js → search-output-YIPV74ME.js} +6 -6
- package/dist/cli/{secrets-QBOZ7WTD.js → secrets-UXRJCEN4.js} +16 -16
- package/dist/cli/{secrets-NM3VAJLO.mjs → secrets-YZZN2WST.mjs} +7 -7
- package/dist/cli/{sessions-R5BSIJ4I.mjs → sessions-ITCGPD7Z.mjs} +6 -6
- package/dist/cli/sessions-NA4SJH6Q.js +22 -0
- package/dist/cli/{settings-POYWKNRD.js → settings-LAFYMILP.js} +86 -86
- package/dist/cli/{settings-S4PN7WLY.mjs → settings-ZP2LSVNM.mjs} +13 -13
- package/dist/cli/{setup-VHB4Z654.js → setup-4AL3XYM5.js} +49 -49
- package/dist/cli/{setup-PFLXVBTL.mjs → setup-WEQAQSYC.mjs} +9 -9
- package/dist/cli/{skills-W2TELEU7.mjs → skills-NQH4HFW2.mjs} +7 -7
- package/dist/cli/skills-XZ4Y6SZ7.js +36 -0
- package/dist/cli/{tools-M4FA6N3Y.mjs → tools-CXK2GSI4.mjs} +18 -18
- package/dist/cli/tools-WJQ6Y7E4.js +57 -0
- package/dist/cli/{update-W7LIHEA7.mjs → update-3ROF3Z75.mjs} +9 -9
- package/dist/cli/update-ZLRLTBRD.js +34 -0
- package/dist/cli/{views-KTVPV6UP.mjs → views-AOUHVGV2.mjs} +7 -7
- package/dist/cli/{views-DJXAGD7V.js → views-XJFO5CEH.js} +22 -22
- package/dist/cli/{workflow-NVZDJKH2.js → workflow-GY3DBHXX.js} +18 -18
- package/dist/cli/{workflow-LGKCRODX.mjs → workflow-KBS2QJK6.mjs} +8 -8
- package/dist/{client-Tp1LSULB.d.mts → client-D1uWA2Vc.d.mts} +1 -1
- package/dist/{client-CCyWJqAI.d.ts → client-Hz7SsBXs.d.ts} +1 -1
- package/dist/{client-core-BpYiYEfu.d.ts → client-core-D3Ad7Flt.d.ts} +554 -504
- package/dist/{client-core-D8eCZz3O.d.mts → client-core-Db_e63Hb.d.mts} +554 -504
- package/dist/{compiler-manifest-EBWEUj0b.d.ts → compiler-manifest-BqwVrOri.d.mts} +38 -18
- package/dist/{compiler-manifest-EBWEUj0b.d.mts → compiler-manifest-BqwVrOri.d.ts} +38 -18
- package/dist/{errors-CParKUQR.d.mts → errors-BU8FB99X.d.mts} +1 -1
- package/dist/{errors-Qt0OTA7_.d.ts → errors-DfVN_FUG.d.ts} +1 -1
- package/dist/{index-CoqDkIw0.d.ts → index-BGnvtYGc.d.ts} +6 -1
- package/dist/{index-BMUVCNp7.d.mts → index-DjZgwpGw.d.mts} +6 -1
- package/dist/index.d.mts +28 -8
- package/dist/index.d.ts +28 -8
- package/dist/index.js +64 -39
- package/dist/index.mjs +32 -7
- package/dist/install-integrity.json +133 -128
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +620 -124
- package/dist/plays/play-description.d.mts +3 -3
- package/dist/plays/play-description.d.ts +3 -3
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-W32GMYND.js +0 -43
- package/dist/cli/concurrent-runs-help-6QT7ZR4W.js +0 -21
- package/dist/cli/describe-VLU2LUDJ.js +0 -50
- package/dist/cli/git-E6W44F5M.js +0 -25
- package/dist/cli/search-UUVFXZRA.js +0 -32
- package/dist/cli/sessions-K3PD73Q2.js +0 -22
- package/dist/cli/skills-QNE2EYT3.js +0 -36
- package/dist/cli/tools-3RLI4HGF.js +0 -57
- package/dist/cli/update-UT6KIW2W.js +0 -34
|
@@ -680,18 +680,24 @@ function buildProjectedGraphPipeline(
|
|
|
680
680
|
): PlayStaticPipeline {
|
|
681
681
|
const docflow = buildPublicDocflow(pipeline);
|
|
682
682
|
// The authenticated app needs the symbolic bindings to match recorded
|
|
683
|
-
// values to graph nodes
|
|
683
|
+
// values to graph nodes, and the author's `show:"…"` fields (per node and
|
|
684
|
+
// for the run input) so its chips say what the dashboard's say. Keep the
|
|
685
|
+
// public share projection unchanged.
|
|
684
686
|
const appDocflow =
|
|
685
687
|
includeBindingPaths && docflow && pipeline.docflow
|
|
686
688
|
? {
|
|
687
689
|
...docflow,
|
|
690
|
+
...(pipeline.docflow.inputShow?.length
|
|
691
|
+
? { inputShow: [...pipeline.docflow.inputShow] }
|
|
692
|
+
: {}),
|
|
688
693
|
bindings: pipeline.docflow.bindings.map(
|
|
689
|
-
({ nodeId, line, kind, inputs, outputs }) => ({
|
|
694
|
+
({ nodeId, line, kind, inputs, outputs, show }) => ({
|
|
690
695
|
nodeId,
|
|
691
696
|
line,
|
|
692
697
|
...(kind ? { kind } : {}),
|
|
693
698
|
...(inputs ? { inputs: [...inputs] } : {}),
|
|
694
699
|
...(outputs ? { outputs: [...outputs] } : {}),
|
|
700
|
+
...(show?.length ? { show: [...show] } : {}),
|
|
695
701
|
}),
|
|
696
702
|
),
|
|
697
703
|
}
|
|
@@ -41,6 +41,12 @@ export interface PlayStaticPipeline {
|
|
|
41
41
|
authoredSleep?: PlayStaticSourceRange;
|
|
42
42
|
/** Authored business flow. Static analysis is used only when this is absent. */
|
|
43
43
|
docflow?: PlayDocflow;
|
|
44
|
+
/**
|
|
45
|
+
* Why the authored `@mermaid` block could not be read, when it did not parse.
|
|
46
|
+
* Display only: the play runs as if it had no diagram, and the page says
|
|
47
|
+
* "diagram couldn't be read" instead of drawing a canvas. Absent otherwise.
|
|
48
|
+
*/
|
|
49
|
+
docflowUnreadReason?: string;
|
|
44
50
|
tableNamespace?: string;
|
|
45
51
|
inputFields?: string[];
|
|
46
52
|
rowKeyFields?: string[];
|
|
@@ -132,6 +132,12 @@ export type PlayTriggerConfigReadOnlyReason =
|
|
|
132
132
|
| 'git_managed'
|
|
133
133
|
| 'archived';
|
|
134
134
|
|
|
135
|
+
export type PlayTriggerPublishCandidate = {
|
|
136
|
+
revisionId: string;
|
|
137
|
+
version: number | null;
|
|
138
|
+
sourceHash: string | null;
|
|
139
|
+
};
|
|
140
|
+
|
|
135
141
|
export type PlayTriggerConfigView = {
|
|
136
142
|
name: string;
|
|
137
143
|
playDefinitionId: string;
|
|
@@ -139,6 +145,13 @@ export type PlayTriggerConfigView = {
|
|
|
139
145
|
liveVersion: number | null;
|
|
140
146
|
/** Null when the triggers can be changed here; otherwise why not. */
|
|
141
147
|
readOnly: { reason: PlayTriggerConfigReadOnlyReason; message: string } | null;
|
|
148
|
+
/**
|
|
149
|
+
* With `readOnly.reason === 'not_published'`: the saved revision that
|
|
150
|
+
* publishing would make live (`POST /api/v2/plays/:name/live` with this
|
|
151
|
+
* `revisionId`, the request `deepline plays publish <name> --revision-id`
|
|
152
|
+
* sends). Absent from older servers and on every other state.
|
|
153
|
+
*/
|
|
154
|
+
publishCandidate?: PlayTriggerPublishCandidate | null;
|
|
142
155
|
cron: PlayTriggerConfigCronState | null;
|
|
143
156
|
webhook: PlayTriggerConfigWebhookState | null;
|
|
144
157
|
};
|
|
@@ -8,6 +8,31 @@ export const BILLING_CREDIT_PURCHASE_CHANNEL_WINDOW_MS = 2 * 60 * 60_000;
|
|
|
8
8
|
// Internal notification namespace, never a customer workspace.
|
|
9
9
|
export const BILLING_CREDIT_PURCHASE_CHANNEL_SCOPE =
|
|
10
10
|
'platform:credit-purchase-alerts';
|
|
11
|
+
export const BILLING_CREDIT_PURCHASE_DAILY_SCOPE =
|
|
12
|
+
'platform:credit-purchase-daily-digest';
|
|
13
|
+
export const BILLING_CREDIT_PURCHASE_IMMEDIATE_MINIMUM_CENTS = 20_000;
|
|
14
|
+
|
|
15
|
+
export function isBillingCreditPurchaseChannelScope(orgId: string): boolean {
|
|
16
|
+
return (
|
|
17
|
+
orgId === BILLING_CREDIT_PURCHASE_CHANNEL_SCOPE ||
|
|
18
|
+
orgId === BILLING_CREDIT_PURCHASE_DAILY_SCOPE
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Purchases at or after the cutoff belong to the following day's digest. */
|
|
23
|
+
export function nextCreditPurchaseDigestAt(now: number): number {
|
|
24
|
+
const hour = new Intl.DateTimeFormat('en-US', {
|
|
25
|
+
timeZone: 'America/New_York',
|
|
26
|
+
hour: 'numeric',
|
|
27
|
+
hourCycle: 'h23',
|
|
28
|
+
});
|
|
29
|
+
const candidate = new Date(now);
|
|
30
|
+
candidate.setUTCHours(22, 0, 0, 0);
|
|
31
|
+
const cutoff = () =>
|
|
32
|
+
candidate.getTime() - (Number(hour.format(candidate)) - 17) * 60 * 60_000;
|
|
33
|
+
if (cutoff() <= now) candidate.setUTCDate(candidate.getUTCDate() + 1);
|
|
34
|
+
return cutoff();
|
|
35
|
+
}
|
|
11
36
|
|
|
12
37
|
export function isBillingSalesDestinationKey(key: unknown): boolean {
|
|
13
38
|
return (
|
|
@@ -569,3 +569,59 @@ export function redactSecretsInPublicResultJsonText(text: string) {
|
|
|
569
569
|
keyPolicy: 'public-result',
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
+
|
|
573
|
+
const SOURCE_SECRET_NAME =
|
|
574
|
+
'access[-_]?token|refresh[-_]?token|token|x[-_]?api[-_]?key|api[-_]?key|apikey|password|secret|session|auth(?:orization)?';
|
|
575
|
+
// In source text a credential is a literal. `token: string`,
|
|
576
|
+
// `const token = (value) =>` and `apiKey = await ctx.secrets.get('X')` are
|
|
577
|
+
// code, not credentials, so only literal values are redacted.
|
|
578
|
+
const SOURCE_QUOTED_SECRET_ASSIGNMENT_PATTERN = new RegExp(
|
|
579
|
+
`\\b(${SOURCE_SECRET_NAME})\\b(\\s*[:=]\\s*)(['"\`])((?:[A-Za-z]+\\s+)?(?!\\$\\{)[^'"\`\\s]{8,})\\3`,
|
|
580
|
+
'gi',
|
|
581
|
+
);
|
|
582
|
+
// A bare credential-shaped run (comments, pasted `.env` lines): long, mixed
|
|
583
|
+
// letters and digits, and neither a dotted member path nor a call.
|
|
584
|
+
const SOURCE_BARE_SECRET_ASSIGNMENT_PATTERN = new RegExp(
|
|
585
|
+
`\\b(${SOURCE_SECRET_NAME})\\b(\\s*[:=]\\s*)(?=[A-Za-z0-9._~+/=-]*\\d)(?=[A-Za-z0-9._~+/=-]*[A-Za-z])(?![A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)+(?![\\w$.~+/=-]))[A-Za-z0-9._~+/=-]{16,}(?![\\w$(])`,
|
|
586
|
+
'gi',
|
|
587
|
+
);
|
|
588
|
+
const SOURCE_EXTRA_CREDENTIAL_PATTERNS = [
|
|
589
|
+
/\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,
|
|
590
|
+
/\bsk-[A-Za-z0-9_-]{20,}/g,
|
|
591
|
+
];
|
|
592
|
+
const SOURCE_SENSITIVE_URL_PARAM_VALUE_PATTERN =
|
|
593
|
+
/([?&#](?:api[-_]?key|x[-_]?api[-_]?key|token|access[-_]?token|refresh[-_]?token|secret|password|authorization|credential|signature|sig)=)(?!\$\{)[^&#\s'"`]+/gi;
|
|
594
|
+
const SOURCE_PRIVATE_KEY_BLOCK_PATTERN =
|
|
595
|
+
/-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----[\s\S]*?(?:-----END (?:[A-Z]+ )?PRIVATE KEY-----|$)/g;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Redaction for retained authored Play source shown back to its workspace.
|
|
599
|
+
*
|
|
600
|
+
* Source is code, so the result-text assignment heuristic (`token=<anything>`)
|
|
601
|
+
* flags ordinary identifiers, type annotations and expressions and hides whole
|
|
602
|
+
* files. This keeps every literal credential rule: explicit credential
|
|
603
|
+
* formats, credential-bearing URLs, bearer literals, private key blocks, and
|
|
604
|
+
* quoted or credential-shaped values assigned to secret-like names.
|
|
605
|
+
*/
|
|
606
|
+
export function redactSecretsInSourceText(source: string): string {
|
|
607
|
+
const options: SecretRedactionOptions = { redactHighEntropy: false };
|
|
608
|
+
let redacted = source.replace(
|
|
609
|
+
/https?:\/\/(?:api|bulkapi)\.millionverifier\.com(?=[:/?#]|$)[^\s"'`<>]*/gi,
|
|
610
|
+
(url) => url.replace(/([?&](?:api|key)=)[^&#\s"'`<>]*/gi, '$1[REDACTED]'),
|
|
611
|
+
);
|
|
612
|
+
if (hasExplicitSecretValue(redacted, options)) {
|
|
613
|
+
redacted = redactExplicitSecretsInText(redacted, options);
|
|
614
|
+
}
|
|
615
|
+
for (const pattern of SOURCE_EXTRA_CREDENTIAL_PATTERNS) {
|
|
616
|
+
redacted = redacted.replace(pattern, REDACTED_VALUE);
|
|
617
|
+
}
|
|
618
|
+
return redacted
|
|
619
|
+
.replace(SOURCE_PRIVATE_KEY_BLOCK_PATTERN, REDACTED_VALUE)
|
|
620
|
+
.replace(BEARER_SECRET_PATTERN, `$1 ${REDACTED_VALUE}`)
|
|
621
|
+
.replace(
|
|
622
|
+
SOURCE_QUOTED_SECRET_ASSIGNMENT_PATTERN,
|
|
623
|
+
`$1$2$3${REDACTED_VALUE}$3`,
|
|
624
|
+
)
|
|
625
|
+
.replace(SOURCE_BARE_SECRET_ASSIGNMENT_PATTERN, `$1$2${REDACTED_VALUE}`)
|
|
626
|
+
.replace(SOURCE_SENSITIVE_URL_PARAM_VALUE_PATTERN, `$1${REDACTED_VALUE}`);
|
|
627
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkLMLSOHTUjs = require('./chunk-LMLSOHTU.js');
|
|
18
|
+
require('./chunk-GJOGFWX3.js');
|
|
19
|
+
require('./chunk-2HPTLBNB.js');
|
|
20
|
+
require('./chunk-SAJWYN4B.js');
|
|
21
|
+
require('./chunk-EITMD3A5.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-BBTKAASQ.js');
|
|
24
|
+
require('./chunk-FFBXLFKV.js');
|
|
25
|
+
require('./chunk-OG64RBAC.js');
|
|
26
|
+
require('./chunk-COGTRVWW.js');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkLMLSOHTUjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkLMLSOHTUjs.authStatusLine; exports.clearPendingClaim = _chunkLMLSOHTUjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkLMLSOHTUjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkLMLSOHTUjs.handleRegister; exports.handleStatus = _chunkLMLSOHTUjs.handleStatus; exports.handleWait = _chunkLMLSOHTUjs.handleWait; exports.httpJson = _chunkLMLSOHTUjs.httpJson; exports.readPendingAuthClaim = _chunkLMLSOHTUjs.readPendingAuthClaim; exports.readStatusBanner = _chunkLMLSOHTUjs.readStatusBanner; exports.registerAuthCommands = _chunkLMLSOHTUjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkLMLSOHTUjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkLMLSOHTUjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkLMLSOHTUjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkLMLSOHTUjs.statusBannerLine;
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-CKIRKYW7.mjs";
|
|
18
|
+
import "./chunk-TNJG4ZPN.mjs";
|
|
19
|
+
import "./chunk-GPAWLXW3.mjs";
|
|
20
|
+
import "./chunk-DJI5CLLW.mjs";
|
|
21
21
|
import "./chunk-NURW5XH4.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-JL2OTMSG.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-XNTDTAKC.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|