@igorjpimenta/manifold 0.0.0-bootstrap.1 → 0.0.0-stage
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/README.md +2 -1583
- package/package.json +4 -49
- package/.migrations/ops/0000_futuristic_karma.sql +0 -111
- package/.migrations/ops/0001_low_maximus.sql +0 -7
- package/.migrations/ops/meta/0000_snapshot.json +0 -763
- package/.migrations/ops/meta/0001_snapshot.json +0 -173
- package/.migrations/ops/meta/_journal.json +0 -20
- package/.migrations/runtime/0000_real_boomer.sql +0 -180
- package/.migrations/runtime/0001_hot_dakota_north.sql +0 -2
- package/.migrations/runtime/0002_breezy_vertigo.sql +0 -8
- package/.migrations/runtime/0003_dashing_jack_flag.sql +0 -5
- package/.migrations/runtime/0004_panoramic_ego.sql +0 -1
- package/.migrations/runtime/0005_tidy_ben_grimm.sql +0 -10
- package/.migrations/runtime/0006_wet_nightmare.sql +0 -57
- package/.migrations/runtime/0007_ambiguous_chronomancer.sql +0 -8
- package/.migrations/runtime/0008_wealthy_thundra.sql +0 -301
- package/.migrations/runtime/0009_lying_shocker.sql +0 -96
- package/.migrations/runtime/0010_solid_phantom_reporter.sql +0 -160
- package/.migrations/runtime/0011_windy_demogoblin.sql +0 -175
- package/.migrations/runtime/0012_restore_harness_fks.sql +0 -103
- package/.migrations/runtime/meta/0000_snapshot.json +0 -1181
- package/.migrations/runtime/meta/0001_snapshot.json +0 -1209
- package/.migrations/runtime/meta/0002_snapshot.json +0 -1261
- package/.migrations/runtime/meta/0003_snapshot.json +0 -1292
- package/.migrations/runtime/meta/0004_snapshot.json +0 -1240
- package/.migrations/runtime/meta/0006_snapshot.json +0 -1310
- package/.migrations/runtime/meta/0007_snapshot.json +0 -1362
- package/.migrations/runtime/meta/0008_snapshot.json +0 -1742
- package/.migrations/runtime/meta/0009_snapshot.json +0 -2413
- package/.migrations/runtime/meta/0010_snapshot.json +0 -2562
- package/.migrations/runtime/meta/0011_snapshot.json +0 -2812
- package/.migrations/runtime/meta/0012_snapshot.json +0 -2812
- package/.migrations/runtime/meta/_journal.json +0 -97
- package/RELEASING.md +0 -89
- package/agent/fleet.js +0 -100
- package/bin/cli.js +0 -854
- package/bin/manifold.js +0 -4
- package/boot/flow-revival.js +0 -536
- package/budget/index.js +0 -495
- package/budget/lib.js +0 -59
- package/dashboard/cost.js +0 -528
- package/dashboard/dist/assets/index-CUfp63sj.css +0 -1
- package/dashboard/dist/assets/index-Qy9JMpma.js +0 -371
- package/dashboard/dist/index.html +0 -13
- package/dashboard/event-log.js +0 -267
- package/dashboard/index.html +0 -12
- package/dashboard/package-lock.json +0 -2877
- package/dashboard/package.json +0 -37
- package/dashboard/pipeline-graph.js +0 -131
- package/dashboard/postcss.config.js +0 -6
- package/dashboard/search.js +0 -183
- package/dashboard/server.js +0 -1015
- package/dashboard/src/App.tsx +0 -42
- package/dashboard/src/api/client.ts +0 -118
- package/dashboard/src/api/types.ts +0 -510
- package/dashboard/src/api/ws.tsx +0 -112
- package/dashboard/src/components/CancelButton.tsx +0 -63
- package/dashboard/src/components/ClickToCopy.tsx +0 -68
- package/dashboard/src/components/CopyButton.tsx +0 -61
- package/dashboard/src/components/DailyCostTrend.tsx +0 -85
- package/dashboard/src/components/DailyTimeTrend.tsx +0 -94
- package/dashboard/src/components/Funnel.tsx +0 -149
- package/dashboard/src/components/GateForm.tsx +0 -158
- package/dashboard/src/components/GraphView.tsx +0 -302
- package/dashboard/src/components/GroupPathsSummary.tsx +0 -47
- package/dashboard/src/components/Histogram.tsx +0 -292
- package/dashboard/src/components/Layout.tsx +0 -28
- package/dashboard/src/components/NeedsAttention.tsx +0 -98
- package/dashboard/src/components/NodeContextCard.tsx +0 -132
- package/dashboard/src/components/PathTrail.tsx +0 -35
- package/dashboard/src/components/PipelineCostBreakdown.tsx +0 -277
- package/dashboard/src/components/RerunButton.tsx +0 -46
- package/dashboard/src/components/RunComparison.tsx +0 -53
- package/dashboard/src/components/Sparkline.tsx +0 -94
- package/dashboard/src/components/StatStrip.tsx +0 -147
- package/dashboard/src/components/StateTree.tsx +0 -84
- package/dashboard/src/components/StatusBadge.tsx +0 -18
- package/dashboard/src/components/SubflowPathPills.tsx +0 -38
- package/dashboard/src/components/SubflowSummary.tsx +0 -24
- package/dashboard/src/components/SubflowsCard.tsx +0 -327
- package/dashboard/src/components/TodayStrip.tsx +0 -86
- package/dashboard/src/components/TranscriptPane.tsx +0 -99
- package/dashboard/src/components/TranscriptRow.tsx +0 -69
- package/dashboard/src/components/ui/badge.tsx +0 -38
- package/dashboard/src/components/ui/button.tsx +0 -28
- package/dashboard/src/components/ui/card.tsx +0 -42
- package/dashboard/src/components/ui/skeleton.tsx +0 -9
- package/dashboard/src/components/ui/table.tsx +0 -62
- package/dashboard/src/index.css +0 -26
- package/dashboard/src/lib/anomaly.ts +0 -42
- package/dashboard/src/lib/format.ts +0 -30
- package/dashboard/src/lib/step-history.ts +0 -13
- package/dashboard/src/lib/subflow.ts +0 -154
- package/dashboard/src/lib/use-click-outside.ts +0 -28
- package/dashboard/src/lib/use-ignored-clusters.ts +0 -67
- package/dashboard/src/lib/utils.ts +0 -6
- package/dashboard/src/main.tsx +0 -10
- package/dashboard/src/types/shims.d.ts +0 -4
- package/dashboard/src/views/Home.tsx +0 -478
- package/dashboard/src/views/PipelineDetail.tsx +0 -1185
- package/dashboard/src/views/PipelinesList.tsx +0 -111
- package/dashboard/src/views/RunDetail.tsx +0 -248
- package/dashboard/src/views/Search.tsx +0 -196
- package/dashboard/stats.js +0 -668
- package/dashboard/tailwind.config.ts +0 -43
- package/dashboard/tree-stats.js +0 -12
- package/dashboard/tsconfig.json +0 -25
- package/dashboard/views.js +0 -231
- package/dashboard/vite.config.ts +0 -34
- package/drizzle.config.js +0 -12
- package/drizzle.config.ops.js +0 -12
- package/elevation.js +0 -116
- package/engine/admission-promotion-resume.js +0 -127
- package/engine/agent-dispatch.js +0 -64
- package/engine/child-resume-trigger.js +0 -315
- package/engine/executor-budget.js +0 -87
- package/engine/executor-cancel.js +0 -83
- package/engine/executor-errors.js +0 -122
- package/engine/executor-helpers.js +0 -254
- package/engine/executor-nodes.js +0 -292
- package/engine/executor-persist.js +0 -212
- package/engine/executor-subflow-children.js +0 -275
- package/engine/executor.js +0 -1013
- package/engine/global-concurrency.js +0 -33
- package/engine/loader.js +0 -528
- package/engine/needs-resolver.js +0 -229
- package/engine/pipelines-watcher.js +0 -133
- package/engine/result-replay.js +0 -34
- package/engine/revival-messages.js +0 -11
- package/engine/spawn-child.js +0 -55
- package/engine/wait-for-flow-settlement.js +0 -109
- package/events/catalog.js +0 -26
- package/events/emit.js +0 -44
- package/events/kinds.js +0 -118
- package/events/serve-ws.js +0 -74
- package/events/stream.js +0 -35
- package/events/ws-dialog.js +0 -257
- package/events/ws-frame.js +0 -194
- package/events/ws-run-events.js +0 -70
- package/events.js +0 -32
- package/gates/gate-resolver.js +0 -576
- package/gates/paused-flows.js +0 -55
- package/graphql/columns.js +0 -67
- package/graphql/schema.js +0 -333
- package/index.js +0 -49
- package/mcp/http.js +0 -159
- package/mcp/identity.js +0 -94
- package/mcp/stdio.js +0 -80
- package/mcp/tools.js +0 -245
- package/mcp/wire-ops.js +0 -178
- package/routes/bearer-auth.js +0 -57
- package/routes/discuss-audio.js +0 -87
- package/routes/discuss-component.js +0 -39
- package/routes/discuss-draft.js +0 -159
- package/routes/discuss-helpers.js +0 -20
- package/routes/discuss.js +0 -848
- package/routes/failures.js +0 -104
- package/routes/graphql.js +0 -61
- package/routes/health.js +0 -54
- package/routes/operator-discuss.js +0 -193
- package/routes/operator-resume.js +0 -32
- package/routes/operator-retry.js +0 -301
- package/routes/operator.js +0 -539
- package/routes/pipelines.js +0 -118
- package/routes/runs.js +0 -1129
- package/scripts/ci/import-check.mjs +0 -50
- package/scripts/link-core-self.mjs +0 -31
- package/scripts/with-guard.sh +0 -24
- package/server/app.js +0 -503
- package/server/registry.js +0 -53
- package/server/serve.js +0 -163
- package/state/admission-queue-store.js +0 -325
- package/state/attribution-registries.js +0 -102
- package/state/batch-writer.js +0 -162
- package/state/db-guard.js +0 -63
- package/state/db-health.js +0 -27
- package/state/db.js +0 -122
- package/state/discuss-store.js +0 -299
- package/state/failure-store.js +0 -427
- package/state/migrate.js +0 -104
- package/state/node-cost.js +0 -67
- package/state/node-executions.js +0 -775
- package/state/node-health-store.js +0 -124
- package/state/ops-merge.js +0 -93
- package/state/paths.js +0 -146
- package/state/pipeline-dirs.js +0 -99
- package/state/pipeline-registry.js +0 -449
- package/state/run-store.js +0 -697
- package/state/schema.js +0 -438
- package/state/schema.ops.js +0 -44
- package/state/session-index.js +0 -177
- package/state/session-keys.js +0 -39
- package/state/state-store.js +0 -311
- package/state/subflow-state.js +0 -126
- package/state/tool-handoff.js +0 -169
- package/telemetry/budget-alert.js +0 -353
- package/telemetry/cli.js +0 -331
- package/telemetry/grammar.js +0 -119
- package/telemetry/http-budget.js +0 -132
- package/telemetry/http-cost.js +0 -670
- package/telemetry/http-helpers.js +0 -134
- package/telemetry/http-tree.js +0 -349
- package/telemetry/http.js +0 -44
- package/telemetry/index.js +0 -307
- package/telemetry/ingest.js +0 -134
- package/telemetry/labels.js +0 -115
- package/telemetry/pricer.js +0 -77
- package/telemetry/resolver.js +0 -314
- package/telemetry/store.js +0 -147
- package/utils/run-patch.js +0 -43
package/events/ws-run-events.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// events/ws-run-events.js — gateway WS projection of flow writes.
|
|
2
|
-
//
|
|
3
|
-
// Subscribes to flowStateEmitter ("change", bare flowId) and emits the
|
|
4
|
-
// canonical per-revision run patch through the shared emitter. Revision is
|
|
5
|
-
// the per-write granularity (status alone would drop every same-status
|
|
6
|
-
// node transition).
|
|
7
|
-
import { buildRunPatch as _buildRunPatch } from "../utils/run-patch.js";
|
|
8
|
-
|
|
9
|
-
export function createWsRunEventsListener({ store, nodeExecutionsStore, pipelineLookup, getBroadcast, emit }) {
|
|
10
|
-
const knownRevisions = new Map();
|
|
11
|
-
|
|
12
|
-
// Builds a RunSummary-shaped patch from the in-memory flow object.
|
|
13
|
-
// The wrapper binds the pipeline lookup; the pure builder lives in
|
|
14
|
-
// utils/run-patch.js.
|
|
15
|
-
const buildRunPatch = (flow, now) =>
|
|
16
|
-
_buildRunPatch(flow, now, { pipelineLookup });
|
|
17
|
-
|
|
18
|
-
return async function wsRunEventsListener(flowId) {
|
|
19
|
-
try {
|
|
20
|
-
const flow = await store.get(flowId);
|
|
21
|
-
if (!flow) return;
|
|
22
|
-
// Primary gate: has this write already been processed. Keyed on
|
|
23
|
-
// revision, not status — a flow's status stays "running" across
|
|
24
|
-
// many internal node transitions (the common case: current_step
|
|
25
|
-
// advances every node, status only changes at
|
|
26
|
-
// start/gate/terminal), so a status-keyed gate would drop every
|
|
27
|
-
// transition after the first and never reach the "rich patch"
|
|
28
|
-
// broadcast below. revision (state/run-store.js,
|
|
29
|
-
// CAS-incremented on every write) is the per-write granularity.
|
|
30
|
-
const revision = flow.revision;
|
|
31
|
-
const priorRevision = knownRevisions.get(flowId);
|
|
32
|
-
if (priorRevision !== undefined && revision <= priorRevision) return;
|
|
33
|
-
const status = flow.status;
|
|
34
|
-
knownRevisions.set(flowId, revision);
|
|
35
|
-
const rawBroadcast = getBroadcast();
|
|
36
|
-
if (!rawBroadcast) return;
|
|
37
|
-
const now = Date.now();
|
|
38
|
-
// Rich patch — truly per-revision: subscribed clients upsert without
|
|
39
|
-
// a re-fetch on every transition.
|
|
40
|
-
const ownPatch = buildRunPatch(flow, now);
|
|
41
|
-
emit("run.updated", { ...ownPatch }).catch(() => {});
|
|
42
|
-
// If this is a child flow (spawned by a subflow node), also push a
|
|
43
|
-
// subflow-aggregate patch to the parent so RunDetailView refreshes
|
|
44
|
-
// the Branches section on every subflow state change, not just when
|
|
45
|
-
// all siblings go terminal and the parent resumes. Per-revision,
|
|
46
|
-
// like the rich patch above.
|
|
47
|
-
if (flow.parentInvocationId) {
|
|
48
|
-
try {
|
|
49
|
-
const inv = await nodeExecutionsStore.getInvocation(flow.parentInvocationId);
|
|
50
|
-
if (inv?.flowId) {
|
|
51
|
-
const parentFlow = await store.get(inv.flowId);
|
|
52
|
-
if (parentFlow) {
|
|
53
|
-
const ps = parentFlow.status;
|
|
54
|
-
const parentIsTerminal = ps === "succeeded" || ps === "failed"
|
|
55
|
-
|| ps === "cancelled" || ps === "skipped";
|
|
56
|
-
if (!parentIsTerminal) {
|
|
57
|
-
emit("run.updated", { ...buildRunPatch(parentFlow, now) }).catch(() => {});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
} catch {}
|
|
62
|
-
}
|
|
63
|
-
// Terminal flows get no further revisions — drop the entry so the
|
|
64
|
-
// map doesn't grow unbounded across flow_ids.
|
|
65
|
-
if (status === "succeeded" || status === "failed" || status === "cancelled" || status === "skipped") {
|
|
66
|
-
knownRevisions.delete(flowId);
|
|
67
|
-
}
|
|
68
|
-
} catch {}
|
|
69
|
-
};
|
|
70
|
-
}
|
package/events.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// events.js — in-process event bus for flow state changes.
|
|
2
|
-
// ESM caches the instance so every importer shares the same emitter object
|
|
3
|
-
// in-process.
|
|
4
|
-
import { EventEmitter } from "node:events";
|
|
5
|
-
|
|
6
|
-
export const flowStateEmitter = new EventEmitter();
|
|
7
|
-
// Headroom for future additions.
|
|
8
|
-
flowStateEmitter.setMaxListeners(20);
|
|
9
|
-
|
|
10
|
-
// Fired by failure-store when a new engine failure row is inserted.
|
|
11
|
-
// Consumers get notified immediately and don't need to poll the DB.
|
|
12
|
-
export const failureEmitter = new EventEmitter();
|
|
13
|
-
failureEmitter.setMaxListeners(10);
|
|
14
|
-
|
|
15
|
-
// Structured state-boundary emitters — carry full payloads so a consumer can
|
|
16
|
-
// render without a DB scan.
|
|
17
|
-
|
|
18
|
-
// gate.opened { flowId, nodeId, ... } — local trigger only (test
|
|
19
|
-
// wait-for-event; the wire kind is produced thin at the WS boundary,
|
|
20
|
-
// forwarded over WS as manifold.gate.opened.
|
|
21
|
-
// gate.closed { flowId, nodeId } — forwarded as manifold.gate.closed
|
|
22
|
-
export const gateEmitter = new EventEmitter();
|
|
23
|
-
gateEmitter.setMaxListeners(10);
|
|
24
|
-
|
|
25
|
-
// node.executing { flowId, nodeId, pipelineId, parentInvocationId }
|
|
26
|
-
export const nodeEmitter = new EventEmitter();
|
|
27
|
-
nodeEmitter.setMaxListeners(10);
|
|
28
|
-
|
|
29
|
-
// flow.step.changed { flowId, lastStep, stateJson, status }
|
|
30
|
-
// flow.terminal { flowId, status, stateJson }
|
|
31
|
-
export const flowEmitter = new EventEmitter();
|
|
32
|
-
flowEmitter.setMaxListeners(10);
|