arkgate 4.8.7 → 4.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -3
- package/README.md +36 -4
- package/bin/ark-dashboard.mjs +423 -0
- package/bin/ark.mjs +51 -3
- package/dist/{diagnosticCatalog-wDAH08gH.d.ts → diagnosticCatalog-DxKCTBbp.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/nestjs/index.cjs +5 -5
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +5 -5
- package/dist/runtime/index.cjs +15 -15
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +15 -15
- package/dist/{types-CwZ_oz1N.d.ts → types-DxvmJO-D.d.ts} +105 -1
- package/docs/README.md +12 -4
- package/docs/agent-guide.md +36 -1
- package/docs/ai-gates.md +13 -1
- package/docs/arkorder.md +11 -1
- package/docs/configuration.md +2 -1
- package/docs/develop.md +13 -6
- package/docs/enthusiast/README.md +13 -2
- package/docs/package-surface.md +17 -4
- package/docs/product-voice.md +25 -2
- package/docs/use.md +11 -3
- package/package.json +3 -1
- package/server.json +2 -2
- package/templates/agent-skills/ark-adopt/SKILL.md +1 -0
- package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-place/SKILL.md +1 -0
- package/templates/skills/ark-adopt.md +1 -0
- package/templates/skills/ark-autopilot.md +1 -1
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-place.md +1 -0
|
@@ -1030,8 +1030,67 @@ declare const ARK_RUN_INSPECTOR_DEFAULT_PORT = 0;
|
|
|
1030
1030
|
declare const ARK_RUN_INSPECTOR_SNAPSHOT_PATH = "/snapshot";
|
|
1031
1031
|
declare const ARK_RUN_INSPECTOR_EVENTS_PATH = "/events";
|
|
1032
1032
|
declare const ARK_RUN_INSPECTOR_GRAPH_PATH = "/graph";
|
|
1033
|
+
declare const ARK_RUN_INSPECTOR_OUTBOX_PATH = "/outbox";
|
|
1034
|
+
declare const ARK_RUN_INSPECTOR_WORKFLOWS_PATH = "/workflows";
|
|
1033
1035
|
declare const ARK_RUN_INSPECTOR_SSE_EVENT = "snapshot";
|
|
1034
1036
|
declare const ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK: "in-process-local";
|
|
1037
|
+
/** Server-side sample cap for outbox/workflows monitors (DoS floor). */
|
|
1038
|
+
declare const ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT = 32;
|
|
1039
|
+
/** Outbox statuses the Queues monitor surfaces (dispatched is omitted). */
|
|
1040
|
+
declare const ARK_RUN_INSPECTOR_OUTBOX_MONITOR_STATUSES: readonly ["pending", "failed"];
|
|
1041
|
+
type ArkRunInspectorOutboxMonitorStatus = (typeof ARK_RUN_INSPECTOR_OUTBOX_MONITOR_STATUSES)[number];
|
|
1042
|
+
type ArkRunInspectorStoreDurabilityKind = 'memory' | 'durable';
|
|
1043
|
+
type ArkRunInspectorStoreRole = 'outbox' | 'audit' | 'workflow';
|
|
1044
|
+
type ArkRunInspectorStoreDurability = {
|
|
1045
|
+
role: ArkRunInspectorStoreRole;
|
|
1046
|
+
id: string;
|
|
1047
|
+
kind: ArkRunInspectorStoreDurabilityKind;
|
|
1048
|
+
};
|
|
1049
|
+
type ArkRunInspectorHardeningDurability = {
|
|
1050
|
+
stores: ArkRunInspectorStoreDurability[];
|
|
1051
|
+
};
|
|
1052
|
+
type ArkRunInspectorHardening = {
|
|
1053
|
+
durability: ArkRunInspectorHardeningDurability;
|
|
1054
|
+
};
|
|
1055
|
+
type ArkRunInspectorOutboxRecordSummary = {
|
|
1056
|
+
id: string;
|
|
1057
|
+
status: ArkRunInspectorOutboxMonitorStatus;
|
|
1058
|
+
attempts: number;
|
|
1059
|
+
intent?: string;
|
|
1060
|
+
error?: string;
|
|
1061
|
+
updatedAt?: string;
|
|
1062
|
+
};
|
|
1063
|
+
type ArkRunInspectorOutboxMonitor = {
|
|
1064
|
+
available: boolean;
|
|
1065
|
+
pendingCount: number;
|
|
1066
|
+
failedCount: number;
|
|
1067
|
+
pending: ArkRunInspectorOutboxRecordSummary[];
|
|
1068
|
+
failed: ArkRunInspectorOutboxRecordSummary[];
|
|
1069
|
+
/** Cap applied to pending/failed sample arrays (counts remain accurate). */
|
|
1070
|
+
sampleLimit: number;
|
|
1071
|
+
};
|
|
1072
|
+
type ArkRunInspectorWorkflowSummary = {
|
|
1073
|
+
id: string;
|
|
1074
|
+
name: string;
|
|
1075
|
+
status: string;
|
|
1076
|
+
currentStep?: string;
|
|
1077
|
+
error?: string;
|
|
1078
|
+
};
|
|
1079
|
+
type ArkRunInspectorWorkflowsMonitor = {
|
|
1080
|
+
available: boolean;
|
|
1081
|
+
total: number;
|
|
1082
|
+
runningCount: number;
|
|
1083
|
+
compensatingCount: number;
|
|
1084
|
+
failedCount: number;
|
|
1085
|
+
pendingCount: number;
|
|
1086
|
+
workflows: ArkRunInspectorWorkflowSummary[];
|
|
1087
|
+
/** Cap applied to workflows sample array (counts remain accurate). */
|
|
1088
|
+
sampleLimit: number;
|
|
1089
|
+
};
|
|
1090
|
+
type ArkRunInspectorMonitorBuildOptions = {
|
|
1091
|
+
/** Bound samples; clamped to 0…ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT. Default 32. */
|
|
1092
|
+
sampleLimit?: number;
|
|
1093
|
+
};
|
|
1035
1094
|
declare class ArkRunInspectorProductionError extends Error {
|
|
1036
1095
|
constructor();
|
|
1037
1096
|
}
|
|
@@ -1060,6 +1119,12 @@ type ArkRunInspectorSnapshot = {
|
|
|
1060
1119
|
package: DependencyInformationPackage;
|
|
1061
1120
|
transport: ArkRunInspectorTransportFacts;
|
|
1062
1121
|
observability: unknown;
|
|
1122
|
+
/** Explicit store durability facts from real kernel ports (never component-id inference). */
|
|
1123
|
+
hardening: ArkRunInspectorHardening;
|
|
1124
|
+
/** Optional OD04 queue facts when the caller supplies them (endpoints preferred). */
|
|
1125
|
+
outbox?: ArkRunInspectorOutboxMonitor;
|
|
1126
|
+
/** Optional OD04 workflow facts when the caller supplies them (endpoints preferred). */
|
|
1127
|
+
workflows?: ArkRunInspectorWorkflowsMonitor;
|
|
1063
1128
|
};
|
|
1064
1129
|
type ArkRunInspectorBindInput = {
|
|
1065
1130
|
host?: unknown;
|
|
@@ -1075,11 +1140,34 @@ type ArkRunInspectorSnapshotInput = {
|
|
|
1075
1140
|
observability?: unknown;
|
|
1076
1141
|
ephemeralDefault?: unknown;
|
|
1077
1142
|
brokerBound?: unknown;
|
|
1143
|
+
hardening?: unknown;
|
|
1144
|
+
outbox?: unknown;
|
|
1145
|
+
workflows?: unknown;
|
|
1078
1146
|
};
|
|
1079
1147
|
declare function isArkRunInspectorProductionEnv(nodeEnv: unknown): boolean;
|
|
1080
1148
|
declare function isArkRunInspectorLoopbackHost(host: unknown): boolean;
|
|
1081
1149
|
declare function resolveArkRunInspectorBind(input?: ArkRunInspectorBindInput): ArkRunInspectorBind;
|
|
1082
1150
|
declare function arkRunInspectorUrl(host: string, port: number, path: string): string;
|
|
1151
|
+
/**
|
|
1152
|
+
* Classify a store port by constructor / declared id. `InMemory*` → memory; else durable.
|
|
1153
|
+
*/
|
|
1154
|
+
declare function classifyArkRunInspectorStoreDurability(id: unknown, role: ArkRunInspectorStoreRole): ArkRunInspectorStoreDurability;
|
|
1155
|
+
/**
|
|
1156
|
+
* Build hardening.durability facts from explicit store rows (not package.components).
|
|
1157
|
+
*/
|
|
1158
|
+
declare function buildArkRunInspectorHardening(input?: unknown): ArkRunInspectorHardening;
|
|
1159
|
+
/**
|
|
1160
|
+
* Sanitize EventBufferStore.list rows into pending/failed monitor facts (no payloads).
|
|
1161
|
+
* Counts cover the full input; sample arrays are capped at sampleLimit (≤32).
|
|
1162
|
+
*/
|
|
1163
|
+
declare function buildArkRunInspectorOutboxMonitor(records?: unknown, options?: ArkRunInspectorMonitorBuildOptions): ArkRunInspectorOutboxMonitor;
|
|
1164
|
+
declare function unavailableArkRunInspectorOutboxMonitor(): ArkRunInspectorOutboxMonitor;
|
|
1165
|
+
/**
|
|
1166
|
+
* Sanitize WorkflowEngine.list rows into monitor facts (id/name/status/step/error only).
|
|
1167
|
+
* Counts cover the full input; the workflows sample is capped at sampleLimit (≤32).
|
|
1168
|
+
*/
|
|
1169
|
+
declare function buildArkRunInspectorWorkflowsMonitor(snapshots?: unknown, options?: ArkRunInspectorMonitorBuildOptions): ArkRunInspectorWorkflowsMonitor;
|
|
1170
|
+
declare function unavailableArkRunInspectorWorkflowsMonitor(): ArkRunInspectorWorkflowsMonitor;
|
|
1083
1171
|
declare function buildArkRunInspectorSnapshot(input?: ArkRunInspectorSnapshotInput): ArkRunInspectorSnapshot;
|
|
1084
1172
|
declare function formatArkRunInspectorSseEvent(snapshot: unknown): string;
|
|
1085
1173
|
|
|
@@ -1107,6 +1195,8 @@ type ArkRunInspectorHandle = {
|
|
|
1107
1195
|
snapshotUrl: string;
|
|
1108
1196
|
eventsUrl: string;
|
|
1109
1197
|
graphUrl: string;
|
|
1198
|
+
outboxUrl: string;
|
|
1199
|
+
workflowsUrl: string;
|
|
1110
1200
|
close(): Promise<void>;
|
|
1111
1201
|
};
|
|
1112
1202
|
|
|
@@ -1125,6 +1215,20 @@ type StartArkRunInspectorOptions = {
|
|
|
1125
1215
|
type ArkRunInspectorSource = {
|
|
1126
1216
|
getInspectorSnapshot(bind: ArkRunInspectorBind): ArkRunInspectorSnapshot;
|
|
1127
1217
|
requestGraph(query?: ArkRunGraphQuery): ArkRunGraph;
|
|
1218
|
+
/** OD04: pending/failed outbox summaries (EventBufferStore.list). */
|
|
1219
|
+
listInspectorOutbox?(): Promise<ArkRunInspectorOutboxMonitor>;
|
|
1220
|
+
/** OD04: workflow/saga summaries (WorkflowEngine.list). */
|
|
1221
|
+
listInspectorWorkflows?(): Promise<ArkRunInspectorWorkflowsMonitor>;
|
|
1222
|
+
/** Duck-typed kernel ports when explicit list* helpers are absent. */
|
|
1223
|
+
outbox?: {
|
|
1224
|
+
list(status?: 'pending' | 'dispatched' | 'failed'): Promise<unknown[]>;
|
|
1225
|
+
};
|
|
1226
|
+
eventBuffer?: {
|
|
1227
|
+
list(status?: 'pending' | 'dispatched' | 'failed'): Promise<unknown[]>;
|
|
1228
|
+
};
|
|
1229
|
+
workflowEngine?: {
|
|
1230
|
+
list(workflowName?: string): Promise<unknown[]>;
|
|
1231
|
+
};
|
|
1128
1232
|
};
|
|
1129
1233
|
declare function startArkRunInspector(source: ArkRunInspectorSource, options?: StartArkRunInspectorOptions): Promise<ArkRunInspectorHandle>;
|
|
1130
1234
|
|
|
@@ -1249,4 +1353,4 @@ interface CreateArkKernelFromConfigOptions extends Omit<CreateArkKernelOptions,
|
|
|
1249
1353
|
}
|
|
1250
1354
|
type ArkKernelConfig = ArkCheckConfig;
|
|
1251
1355
|
|
|
1252
|
-
export { ARK_RUN_INSPECTOR_EVENTS_PATH as $, type ArkKernel as A, type OutboxStatus as B, type CreateArkKernelOptions as C, type DefineIntentOptions as D, type EventContractRegistry as E, type OutboxRecord as F, type GraphEdge as G, type ObservabilityDriftReport as H, IntentRegistry as I, ARK_RUN_COMPONENT_LIFETIMES as J, ARK_RUN_EPHEMERAL_DEFAULT as K, ARK_RUN_GRAPH_DEFAULT_SLICE as L, type MetadataRegistry as M, ARK_RUN_GRAPH_NODE_KINDS as N, type ObservabilityReporter as O, type ProjectionRegistry as P, ARK_RUN_GRAPH_PROCESS_EDGE_KINDS as Q, type ReadModelStore as R, type SagaContext as S, type TraceRecordType as T, ARK_RUN_GRAPH_SCHEMA_VERSION as U, ARK_RUN_GRAPH_SLICES as V, type WorkflowStore as W, ARK_RUN_GRAPH_TECHNICAL_EDGE_KINDS as X, ARK_RUN_INFORMATION_PACKAGE_SCHEMA_VERSION as Y, ARK_RUN_INSPECTOR_DEFAULT_HOST as Z, ARK_RUN_INSPECTOR_DEFAULT_PORT as _, type DependencyGraph as a,
|
|
1356
|
+
export { ARK_RUN_INSPECTOR_EVENTS_PATH as $, type ArkKernel as A, type OutboxStatus as B, type CreateArkKernelOptions as C, type DefineIntentOptions as D, type EventContractRegistry as E, type OutboxRecord as F, type GraphEdge as G, type ObservabilityDriftReport as H, IntentRegistry as I, ARK_RUN_COMPONENT_LIFETIMES as J, ARK_RUN_EPHEMERAL_DEFAULT as K, ARK_RUN_GRAPH_DEFAULT_SLICE as L, type MetadataRegistry as M, ARK_RUN_GRAPH_NODE_KINDS as N, type ObservabilityReporter as O, type ProjectionRegistry as P, ARK_RUN_GRAPH_PROCESS_EDGE_KINDS as Q, type ReadModelStore as R, type SagaContext as S, type TraceRecordType as T, ARK_RUN_GRAPH_SCHEMA_VERSION as U, ARK_RUN_GRAPH_SLICES as V, type WorkflowStore as W, ARK_RUN_GRAPH_TECHNICAL_EDGE_KINDS as X, ARK_RUN_INFORMATION_PACKAGE_SCHEMA_VERSION as Y, ARK_RUN_INSPECTOR_DEFAULT_HOST as Z, ARK_RUN_INSPECTOR_DEFAULT_PORT as _, type DependencyGraph as a, type EventContractIssue as a$, ARK_RUN_INSPECTOR_GRAPH_PATH as a0, ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT as a1, ARK_RUN_INSPECTOR_OUTBOX_PATH as a2, ARK_RUN_INSPECTOR_SCHEMA_VERSION as a3, ARK_RUN_INSPECTOR_SNAPSHOT_PATH as a4, ARK_RUN_INSPECTOR_SSE_EVENT as a5, ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK as a6, ARK_RUN_INSPECTOR_WORKFLOWS_PATH as a7, ARK_RUN_TRANSPORT_KINDS as a8, type ArkManifestArchitecture as a9, type ArkRunInspectorHandle as aA, type ArkRunInspectorHardening as aB, type ArkRunInspectorHardeningDurability as aC, type ArkRunInspectorMonitorBuildOptions as aD, type ArkRunInspectorOutboxMonitor as aE, type ArkRunInspectorOutboxRecordSummary as aF, ArkRunInspectorProductionError as aG, type ArkRunInspectorSnapshot as aH, type ArkRunInspectorSnapshotInput as aI, type ArkRunInspectorSource as aJ, type ArkRunInspectorStoreDurability as aK, type ArkRunInspectorStoreDurabilityKind as aL, type ArkRunInspectorStoreRole as aM, type ArkRunInspectorTransportFacts as aN, type ArkRunInspectorWorkflowSummary as aO, type ArkRunInspectorWorkflowsMonitor as aP, type ArkRunPublisher as aQ, type ArkRunRegisterOptions as aR, type ArkRunRegistrationHandle as aS, type ArkRunSendOptions as aT, type ArkRunSendPlan as aU, type ArkRunSendPlanInput as aV, type ArkRunSendResult as aW, type ArkRunTransportKind as aX, type AuditRecordInput as aY, type AuditRecordType as aZ, type EntityMeta as a_, type ArkManifestData as aa, type ArkManifestEntityLink as ab, type ArkManifestGraph as ac, type ArkManifestIntent as ad, type ArkManifestPolicy as ae, type ArkManifestProjection as af, type ArkRunBrokerAdapter as ag, type ArkRunComponentLifetime as ah, type ArkRunDeliveredVia as ai, type ArkRunExtendedInfo as aj, type ArkRunGraph as ak, type ArkRunGraphEdge as al, type ArkRunGraphEdgeKind as am, type ArkRunGraphMatch as an, type ArkRunGraphMatchInput as ao, type ArkRunGraphNode as ap, type ArkRunGraphNodeKind as aq, type ArkRunGraphProcessEdgeKind as ar, type ArkRunGraphQuery as as, type ArkRunGraphResolvedQuery as at, type ArkRunGraphSlice as au, type ArkRunGraphTechnicalEdgeKind as av, type ArkRunInformationPackageComponent as aw, type ArkRunInspectorBind as ax, ArkRunInspectorBindError as ay, type ArkRunInspectorBindInput as az, type AuditStore as b, type EventHandler as b0, type EventInterceptionInfo as b1, type EventInterceptor as b2, type EventInterceptorContext as b3, type EventPayloadPatch as b4, type EventPayloadSchema as b5, type EventPublisher as b6, type EventSchemaField as b7, type EventSchemaFieldType as b8, type FieldMeta as b9, buildDependencyInformationPackage as bA, classifyArkRunInspectorStoreDurability as bB, closeArkRunGraphQuery as bC, closedArkRunEphemeral as bD, closedArkRunTransportKind as bE, formatArkRunGraphMermaid as bF, formatArkRunInspectorSseEvent as bG, isArkRunInspectorLoopbackHost as bH, isArkRunInspectorProductionEnv as bI, requestArkRunGraph as bJ, resolveArkRunInspectorBind as bK, resolveArkRunSendPlan as bL, startArkRunInspector as bM, unavailableArkRunInspectorOutboxMonitor as bN, unavailableArkRunInspectorWorkflowsMonitor as bO, type GraphNode as ba, InvalidArkRunGraphQueryError as bb, InvalidArkRunSendOptionError as bc, type ObservabilityFlow as bd, type ObservedLayerFlowMode as be, type OutboxStore as bf, type PolicyEvaluationResult as bg, type ProjectionCheckpoint as bh, type ProjectionDefinition as bi, type PublishedEventRecord as bj, type RetryPolicy as bk, type SagaStatus as bl, type SagaStep as bm, type StartArkRunInspectorOptions as bn, type TraceSink as bo, type Unsubscribe as bp, type WorkflowDefinition as bq, type WorkflowStatus as br, type WorkflowStep as bs, appendDecisionTape as bt, arkRunGraphQueryFromSearchParams as bu, arkRunInspectorUrl as bv, buildArkRunInspectorHardening as bw, buildArkRunInspectorOutboxMonitor as bx, buildArkRunInspectorSnapshot as by, buildArkRunInspectorWorkflowsMonitor as bz, type AuditRecord as c, type AuditQuery as d, type CreateAuditTrailOptions as e, type AuditTrail as f, type EventContract as g, type EventContractValidationResult as h, type CreateProjectionRegistryOptions as i, type EventBufferStore as j, type EventBufferRecord as k, type EventBufferStatus as l, type EventBusOptions as m, type EventBus as n, type CreateObservabilityReporterOptions as o, PolicyEngine as p, type ArkManifest as q, type WorkflowSnapshot as r, type SagaDefinition as s, type CreateWorkflowEngineOptions as t, type SagaInstance as u, type WorkflowEngine as v, type DependencyInformationPackage as w, type ArkKernelConfig as x, type CreateArkKernelFromConfigOptions as y, type TraceRecord as z };
|
package/docs/README.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
7
|
is just documentation.
|
|
8
8
|
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
9
17
|
Pick your path. Skip everything else.
|
|
10
18
|
|
|
11
19
|
| You are… | Start here |
|
|
@@ -58,14 +66,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
|
|
|
58
66
|
| Area | Path |
|
|
59
67
|
|------|------|
|
|
60
68
|
| Release notes (by version) | [releases/](releases/) · npm [CHANGELOG.md](../CHANGELOG.md) (Unreleased + 4.6.x) · [pre-4.6 archive](archive/CHANGELOG-pre-4.6.md) |
|
|
61
|
-
| Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done
|
|
69
|
+
| Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done; shipped **4.8.7**; [ADR 0035](adr/0035-layer-description-projection.md); project `layers[].description`; no schema bump). [observability-tui](plans/observability-tui/README.md) (`OD01`–`OD04` done on the **4.8.8 prepared tree**; not yet published; in-memory honesty retained). |
|
|
62
70
|
| Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
|
|
63
71
|
| Field adoption kit (scaffolding, not closed) | [field/](field/) |
|
|
64
72
|
| Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Prior: [releases/4.8.5.md](releases/4.8.5.md) · [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
|
|
74
|
+
Prepared: [releases/4.8.8.md](releases/4.8.8.md) (`arkgate@4.8.8`; not published).
|
|
75
|
+
Current published: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7` on npm `latest`; does not close `K01`).
|
|
76
|
+
Prior: [releases/4.8.6.md](releases/4.8.6.md) · [releases/4.8.5.md](releases/4.8.5.md) · [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
|
|
69
77
|
Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
|
|
70
78
|
|
|
71
79
|
---
|
package/docs/agent-guide.md
CHANGED
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
5
|
+
|
|
6
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
|
+
is just documentation.
|
|
8
|
+
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
5
17
|
This guide is the **develop** reference for agents and codegen: write hooks, advisory MCP tools,
|
|
6
|
-
CI, and `/ark-*` skills.
|
|
18
|
+
CI, and `/ark-*` skills.
|
|
7
19
|
|
|
8
20
|
- Product path (anyone): [use.md](use.md)
|
|
9
21
|
- Integration overview: [develop.md](develop.md)
|
|
@@ -1413,3 +1425,26 @@ doctor → compact router (and `/ark-autopilot` only after the skill pack).
|
|
|
1413
1425
|
6. **Wire** relationships via `registry.define(..., { dependsOn, produces })`
|
|
1414
1426
|
7. **Register** event contracts before publishing in strict mode
|
|
1415
1427
|
8. **Observe** runtime via `bus.getTrace()`, `auditTrail.query()`, outbox records, projection checkpoints, and `ark.observability.report()`
|
|
1428
|
+
9. **Optional loopback inspector** via `ark.startInspector()` — JSON facts only (see below); poll with `ark-dashboard` / `arkgate-dashboard` when you want a terminal view
|
|
1429
|
+
|
|
1430
|
+
### Dev inspector queue endpoints and dashboard bins
|
|
1431
|
+
|
|
1432
|
+
`startInspector()` / `startArkRunInspector()` bind loopback only, refuse
|
|
1433
|
+
`NODE_ENV=production`, and lazy-load HTTP. The kernel exposes JSON monitor facts
|
|
1434
|
+
(snapshot / graph / queue endpoints) — not a TUI.
|
|
1435
|
+
|
|
1436
|
+
| Method + path | Role |
|
|
1437
|
+
|---------------|------|
|
|
1438
|
+
| `GET /snapshot` (also `/`) | Information package + transport + observability snapshot |
|
|
1439
|
+
| `GET /events` | SSE of the same snapshot |
|
|
1440
|
+
| `GET /graph` | `requestGraph` slice (+ Mermaid helper) |
|
|
1441
|
+
| `GET /outbox` | Outbox monitor: `available`, `pendingCount`, `failedCount`, `pending[]` / `failed[]` row summaries (`id`, `status`, `attempts`, optional `intent` / `error` / `updatedAt`) — **no event payloads** |
|
|
1442
|
+
| `GET /workflows` | Workflows monitor: counts + `workflows[]` summaries (`id`, `name`, `status`, optional `currentStep` / `error`) |
|
|
1443
|
+
|
|
1444
|
+
Dual package bins **`ark-dashboard`** and **`arkgate-dashboard`**
|
|
1445
|
+
(`bin/ark-dashboard.mjs`) poll `--url` (default `http://127.0.0.1:3000/snapshot`)
|
|
1446
|
+
and sibling `/outbox` + `/workflows` on an interval (`--interval`, 200–60000 ms).
|
|
1447
|
+
ANSI escape sequences + polling only — no React, Ink, or Blessed. Use
|
|
1448
|
+
`ark dashboard` / `arkgate dashboard` (passthrough to `bin/ark-dashboard.mjs`) or the
|
|
1449
|
+
dual bins `ark-dashboard` / `arkgate-dashboard`.
|
|
1450
|
+
Presentation stays in Tooling (`bin/`); do not couple a TUI into `src/kernel`.
|
package/docs/ai-gates.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
|
+
is just documentation.
|
|
8
|
+
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
17
|
+
This page is host install depth (hooks / MCP / CI).
|
|
6
18
|
|
|
7
19
|
This page is **develop** depth (install hooks/MCP/CI per host). Product path: [use.md](use.md) ·
|
|
8
20
|
overview: [develop.md](develop.md) · hub: [README.md](README.md).
|
package/docs/arkorder.md
CHANGED
|
@@ -139,12 +139,18 @@ does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
|
|
|
139
139
|
| `managedLayers` | Layers whose persistence writes of `xiKeys` are the skip |
|
|
140
140
|
| `planeRoots` | Files allowed to call `createOrderPlane` |
|
|
141
141
|
| `maxXiKeys` | Cap on ξ (default 7). Haken: few slow modes |
|
|
142
|
-
| `xiKeys` | Optional 3–5 slow names. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
142
|
+
| `xiKeys` | Optional 3–5 slow names chosen by the modeller. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
143
143
|
|
|
144
144
|
Unknown keys fail closed. Empty `planeRoots` in `enforced` fails
|
|
145
145
|
`ARKORDER_MISSING_PLANE`. Demotion or deletion is a policy-delta **weakening**.
|
|
146
146
|
This library’s 4-layer authoring contract does **not** turn the extra on.
|
|
147
147
|
|
|
148
|
+
The modeller names the keys. Empty blast is a mechanical rejection, but a large
|
|
149
|
+
blast does not make `paid` independent of current state. Whether a candidate is
|
|
150
|
+
entailed by current state remains a modeller and skill obligation. Invoices stay
|
|
151
|
+
on ingest. A `paid` flag is not a fourth slow key: derive it from cash received
|
|
152
|
+
against the invoice amount.
|
|
153
|
+
|
|
148
154
|
---
|
|
149
155
|
|
|
150
156
|
## Activation (same shape as ArkRun)
|
|
@@ -212,6 +218,10 @@ Durability (`K01`) stays parked. In-memory is the honesty line.
|
|
|
212
218
|
- a degraded-mode contract (nothing can be down)
|
|
213
219
|
|
|
214
220
|
If a “slow parameter” changes with every click, it is not an order parameter.
|
|
221
|
+
A status you can recompute from data you already have is not a slow decision. Derive it. Do not freeze it. The check remains silent on semantic entailment.
|
|
222
|
+
For example, cash arrives through ingest; `paid` is a conclusion derived from
|
|
223
|
+
cash received against amount due, not a key to freeze or change with
|
|
224
|
+
`proposeRelease`.
|
|
215
225
|
|
|
216
226
|
The valved loop ships in **4.8.6** ([ADR 0034](adr/0034-arkorder-valved-loop.md)).
|
|
217
227
|
In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
|
package/docs/configuration.md
CHANGED
|
@@ -130,7 +130,8 @@ Top-level fields:
|
|
|
130
130
|
Import `createOrderPlane` from `arkgate/order` (same package). Empty `planeRoots` in
|
|
131
131
|
`enforced` mode fails closed (`ARKORDER_MISSING_PLANE`). `xiKeys` are the 3–5 slow
|
|
132
132
|
names the product already knows (plan, protocol, cost-code bound). Empty `xiKeys`
|
|
133
|
-
leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids
|
|
133
|
+
leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids and recomputable statuses
|
|
134
|
+
such as `paid` / `overdue` are not keys. Factory options
|
|
134
135
|
`informationBudget`, `sigmaMaxAgeMs`, `store` (`ReleaseStore`), and capacity packs
|
|
135
136
|
belong on `createOrderPlane`, not this extra object. Later ξ is `proposeRelease`
|
|
136
137
|
then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`.
|
package/docs/develop.md
CHANGED
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
6
|
+
|
|
7
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
8
|
+
is just documentation.
|
|
9
|
+
|
|
10
|
+
AI can build fast—and make a mess just as fast.
|
|
11
|
+
|
|
12
|
+
Keep the product easy to understand, change, and trust.
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
15
|
+
|
|
16
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
17
|
+
|
|
18
|
+
For **developers** integrating ArkGate into a product repo: agents, CI, config, brownfield, and power tools.
|
|
12
19
|
|
|
13
20
|
If you only want the happy path, start at [use.md](use.md). Optional ArkOrder
|
|
14
21
|
(library + sensors, not a service): [arkorder.md](arkorder.md).
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# ArkGate — enthusiast track
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
6
|
+
|
|
7
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
8
|
+
is just documentation.
|
|
9
|
+
|
|
10
|
+
AI can build fast—and make a mess just as fast.
|
|
11
|
+
|
|
12
|
+
Keep the product easy to understand, change, and trust.
|
|
13
|
+
|
|
14
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
15
|
+
|
|
16
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
6
17
|
|
|
7
18
|
Plain-language onboarding for builders who use AI agents but are not professional
|
|
8
19
|
developers. This track follows [Diátaxis](https://diataxis.fr/): tutorial, how-to,
|
package/docs/package-surface.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
5
|
+
|
|
6
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
|
+
is just documentation.
|
|
8
|
+
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
5
17
|
That is the product wedge (host hook + required CI). Skills name the next step after that.
|
|
6
18
|
**Not the wedge:** the optional in-process **ArkRun** runtime (`arkgate/runtime`) and the
|
|
7
19
|
optional **ArkOrder** pattern extra (`arkgate/order`).
|
|
@@ -25,7 +37,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
25
37
|
|
|
26
38
|
| Surface | How you use it | Stability notes |
|
|
27
39
|
|---------|----------------|-----------------|
|
|
28
|
-
| **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`) | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). |
|
|
40
|
+
| **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`); optional ArkRun **`ark-dashboard`** / **`arkgate-dashboard`** | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). **Dashboard bins** poll an ArkRun inspector snapshot (ANSI + interval polling; `--url` / `--interval`); they are not a gate verdict. The main CLI also accepts `ark dashboard` / `arkgate dashboard` as a passthrough to those bins. |
|
|
29
41
|
| **Host write boundaries** | Generated trusted PreToolUse/preToolUse hooks + `ark-mcp --hook`; inspect with doctor/status | Hard is always operation-scoped and runtime-evidenced. From 4.6.3, Codex CLI and local ChatGPT Desktop/App Server can hard-block a complete `apply_patch` sent as `tool_input.command`; `.codex/hooks.json` on disk remains unverified until a fresh covered invocation. Hosted tools, specialized hook opt-outs, shell/direct writes, incomplete reconstruction, and humans rely on required CI. Repair envelopes may emit, but Codex reinjection is not guaranteed. |
|
|
30
42
|
| **Programmatic gate API** | `import { analyzeProject, loadContract, createAICodeGate, ... } from 'arkgate'` | The root export is the static gate/config/analysis contract listed below. It intentionally contains no runtime-kernel implementation. |
|
|
31
43
|
| **Improvement compass (4.4; status honesty 4.5)** | `ark-check --doctor --json` → `doctor.improvementCompass`; human doctor section **Improvement compass (not a score)**; HTML report `data-advisory="improvementCompass"`. **`ark status --json` / MCP `ark_status`** project a thin `improvementCompass` residual map with explicit honesty **`mode`**: `full` \| `subset` \| `unavailable` (always `notAScore: true`). When `mode` is `full`, status residual lens **ids** are a **subset of** doctor residual for the same facts (report snapshot stores the thin slice after `--report`). Incomplete or missing session facts → `subset` / `unavailable` + `reasonCode` / `reason` — **never invent green residual**. Residual never flips `valid` / strict-merge / `goal.met`. When status mode ≠ full, run doctor for full 15-lens detail. | Additive schema `1.0`. Closed **15** lens ids (`soc`, `cohesion`, `coupling`, `srp`, `dip`, `ocp`, `encapsulation`, `modularity`, `scalability`, `resilience`, `security`, `maintainability`, `testability`, `domain`, `stack`) with status `ok` \| `residual` \| `not-instrumented` \| `out-of-scope`, evidence refs, optional `nextAction`, capped `topResidual`, always **`notAScore: true`**. Projection from existing smells / walls / cohesion / ArkRules / design-weak only — **never** a gate input. Out-of-scope locked for scalability, resilience, and app security (no residual invent from missing SAST/APM). Root API: `buildImprovementCompass` / `IMPROVEMENT_LENS_IDS`; status: `projectStatusImprovementCompass` / `STATUS_COMPASS_MODES`. |
|
|
@@ -177,7 +189,7 @@ claims. Static architecture enforcement does not depend on them.
|
|
|
177
189
|
|
|
178
190
|
| Surface | Import path | Notes |
|
|
179
191
|
|---------|-------------|--------|
|
|
180
|
-
| **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE,
|
|
192
|
+
| **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE, `/graph` slices of the information package, plus queue monitors **`GET /outbox`** and **`GET /workflows`** (full counts + sanitized samples capped at 32; no full event payloads; missing ports are unavailable; no public / authless bind). Snapshot `hardening.durability` classifies the explicit outbox/audit/workflow store ports; default `InMemory*` stores stay visibly `memory`, never durable. Dual bins **`ark-dashboard`** / **`arkgate-dashboard`** poll those JSON facts (ANSI TUI in `bin/` only — presentation is not in the kernel); `ark dashboard` / `arkgate dashboard` dispatch to the same executable. **Shadow / replay / compare** (`shadowInformationPackage`, `compareInformationPackages`, `replayInformationPackages`) are in-memory helpers on that snapshot — not durable, not a second bus (ADR 0033). **Decision tape** `decisionTape` `{ xiHash, event, residual }` via `appendDecisionTape` (ADR 0034). Built-in stores are **InMemory reference only**. Branding ArkRun is not a production-durability claim. **`@arkgate/runtime` is deprecated** leftover 0.x (`experimental` dist-tag). |
|
|
181
193
|
| **NestJS adapter** | **`arkgate/nestjs`** | Experimental optional peer `@nestjs/common` for the ArkRun kernel. Same npm package. `@arkgate/runtime/nestjs` is deprecated. |
|
|
182
194
|
| **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Canonical: [ArkOrder](arkorder.md). |
|
|
183
195
|
|
|
@@ -253,8 +265,9 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
253
265
|
## Release notes (maintainers)
|
|
254
266
|
|
|
255
267
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
256
|
-
(current tree
|
|
257
|
-
current published: [4.8.
|
|
268
|
+
(current tree candidate: [4.8.8.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.8.md), prepared and not published;
|
|
269
|
+
current published: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
|
|
270
|
+
prior published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
|
|
258
271
|
prior published: [4.8.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.5.md);
|
|
259
272
|
prior published: [4.8.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.4.md);
|
|
260
273
|
prior published: [4.8.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.3.md);
|
package/docs/product-voice.md
CHANGED
|
@@ -45,12 +45,15 @@ human copy says **status**.
|
|
|
45
45
|
|
|
46
46
|
## Locked first-contact
|
|
47
47
|
|
|
48
|
-
On
|
|
48
|
+
On the eight canonical public openings — `README.md`, `docs/use.md`,
|
|
49
|
+
`docs/develop.md`, `docs/README.md`, `docs/enthusiast/README.md`,
|
|
50
|
+
`docs/agent-guide.md`, `docs/ai-gates.md`, and `docs/package-surface.md` — use:
|
|
49
51
|
|
|
50
52
|
1. **Verbs:** `Write. Check. Ship.`
|
|
51
53
|
2. **Deny:** `When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.`
|
|
52
54
|
3. **Not-that (below the fold, one line):** `Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config is just documentation.`
|
|
53
|
-
4. **
|
|
55
|
+
4. **Story:** the exact four-paragraph introduction below, with no visible heading or labels.
|
|
56
|
+
5. **Technical nouns (below the introduction):** ArkGate is import rules. ArkRules is optional policies. ArkRun is an optional experimental runtime. ArkOrder is the extra that stops the agent from rewriting the few slow product decisions (plan, protocol) as CRUD — named when the consumer opts in, never as the first noun.
|
|
54
57
|
|
|
55
58
|
Do not lead with folders, `ark.config.json`, “contract”, “gate”, “house”, or “doctor”
|
|
56
59
|
as the first noun. Historical: `If the AI writes an illegal import, the write is rejected`
|
|
@@ -61,6 +64,26 @@ ADR 0001 keeps the public name **ArkGate**.
|
|
|
61
64
|
|
|
62
65
|
---
|
|
63
66
|
|
|
67
|
+
## Unlabeled four-paragraph introduction
|
|
68
|
+
|
|
69
|
+
STAR is an internal writing method only. Public openings never print the formula's
|
|
70
|
+
name, a heading for this block, bullets, or Situation/Task/Action/Result labels.
|
|
71
|
+
Use these exact four paragraphs and put technical precision below them.
|
|
72
|
+
|
|
73
|
+
AI can build fast—and make a mess just as fast.
|
|
74
|
+
|
|
75
|
+
Keep the product easy to understand, change, and trust.
|
|
76
|
+
|
|
77
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
78
|
+
|
|
79
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
80
|
+
|
|
81
|
+
Do not add technical terms to these four paragraphs. In the next section, explain that
|
|
82
|
+
ArkGate checks imports, ArkRules is optional, ArkRun is experimental and in-memory,
|
|
83
|
+
and ArkOrder is optional and for a few slow product decisions.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
64
87
|
## How it sounds
|
|
65
88
|
|
|
66
89
|
Short. Product nouns. Scene English (Vercel / Supabase / GitHub Checks).
|
package/docs/use.md
CHANGED
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
|
|
5
|
-
For **anyone** shipping TypeScript with an AI coding agent.
|
|
6
|
-
|
|
7
5
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
8
6
|
|
|
9
7
|
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
10
8
|
is just documentation.
|
|
11
9
|
|
|
10
|
+
AI can build fast—and make a mess just as fast.
|
|
11
|
+
|
|
12
|
+
Keep the product easy to understand, change, and trust.
|
|
13
|
+
|
|
14
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
15
|
+
|
|
16
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
17
|
+
|
|
18
|
+
For **anyone** shipping TypeScript with an AI coding agent.
|
|
19
|
+
|
|
12
20
|
---
|
|
13
21
|
|
|
14
22
|
## In one minute
|
|
@@ -81,7 +89,7 @@ The config only binds when the write doesn’t land and CI is required.
|
|
|
81
89
|
| **ArkGate** (layers) | Import rules. The write doesn’t land. The PR fails. | Always — this is the product |
|
|
82
90
|
| **ArkRules** | Optional policies *inside* a layer. | Off until you turn it on (start may ship advisory templates) |
|
|
83
91
|
| **ArkRun** | Optional experimental runtime (`arkgate/runtime`) | Off. In-memory. Not Postgres. |
|
|
84
|
-
| **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`).
|
|
92
|
+
| **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`). Derive recomputable statuses; invoices and seats still flow. In-memory. Not durable. |
|
|
85
93
|
|
|
86
94
|
Start always gives you **layers**. Compact starters do **not** turn on ArkRun or
|
|
87
95
|
ArkOrder. No extras is fine — only ArkGate runs. Leftovers are labeled
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.8",
|
|
4
4
|
"description": "When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -55,9 +55,11 @@
|
|
|
55
55
|
"bin": {
|
|
56
56
|
"arkgate": "bin/ark.mjs",
|
|
57
57
|
"arkgate-check": "bin/ark-check.mjs",
|
|
58
|
+
"arkgate-dashboard": "bin/ark-dashboard.mjs",
|
|
58
59
|
"arkgate-mcp": "bin/ark-mcp.mjs",
|
|
59
60
|
"ark": "bin/ark.mjs",
|
|
60
61
|
"ark-check": "bin/ark-check.mjs",
|
|
62
|
+
"ark-dashboard": "bin/ark-dashboard.mjs",
|
|
61
63
|
"ark-mcp": "bin/ark-mcp.mjs"
|
|
62
64
|
},
|
|
63
65
|
"mcpName": "io.github.pedroknigge/arkgate",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/pedroknigge/arkgate",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "4.8.
|
|
9
|
+
"version": "4.8.8",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.8.
|
|
14
|
+
"version": "4.8.8",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
@@ -187,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
- `xiKeys` are meaning, not membership. `projectId` / `orgId` do not belong. If `proposeRelease` throws empty blast, that key does not order anything. After the first `release()`, change ξ with `proposeRelease` then `apply` — not a second `release()` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
|
|
190
|
+
- Before writing a name, drop the candidate and ask: can current σ and s reconstruct it uniquely? Then ask direction: does the key slave ingest, or does ingest determine the status? If it is recomputable or ingest determines it (`paid`, `overdue`, `atCapacity`, or `approved` folded from signatures), derive it as a projection or ingest fold; invoices and seats stay on ingest. The check remains silent on semantic entailment.
|
|
190
191
|
- A use-case that `prisma.*.update({ plan })` while `plan` is in `xiKeys` is **[ArkOrder]** `ARKORDER_XI_FIELD_WRITE`. Invoices and seats still flow through `ingest`.
|
|
191
192
|
|
|
192
193
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|
|
@@ -147,7 +147,7 @@ When `arkRun` is present:
|
|
|
147
147
|
|
|
148
148
|
### Autopilot + ArkOrder
|
|
149
149
|
When `arkOrder` is present:
|
|
150
|
-
- Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Doctor / status `arkOrder` is `notAScore`.
|
|
150
|
+
- Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Do not “fix” a derived status by adding it to `xiKeys`; that institutionalizes the skip, so derive it on read or fold it from ingest. Doctor / status `arkOrder` is `notAScore`.
|
|
151
151
|
- Extra off → `/ark-adopt` (advisory). Do not invent `/ark-order`.
|
|
152
152
|
- Skills never enforce.
|
|
153
153
|
|
|
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
|
|
|
45
45
|
|
|
46
46
|
Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
|
|
47
47
|
|
|
48
|
-
When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids are not keys. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys.
|
|
48
|
+
When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
|
|
49
49
|
|
|
50
50
|
## Subagent fan-out (optional, host-dependent)
|
|
51
51
|
|
|
@@ -157,6 +157,7 @@ When `arkOrder` is present on the architecture config:
|
|
|
157
157
|
- First freeze ξ with `release()`; later ξ change is `proposeRelease` then `apply` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma` for saldo. Field `ingest()` returns `absorb | escalate_up | hold` bound to `xiHash` + `reasonCode`; never a Release. Capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. No `update`/`patch`/`set`.
|
|
158
158
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
159
159
|
- Named slow keys live in `arkOrder.xiKeys`. A managed-layer Prisma/pg write of those keys is `ARKORDER_XI_FIELD_WRITE` — absorb with `ingest` or change the pattern with `proposeRelease` then `apply`.
|
|
160
|
+
- A recomputable status is not a new `xiKeys` entry or a `proposeRelease`: place it as a read projection or an ingest fold. If slow-key naming remains unresolved, return to `/ark-adopt` and run the elimination test before writing the config.
|
|
160
161
|
- Skip clusters (`ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE`): place this artifact, then grind via `/ark-autopilot`. Extra not on → `/ark-adopt`. Do not invent `/ark-order`.
|
|
161
162
|
- Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
|
|
162
163
|
|
|
@@ -187,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
- `xiKeys` are meaning, not membership. `projectId` / `orgId` do not belong. If `proposeRelease` throws empty blast, that key does not order anything. After the first `release()`, change ξ with `proposeRelease` then `apply` — not a second `release()` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
|
|
190
|
+
- Before writing a name, drop the candidate and ask: can current σ and s reconstruct it uniquely? Then ask direction: does the key slave ingest, or does ingest determine the status? If it is recomputable or ingest determines it (`paid`, `overdue`, `atCapacity`, or `approved` folded from signatures), derive it as a projection or ingest fold; invoices and seats stay on ingest. The check remains silent on semantic entailment.
|
|
190
191
|
- A use-case that `prisma.*.update({ plan })` while `plan` is in `xiKeys` is **[ArkOrder]** `ARKORDER_XI_FIELD_WRITE`. Invoices and seats still flow through `ingest`.
|
|
191
192
|
|
|
192
193
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|