deepline 0.3.353 → 0.3.355
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +54 -40
- package/dist/cli/{auth-FVIZVTCB.mjs → auth-3IQKHFUS.mjs} +4 -4
- package/dist/cli/auth-Q4OX2XOA.js +31 -0
- package/dist/cli/{billing-PYTYGWPG.mjs → billing-2O2HPRIQ.mjs} +4 -4
- package/dist/cli/{billing-NWL7KQPZ.js → billing-QACLO2L4.js} +73 -73
- package/dist/cli/{chunk-NFEQHNDQ.js → chunk-56UZ4LCT.js} +26 -26
- package/dist/cli/{chunk-ZDEO3EGW.mjs → chunk-5TFTY4H5.mjs} +1 -1
- package/dist/cli/{chunk-ZCCXX55K.js → chunk-63CWWQE6.js} +45 -45
- package/dist/cli/{chunk-D477W2OQ.mjs → chunk-64YA2SCL.mjs} +4 -4
- package/dist/cli/{chunk-IVGFLYQ6.mjs → chunk-6745OKK5.mjs} +1 -1
- package/dist/cli/{chunk-GFLHAA2O.mjs → chunk-B2C2PR6I.mjs} +1 -1
- package/dist/cli/{chunk-2UWRFDI4.js → chunk-CG5JEYRX.js} +60 -60
- package/dist/cli/{chunk-55XOA2VW.js → chunk-CKBJ2PQR.js} +8 -8
- package/dist/cli/{chunk-HU4SUDWU.js → chunk-CL6NZN6X.js} +224 -224
- package/dist/cli/{chunk-VALAAQQM.js → chunk-CQXFJZ57.js} +48 -48
- package/dist/cli/{chunk-CXMSK2VV.mjs → chunk-DYWM3EZG.mjs} +2 -2
- package/dist/cli/{chunk-BVHUTDCW.mjs → chunk-FC2SOWXT.mjs} +5 -5
- package/dist/cli/{chunk-Z6LVVOOJ.js → chunk-GGM6CX2R.js} +15 -15
- package/dist/cli/{chunk-DY253DRK.mjs → chunk-IQJBKSMD.mjs} +2 -2
- package/dist/cli/{chunk-R2T4HQ64.js → chunk-J2WSV37F.js} +6 -6
- package/dist/cli/{chunk-M4UPRX3M.js → chunk-J6I4RSDG.js} +8 -8
- package/dist/cli/{chunk-NPU4SMKT.js → chunk-PGBSGPQ3.js} +9 -9
- package/dist/cli/{chunk-XI5IMY45.js → chunk-QYKLKWQO.js} +2 -2
- package/dist/cli/{chunk-RRDCBCRI.mjs → chunk-R2O2BKDH.mjs} +1 -1
- package/dist/cli/{chunk-U3FUXTIB.mjs → chunk-SDZW7NSO.mjs} +1 -1
- package/dist/cli/{chunk-EDEO7NG4.js → chunk-TKWCYYIM.js} +1 -1
- package/dist/cli/{chunk-NZNUDZDW.mjs → chunk-UAPP5IVJ.mjs} +2 -2
- package/dist/cli/{chunk-LLI4RITH.mjs → chunk-USB6LFMD.mjs} +3 -3
- package/dist/cli/{chunk-CQQ5N4YO.mjs → chunk-VALEHQXO.mjs} +2 -2
- package/dist/cli/{chunk-JHPVZR6F.js → chunk-WMULUP2K.js} +4 -4
- package/dist/cli/{chunk-37F4EUJA.mjs → chunk-XXC7ST6U.mjs} +6 -6
- package/dist/cli/client-ISC4LLIX.js +20 -0
- package/dist/cli/{client-IH7I5D7T.mjs → client-QQMVHMOY.mjs} +3 -3
- package/dist/cli/{csv-TJIWKUCX.js → csv-DQBAUFB6.js} +12 -12
- package/dist/cli/{csv-G5WXNCLQ.mjs → csv-DWIYPLLH.mjs} +3 -3
- package/dist/cli/{db-EBHV2MGE.mjs → db-LFLTGHKA.mjs} +4 -4
- package/dist/cli/{db-3DCS2JXS.js → db-QET2DLHP.js} +29 -29
- package/dist/cli/{describe-QUOLGZKH.mjs → describe-LR5QXOKB.mjs} +8 -8
- package/dist/cli/{describe-5XKBPWD7.js → describe-Z2YFVBNO.js} +15 -15
- package/dist/cli/{executions-NYIOENKH.js → executions-5T2TL6CL.js} +6 -6
- package/dist/cli/{executions-EERWIJ5I.mjs → executions-ARKMIMHM.mjs} +4 -4
- package/dist/cli/{feedback-Z2I5MQYZ.js → feedback-4POM6CBJ.js} +7 -7
- package/dist/cli/{feedback-4RYJJCYL.mjs → feedback-YAEIOXMS.mjs} +3 -3
- package/dist/cli/{git-EMU7AKX3.mjs → git-OCMBR5FC.mjs} +4 -4
- package/dist/cli/git-RZCZI3ER.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-HHLNM523.mjs → legacy-noops-DCZUS7ES.mjs} +4 -4
- package/dist/cli/{legacy-noops-BEUYYRSU.js → legacy-noops-IKM26VQP.js} +7 -7
- package/dist/cli/{monitors-BVJSHUV4.mjs → monitors-FYDK5HOY.mjs} +4 -4
- package/dist/cli/{monitors-KQXLMPZ4.js → monitors-P5FGTRL3.js} +85 -85
- package/dist/cli/{org-HRYNVOUH.js → org-HAQEVMOO.js} +60 -60
- package/dist/cli/{org-KSROOKSJ.mjs → org-P3EKASXE.mjs} +4 -4
- package/dist/cli/{play-PGFW6PFE.mjs → play-VQPA3FJM.mjs} +7 -7
- package/dist/cli/play-YEQ4JQUW.js +153 -0
- package/dist/cli/{providers-EUKJK6ZE.mjs → providers-ATI5HUBZ.mjs} +4 -4
- package/dist/cli/{providers-BJM725CV.js → providers-M34KOQTE.js} +7 -7
- package/dist/cli/{quickstart-72JYHUJC.mjs → quickstart-7YP5G2PM.mjs} +3 -3
- package/dist/cli/{quickstart-FEERYTYY.js → quickstart-WBAHFDVT.js} +5 -5
- package/dist/cli/{search-LUAIOM56.mjs → search-5DI73SZD.mjs} +5 -5
- package/dist/cli/search-USWDT7PW.js +26 -0
- package/dist/cli/{secrets-J65QCH57.js → secrets-C4HJ7BTJ.js} +13 -13
- package/dist/cli/{secrets-YYFRYS2Z.mjs → secrets-F6TOYGUG.mjs} +4 -4
- package/dist/cli/{sessions-WBA67YYT.mjs → sessions-JG5Y4YHP.mjs} +4 -4
- package/dist/cli/{sessions-FWUUEK6V.js → sessions-P6ED3JWC.js} +5 -5
- package/dist/cli/{settings-I7AZ4JVI.js → settings-UVT6MUZH.js} +74 -74
- package/dist/cli/{settings-RUMTSUE5.mjs → settings-YERL4MKN.mjs} +7 -7
- package/dist/cli/{setup-BHRRNT5C.mjs → setup-C6NYXZX4.mjs} +6 -6
- package/dist/cli/{setup-R3IUFNDP.js → setup-LREJO56L.js} +41 -41
- package/dist/cli/{skills-EKD5O7GQ.mjs → skills-4HU5RV5M.mjs} +4 -4
- package/dist/cli/skills-74GBPOGS.js +28 -0
- package/dist/cli/tools-GUFCJGVW.js +40 -0
- package/dist/cli/{tools-L5OA2343.mjs → tools-SR46KMKA.mjs} +6 -6
- package/dist/cli/update-K47QQUCB.js +28 -0
- package/dist/cli/{update-UUHL6FER.mjs → update-XFV6ELFK.mjs} +6 -6
- package/dist/cli/{workflow-7NBSG5OT.js → workflow-E2BSA6OI.js} +15 -15
- package/dist/cli/{workflow-V24VHOQT.mjs → workflow-OHS4NXMP.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +74 -74
- 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 +1 -1
- package/dist/cli/auth-GJZ3S4QH.js +0 -31
- package/dist/cli/client-Z6BCEGFA.js +0 -20
- package/dist/cli/git-QYQ5ZFIG.js +0 -23
- package/dist/cli/play-CRHUA45Q.js +0 -153
- package/dist/cli/search-X25S2U54.js +0 -26
- package/dist/cli/skills-OOZ5SDVB.js +0 -28
- package/dist/cli/tools-MYH33NTL.js +0 -40
- package/dist/cli/update-EWNPE3NF.js +0 -28
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.355',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -20633,7 +20633,9 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
20633
20633
|
for (const row of result.rows)
|
|
20634
20634
|
prefix[row.ordinal - 1]!.payload = row.payload;
|
|
20635
20635
|
} catch (error) {
|
|
20636
|
-
|
|
20636
|
+
// A query timeout may already have closed this connection. Keep
|
|
20637
|
+
// the delivery failure for retry classification and diagnostics.
|
|
20638
|
+
await client.query('ROLLBACK').catch(() => undefined);
|
|
20637
20639
|
throw error;
|
|
20638
20640
|
}
|
|
20639
20641
|
});
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts
CHANGED
|
@@ -86,7 +86,7 @@ const RUNTIME_EVENT_LOG_POSITION_EXPRESSION = `jsonb_set(
|
|
|
86
86
|
// Migration readiness tracks this projection body independently of scheduler
|
|
87
87
|
// wire and schema versions. Bump when a changed trigger must be reinstalled.
|
|
88
88
|
export const RUNTIME_EVENT_SEARCH_OUTBOX_PROJECTION_MARKER =
|
|
89
|
-
'runtime-event-search-origin-
|
|
89
|
+
'runtime-event-search-origin-batch-fields-once';
|
|
90
90
|
/** Trusted trigger-authored state; absent on already-projected legacy rows. */
|
|
91
91
|
export const RUNTIME_EVENT_DEFERRED_PROJECTION_FIELD =
|
|
92
92
|
'_runtimeSearchProjectionPending';
|
|
@@ -2027,23 +2027,28 @@ export async function attachRuntimeEventSearchTriggers(
|
|
|
2027
2027
|
await client.query(`
|
|
2028
2028
|
CREATE OR REPLACE FUNCTION ${schema}.project_origin_log_batch(observation ${schema}.outbox, item jsonb, run_org text, play text, compact_logs boolean, canonical_events boolean, at_time timestamptz, doc jsonb, closed boolean)
|
|
2029
2029
|
RETURNS text[] LANGUAGE plpgsql SECURITY DEFINER SET search_path = pg_catalog AS $function$
|
|
2030
|
-
DECLARE fresh text[]; mismatches bigint;
|
|
2030
|
+
DECLARE fresh text[]; mismatches bigint; expected_ids text[]; existing_identities jsonb;
|
|
2031
|
+
batch_lines jsonb := item->'lines';
|
|
2032
|
+
batch_ids jsonb := item->'lineIds';
|
|
2033
|
+
batch_contexts jsonb := item->'lineContexts';
|
|
2034
|
+
batch_metadata jsonb := item->'lineMetadata';
|
|
2035
|
+
batch_event jsonb := item - 'lines' - 'lineContexts' - 'lineIds' - 'lineMetadata';
|
|
2031
2036
|
BEGIN
|
|
2032
|
-
IF jsonb_typeof(
|
|
2033
|
-
OR jsonb_array_length(
|
|
2034
|
-
OR EXISTS (SELECT 1 FROM jsonb_array_elements(
|
|
2035
|
-
OR (SELECT count(DISTINCT id) FROM jsonb_array_elements(
|
|
2037
|
+
IF jsonb_typeof(batch_ids) IS DISTINCT FROM 'array'
|
|
2038
|
+
OR jsonb_array_length(batch_ids) <> jsonb_array_length(batch_lines)
|
|
2039
|
+
OR EXISTS (SELECT 1 FROM jsonb_array_elements(batch_ids) id WHERE jsonb_typeof(id) <> 'string' OR (id #>> '{}') !~ '^[A-Za-z0-9:_-]{1,128}$')
|
|
2040
|
+
OR (SELECT count(DISTINCT id) FROM jsonb_array_elements(batch_ids) id) <> jsonb_array_length(batch_ids) THEN
|
|
2036
2041
|
RAISE EXCEPTION 'Origin log identities must be distinct bounded strings aligned with lines';
|
|
2037
2042
|
END IF;
|
|
2038
|
-
IF EXISTS (SELECT 1 FROM jsonb_array_elements(
|
|
2043
|
+
IF EXISTS (SELECT 1 FROM jsonb_array_elements(batch_lines) line WHERE jsonb_typeof(line) <> 'string') THEN
|
|
2039
2044
|
RAISE EXCEPTION 'Search projection requires log line strings';
|
|
2040
2045
|
END IF;
|
|
2041
2046
|
IF item ? 'lineContexts' AND EXISTS (
|
|
2042
|
-
SELECT 1 FROM jsonb_array_elements(
|
|
2047
|
+
SELECT 1 FROM jsonb_array_elements(batch_contexts) ctx
|
|
2043
2048
|
WHERE jsonb_typeof(ctx) NOT IN ('object', 'null')
|
|
2044
2049
|
) THEN RAISE EXCEPTION 'Search projection log context must be an object'; END IF;
|
|
2045
2050
|
IF item ? 'lineContexts' AND EXISTS (
|
|
2046
|
-
SELECT 1 FROM jsonb_array_elements(
|
|
2051
|
+
SELECT 1 FROM jsonb_array_elements(batch_contexts) ctx
|
|
2047
2052
|
WHERE jsonb_typeof(ctx) = 'object' AND (
|
|
2048
2053
|
(SELECT count(*) FROM jsonb_object_keys(ctx)) > 8 OR octet_length(ctx::text) > 2064
|
|
2049
2054
|
OR EXISTS (SELECT 1 FROM jsonb_each(ctx) field WHERE
|
|
@@ -2053,28 +2058,31 @@ export async function attachRuntimeEventSearchTriggers(
|
|
|
2053
2058
|
OR (jsonb_typeof(field.value) = 'number' AND octet_length(field.value #>> '{}') > 32))
|
|
2054
2059
|
)
|
|
2055
2060
|
) THEN RAISE EXCEPTION 'Search projection log context has an unsupported key or value'; END IF;
|
|
2061
|
+
-- Generic plans cannot fold item field extraction or removal. Cache the
|
|
2062
|
+
-- aligned arrays and event header once: rebuilding a multi-megabyte item
|
|
2063
|
+
-- per line makes retained terminal envelopes quadratic even on replay.
|
|
2056
2064
|
WITH entries AS MATERIALIZED (
|
|
2057
2065
|
SELECT value #>> '{}' AS body, ordinality AS ordinal,
|
|
2058
|
-
'log-origin:' || observation.run_id || ':' || (
|
|
2059
|
-
NULLIF(
|
|
2060
|
-
${schema}.run_log_metadata(value #>> '{}',
|
|
2061
|
-
FROM jsonb_array_elements(
|
|
2066
|
+
'log-origin:' || observation.run_id || ':' || (batch_ids->>(ordinality-1)::int) AS eid,
|
|
2067
|
+
NULLIF(batch_contexts->(ordinality-1)::int, 'null'::jsonb) AS ctx,
|
|
2068
|
+
${schema}.run_log_metadata(value #>> '{}', batch_metadata->(ordinality-1)::int, at_time) AS metadata
|
|
2069
|
+
FROM jsonb_array_elements(batch_lines) WITH ORDINALITY
|
|
2062
2070
|
), inserted AS (
|
|
2063
2071
|
INSERT INTO runtime_observability.events (
|
|
2064
2072
|
runtime_scope, org_id, event_id, event_seq, event_payload, occurred_at,
|
|
2065
2073
|
run_id, play_name, kind, level, message, log_body, source_digest, log_text_digest, search_doc
|
|
2066
2074
|
) SELECT ${quoteLiteral(scope)}, run_org, eid,
|
|
2067
2075
|
CASE WHEN canonical_events THEN nextval('runtime_observability.runtime_event_order_seq') END,
|
|
2068
|
-
CASE WHEN canonical_events THEN jsonb_strip_nulls(
|
|
2076
|
+
CASE WHEN canonical_events THEN jsonb_strip_nulls(batch_event || jsonb_build_object(
|
|
2069
2077
|
'type', ${RUN_EVENT_KIND_SQL_LITERAL.logAppended}, 'runId', observation.run_id,
|
|
2070
2078
|
'occurredAt', metadata->'occurredAt', 'level', metadata->'level', 'stepId', metadata->'stepId', 'lineOrdinal', ordinal,
|
|
2071
|
-
'entryId',
|
|
2079
|
+
'entryId', batch_ids->(ordinal-1)::int, 'context', ctx)) END,
|
|
2072
2080
|
to_timestamp((metadata->>'occurredAt')::double precision / 1000), observation.run_id, play, ${RUN_EVENT_KIND_SQL_LITERAL.logAppended}, metadata->>'level',
|
|
2073
2081
|
CASE WHEN compact_logs THEN NULL ELSE left(body, 2048) END, body,
|
|
2074
2082
|
CASE WHEN ctx IS NULL THEN encode(sha256(convert_to(body,'UTF8')),'hex')
|
|
2075
2083
|
ELSE encode(sha256(convert_to(jsonb_build_array(body,ctx)::text,'UTF8')),'hex') END,
|
|
2076
2084
|
encode(sha256(convert_to(btrim(body),'UTF8')),'hex'),
|
|
2077
|
-
doc || (metadata - 'occurredAt') || jsonb_strip_nulls(jsonb_build_object('entryId',
|
|
2085
|
+
doc || (metadata - 'occurredAt') || jsonb_strip_nulls(jsonb_build_object('entryId', batch_ids->(ordinal-1)::int, 'context', ctx))
|
|
2078
2086
|
FROM entries WHERE NOT closed ORDER BY ordinal
|
|
2079
2087
|
ON CONFLICT (runtime_scope, org_id, event_id) DO NOTHING RETURNING event_id
|
|
2080
2088
|
) SELECT coalesce(array_agg(inserted.event_id ORDER BY entries.ordinal), ARRAY[]::text[])
|
|
@@ -2082,27 +2090,31 @@ export async function attachRuntimeEventSearchTriggers(
|
|
|
2082
2090
|
-- The INSERT already proves the content of every fresh identity. Only
|
|
2083
2091
|
-- retries or a concurrent uniqueness winner need a journal read-back.
|
|
2084
2092
|
-- This fast path serves both inline and background origin projection.
|
|
2085
|
-
IF cardinality(fresh) = jsonb_array_length(
|
|
2093
|
+
IF cardinality(fresh) = jsonb_array_length(batch_lines) THEN
|
|
2086
2094
|
RETURN fresh;
|
|
2087
2095
|
END IF;
|
|
2088
2096
|
-- A new READ COMMITTED statement sees a concurrent uniqueness winner.
|
|
2089
|
-
--
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2097
|
+
-- Resolve the whole key set once. A per-line LATERAL lookup can choose
|
|
2098
|
+
-- a non-leading event_id index scan when scope/org statistics are skewed,
|
|
2099
|
+
-- re-reading the same history for every ID even though the PK is unique.
|
|
2100
|
+
SELECT array_agg('log-origin:' || observation.run_id || ':' || (id #>> '{}') ORDER BY ordinal)
|
|
2101
|
+
INTO expected_ids FROM jsonb_array_elements(batch_ids) WITH ORDINALITY AS ids(id, ordinal);
|
|
2102
|
+
SELECT jsonb_object_agg(event.event_id, jsonb_build_object(
|
|
2103
|
+
'runId', event.run_id, 'kind', event.kind, 'digest', event.source_digest))
|
|
2104
|
+
INTO existing_identities
|
|
2096
2105
|
FROM runtime_observability.events event
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2106
|
+
WHERE event.runtime_scope = ${quoteLiteral(scope)} AND event.org_id = run_org
|
|
2107
|
+
AND event.event_id = ANY(expected_ids);
|
|
2108
|
+
-- JSON key lookups preserve one proof per identity without a join whose
|
|
2109
|
+
-- generic plan can multiply the two variable-size sets. Tombstones keep
|
|
2110
|
+
-- their digest/identity: retry never restores an expired body.
|
|
2111
|
+
SELECT count(*) INTO mismatches
|
|
2112
|
+
FROM jsonb_array_elements(batch_lines) WITH ORDINALITY AS entries(body, ordinal)
|
|
2113
|
+
WHERE existing_identities->expected_ids[ordinal]->>'runId' IS DISTINCT FROM observation.run_id
|
|
2114
|
+
OR existing_identities->expected_ids[ordinal]->>'kind' IS DISTINCT FROM ${RUN_EVENT_KIND_SQL_LITERAL.logAppended}
|
|
2115
|
+
OR existing_identities->expected_ids[ordinal]->>'digest' IS DISTINCT FROM CASE WHEN NULLIF(batch_contexts->(ordinal-1)::int, 'null'::jsonb) IS NULL
|
|
2104
2116
|
THEN encode(sha256(convert_to(body #>> '{}','UTF8')),'hex')
|
|
2105
|
-
ELSE encode(sha256(convert_to(jsonb_build_array(body #>> '{}',
|
|
2117
|
+
ELSE encode(sha256(convert_to(jsonb_build_array(body #>> '{}',batch_contexts->(ordinal-1)::int)::text,'UTF8')),'hex') END;
|
|
2106
2118
|
IF mismatches > 0 THEN
|
|
2107
2119
|
RAISE EXCEPTION 'Origin log identity changed its content or ingress is closed after terminal acceptance';
|
|
2108
2120
|
END IF;
|
|
@@ -2119,7 +2131,7 @@ export async function attachRuntimeEventSearchTriggers(
|
|
|
2119
2131
|
log_channel text; log_position bigint; matched_event_id text; matched_doc jsonb;
|
|
2120
2132
|
legacy_position_prefix text; position_event_ids text[];
|
|
2121
2133
|
log_alias jsonb; position_alias jsonb; envelope_attempt jsonb;
|
|
2122
|
-
line_count bigint; fresh_event_ids text[] := ARRAY[]::text[];
|
|
2134
|
+
line_count bigint; fresh_event_ids text[] := ARRAY[]::text[]; fresh_positions jsonb;
|
|
2123
2135
|
recent_log_keys jsonb := '{}'::jsonb; dedupe_key text;
|
|
2124
2136
|
terminal_overlap_counts jsonb := '{}'::jsonb;
|
|
2125
2137
|
recent_log_keys_loaded boolean := false; recent_log_attempt text;
|
|
@@ -2769,16 +2781,18 @@ export async function attachRuntimeEventSearchTriggers(
|
|
|
2769
2781
|
DO UPDATE SET last_seq = runtime_observability.run_log_cursors.last_seq + EXCLUDED.last_seq,
|
|
2770
2782
|
updated_at = clock_timestamp()
|
|
2771
2783
|
RETURNING last_seq INTO assigned_seq;
|
|
2772
|
-
--
|
|
2773
|
-
--
|
|
2784
|
+
-- Build ordinal lookup once. Generic plans estimate a run and unnest
|
|
2785
|
+
-- as tiny, then compare every inserted line against the entire ID list
|
|
2786
|
+
-- in a nested loop. Fresh IDs came only from this transaction's inserts
|
|
2787
|
+
-- for this scope/org/run, so the primary-key set is the complete target.
|
|
2788
|
+
SELECT jsonb_object_agg(fresh.event_id, fresh.ordinality)
|
|
2789
|
+
INTO fresh_positions
|
|
2790
|
+
FROM unnest(fresh_event_ids) WITH ORDINALITY AS fresh(event_id, ordinality);
|
|
2774
2791
|
UPDATE runtime_observability.events AS event
|
|
2775
|
-
SET log_seq = assigned_seq - line_count +
|
|
2776
|
-
FROM unnest(fresh_event_ids) WITH ORDINALITY AS fresh(event_id, ordinality)
|
|
2792
|
+
SET log_seq = assigned_seq - line_count + (fresh_positions->>event.event_id)::bigint
|
|
2777
2793
|
WHERE event.runtime_scope = ${quoteLiteral(scope)}
|
|
2778
2794
|
AND event.org_id = run_org
|
|
2779
|
-
AND event.
|
|
2780
|
-
AND event.event_id = ANY(fresh_event_ids)
|
|
2781
|
-
AND event.event_id = fresh.event_id;
|
|
2795
|
+
AND event.event_id = ANY(fresh_event_ids);
|
|
2782
2796
|
END IF;
|
|
2783
2797
|
RETURN;
|
|
2784
2798
|
END
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
registerAuthCommands,
|
|
10
10
|
reportSetupCompleted,
|
|
11
11
|
resolvePendingAuthClaimForResume
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-VALEHQXO.mjs";
|
|
13
|
+
import "./chunk-5TFTY4H5.mjs";
|
|
14
|
+
import "./chunk-SDZW7NSO.mjs";
|
|
15
15
|
import "./chunk-DLIRSHV6.mjs";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-R2O2BKDH.mjs";
|
|
17
17
|
import "./chunk-NXGCO4JB.mjs";
|
|
18
18
|
import "./chunk-WZYKRD7T.mjs";
|
|
19
19
|
import "./chunk-KRD6H754.mjs";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkCQXFJZ57js = require('./chunk-CQXFJZ57.js');
|
|
13
|
+
require('./chunk-J2WSV37F.js');
|
|
14
|
+
require('./chunk-WMULUP2K.js');
|
|
15
|
+
require('./chunk-XNYIZMNQ.js');
|
|
16
|
+
require('./chunk-TKWCYYIM.js');
|
|
17
|
+
require('./chunk-7P5AA3SN.js');
|
|
18
|
+
require('./chunk-OG64RBAC.js');
|
|
19
|
+
require('./chunk-COGTRVWW.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkCQXFJZ57js.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkCQXFJZ57js.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkCQXFJZ57js.clearSatisfiedPendingClaim; exports.handleRegister = _chunkCQXFJZ57js.handleRegister; exports.handleStatus = _chunkCQXFJZ57js.handleStatus; exports.handleWait = _chunkCQXFJZ57js.handleWait; exports.readPendingAuthClaim = _chunkCQXFJZ57js.readPendingAuthClaim; exports.registerAuthCommands = _chunkCQXFJZ57js.registerAuthCommands; exports.reportSetupCompleted = _chunkCQXFJZ57js.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkCQXFJZ57js.resolvePendingAuthClaimForResume;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DeeplineClient,
|
|
3
3
|
iterateCursorPages,
|
|
4
4
|
requireBillingIdempotencyKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6745OKK5.mjs";
|
|
6
6
|
import "./chunk-CBVIJSHF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
createTimestampedName,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
openInBrowser,
|
|
11
11
|
printCommandEnvelope,
|
|
12
12
|
shouldEmitJson
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5TFTY4H5.mjs";
|
|
14
14
|
import {
|
|
15
15
|
AuthError,
|
|
16
16
|
ConfigError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SDZW7NSO.mjs";
|
|
18
18
|
import "./chunk-DLIRSHV6.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-R2O2BKDH.mjs";
|
|
20
20
|
import "./chunk-6IKARAYD.mjs";
|
|
21
21
|
import {
|
|
22
22
|
DeeplineError
|