stitchkit 0.76.1 → 0.77.0
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/agent-runtime-coding-tools.js +1 -2
- package/dist/agent-runtime-harness.js +4 -5
- package/dist/agent-runtime.js +7 -8
- package/dist/application/decisions.d.ts +86 -0
- package/dist/application/decisions.d.ts.map +1 -0
- package/dist/application/kernel.d.ts +33 -1
- package/dist/application/kernel.d.ts.map +1 -1
- package/dist/application/watch-hub.d.ts +1 -1
- package/dist/application/watch-hub.d.ts.map +1 -1
- package/dist/application-schemas.d.ts +15 -0
- package/dist/application-schemas.d.ts.map +1 -0
- package/dist/application-schemas.js +111 -0
- package/dist/application.d.ts +3 -2
- package/dist/application.d.ts.map +1 -1
- package/dist/application.js +184 -114
- package/dist/cli.js +6 -7
- package/dist/contract/index.js +1 -2
- package/dist/{index-v5dm4bwq.js → index-58jzmnn4.js} +1 -1
- package/dist/{index-885chjxq.js → index-7qy2ex0m.js} +1 -1
- package/dist/index-a916km3r.js +45 -0
- package/dist/{index-28jsdwt1.js → index-aczggrty.js} +1 -1
- package/dist/{index-65kathdm.js → index-da1aqnhb.js} +4 -6
- package/dist/{index-xgahrwdf.js → index-ezmn6ac6.js} +3 -3
- package/dist/{index-4kp4fxvp.js → index-f6n5n7nz.js} +18 -4
- package/dist/{index-6wr9f6qm.js → index-jqtsc9mj.js} +2 -2
- package/dist/{index-9c5dbr5q.js → index-k2zczx1g.js} +1 -1
- package/dist/{index-v7xjfy10.js → index-m668wzyc.js} +1 -1
- package/dist/{index-e0a57ymn.js → index-nemjkxjp.js} +1 -1
- package/dist/{index-9my2n66s.js → index-s2rchahr.js} +4 -4
- package/dist/{index-k68e5jz0.js → index-s4c8wy8m.js} +2 -2
- package/dist/{index-52400rdd.js → index-t8qyvrvg.js} +3 -3
- package/dist/{index-endzd8sj.js → index-vbf2p6me.js} +1 -1
- package/dist/{index-hvftzz91.js → index-vc1b0b1b.js} +221 -117
- package/dist/{index-hsz2mmk0.js → index-vj3vvpaa.js} +17 -1
- package/dist/index.js +1 -2
- package/dist/internal/decision.d.ts +31 -0
- package/dist/internal/decision.d.ts.map +1 -0
- package/dist/internal/stable-digest.d.ts +40 -6
- package/dist/internal/stable-digest.d.ts.map +1 -1
- package/dist/live/events.d.ts +8 -13
- package/dist/live/events.d.ts.map +1 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live.d.ts +1 -1
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +40 -57
- package/dist/node.js +4 -5
- package/dist/observability/index.js +3 -4
- package/dist/primitives.js +1 -2
- package/dist/remote.js +2 -3
- package/dist/server/event-bus.d.ts +3 -2
- package/dist/server/event-bus.d.ts.map +1 -1
- package/dist/server/index.js +5 -6
- package/dist/testing.js +3 -4
- package/dist/tool-invoker.js +5 -6
- package/dist/tools.js +13 -14
- package/llms-full.txt +184 -4
- package/package.json +6 -2
- package/dist/index-rxfy4cq7.js +0 -17
- package/dist/index-vdvmcy7r.js +0 -22
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
composeAgentPrompt,
|
|
4
4
|
createAgentRuntime,
|
|
5
5
|
createAgentRuntimeEventSink
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-m668wzyc.js";
|
|
7
7
|
import {
|
|
8
8
|
walkContainedFiles
|
|
9
9
|
} from "./index-rqpdar1e.js";
|
|
@@ -16,8 +16,8 @@ import"./index-3xnq72rz.js";
|
|
|
16
16
|
import {
|
|
17
17
|
defineRuntimeTool
|
|
18
18
|
} from "./index-wwst0td5.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-s4c8wy8m.js";
|
|
20
|
+
import"./index-nemjkxjp.js";
|
|
21
21
|
import {
|
|
22
22
|
AgentMessagePartSchema,
|
|
23
23
|
AgentSnapshotSchema
|
|
@@ -25,8 +25,7 @@ import {
|
|
|
25
25
|
import"./index-22by16v6.js";
|
|
26
26
|
import"./index-cby4ar3v.js";
|
|
27
27
|
import"./index-nt1mp8km.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-rxfy4cq7.js";
|
|
28
|
+
import"./index-vj3vvpaa.js";
|
|
30
29
|
import"./index-0w9abg87.js";
|
|
31
30
|
import"./index-qyrqwr4c.js";
|
|
32
31
|
import"./index-6k1937bx.js";
|
package/dist/agent-runtime.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
registerDeferredToolRepair,
|
|
28
28
|
repairedSearchCall,
|
|
29
29
|
selectAgentHistory
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-m668wzyc.js";
|
|
31
31
|
import {
|
|
32
32
|
AgentModelCapabilitySchema,
|
|
33
33
|
AgentModelCatalogEntrySchema,
|
|
@@ -86,15 +86,15 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
buildToolManifest,
|
|
88
88
|
mountAgent
|
|
89
|
-
} from "./index-
|
|
89
|
+
} from "./index-ezmn6ac6.js";
|
|
90
90
|
import"./index-3xnq72rz.js";
|
|
91
|
-
import"./index-
|
|
91
|
+
import"./index-k2zczx1g.js";
|
|
92
92
|
import {
|
|
93
93
|
defineRuntimeTool
|
|
94
94
|
} from "./index-wwst0td5.js";
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
97
|
-
import"./index-
|
|
95
|
+
import"./index-7qy2ex0m.js";
|
|
96
|
+
import"./index-s4c8wy8m.js";
|
|
97
|
+
import"./index-nemjkxjp.js";
|
|
98
98
|
import {
|
|
99
99
|
AgentAssistantPlaceholderSchema,
|
|
100
100
|
AgentControlPartSchema,
|
|
@@ -134,8 +134,7 @@ import {
|
|
|
134
134
|
childSpan,
|
|
135
135
|
createTraceContext
|
|
136
136
|
} from "./index-nt1mp8km.js";
|
|
137
|
-
import"./index-
|
|
138
|
-
import"./index-rxfy4cq7.js";
|
|
137
|
+
import"./index-vj3vvpaa.js";
|
|
139
138
|
import"./index-0w9abg87.js";
|
|
140
139
|
import {
|
|
141
140
|
executableAgentRuntimeTools,
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An ordered chain of named policies that reaches one verdict, and says how.
|
|
3
|
+
*
|
|
4
|
+
* The shape an application writes as a run of `if`s, or as middleware where the
|
|
5
|
+
* decision is whether somebody called `next()`. Both fail the same way: what
|
|
6
|
+
* actually decided is not recoverable afterwards. A forgotten `next()` reads as
|
|
7
|
+
* a deliberate stop, an `if` that fell through reads as approval, and the log
|
|
8
|
+
* says "denied" with no way to learn which rule said so.
|
|
9
|
+
*
|
|
10
|
+
* ## What this is not
|
|
11
|
+
*
|
|
12
|
+
* It is **not** `createEventBus(...).decide`, and the difference is worth
|
|
13
|
+
* knowing because the vocabulary is deliberately the same one. That is a set of
|
|
14
|
+
* anonymous listeners voting on an announcement: registration order, no names,
|
|
15
|
+
* and "nobody claimed it" is a legitimate ending the topic declares in advance.
|
|
16
|
+
* This is an ordered list of *identified* policies deciding one operation, where
|
|
17
|
+
* every step is in the trace by name and nobody claiming it is a **defect** —
|
|
18
|
+
* an operation nothing approved and nothing refused has not been decided, and
|
|
19
|
+
* answering `allow` or `deny` there would be inventing the answer.
|
|
20
|
+
*
|
|
21
|
+
* → ADR 0154.
|
|
22
|
+
*/
|
|
23
|
+
import { type PolicyDecision } from '../internal/decision.js';
|
|
24
|
+
export type { PolicyDecision } from '../internal/decision.js';
|
|
25
|
+
export { PolicyDecisionSchema } from '../internal/decision.js';
|
|
26
|
+
export interface DecisionPolicy<TInput> {
|
|
27
|
+
/** Names this policy in the trace. Unique within a pipeline. */
|
|
28
|
+
readonly id: string;
|
|
29
|
+
decide(input: TInput): PolicyDecision | Promise<PolicyDecision>;
|
|
30
|
+
}
|
|
31
|
+
export interface DecisionTraceEntry {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly outcome: PolicyDecision['outcome'];
|
|
34
|
+
/** Present exactly when the outcome is `deny`. */
|
|
35
|
+
readonly reason?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DecisionResult {
|
|
38
|
+
/**
|
|
39
|
+
* Terminal by construction. `defer` cannot appear here: a pipeline that
|
|
40
|
+
* reached its end with nobody claiming the question raises rather than
|
|
41
|
+
* choosing one for it.
|
|
42
|
+
*/
|
|
43
|
+
readonly outcome: 'allow' | 'deny';
|
|
44
|
+
/** Present exactly when the outcome is `deny` — the deciding policy's own words. */
|
|
45
|
+
readonly reason?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Exactly the policies that ran, in the order they ran.
|
|
48
|
+
*
|
|
49
|
+
* Not the configured list: a terminal verdict stops the chain, and a trace
|
|
50
|
+
* that listed the policies which never executed would be a record of intent
|
|
51
|
+
* rather than of what happened.
|
|
52
|
+
*/
|
|
53
|
+
readonly trace: readonly DecisionTraceEntry[];
|
|
54
|
+
}
|
|
55
|
+
export interface DecisionPipeline<TInput> {
|
|
56
|
+
decide(input: TInput): Promise<DecisionResult>;
|
|
57
|
+
/** The configured policy ids, in order. For a status surface, not for deciding. */
|
|
58
|
+
readonly policyIds: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Nobody claimed the question.
|
|
62
|
+
*
|
|
63
|
+
* A defect in the policy set rather than a runtime condition, which is why it
|
|
64
|
+
* raises instead of returning: an operation that no policy allowed and no policy
|
|
65
|
+
* refused has not been decided, and the caller has no honest way to proceed. The
|
|
66
|
+
* trace comes with it, because "nothing decided" is only actionable once you can
|
|
67
|
+
* see what ran.
|
|
68
|
+
*/
|
|
69
|
+
export declare class DecisionUndecidedError extends Error {
|
|
70
|
+
readonly trace: readonly DecisionTraceEntry[];
|
|
71
|
+
constructor(trace: readonly DecisionTraceEntry[]);
|
|
72
|
+
}
|
|
73
|
+
/** A policy answered with something that is not a decision. */
|
|
74
|
+
export declare class DecisionPolicyError extends Error {
|
|
75
|
+
readonly policyId: string;
|
|
76
|
+
constructor(policyId: string, detail: string);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Build a pipeline from an ordered list of policies.
|
|
80
|
+
*
|
|
81
|
+
* Duplicate ids are refused here rather than at the first decision: two policies
|
|
82
|
+
* under one name make the trace ambiguous exactly when it is being read to
|
|
83
|
+
* explain a refusal, which is the worst moment to discover it.
|
|
84
|
+
*/
|
|
85
|
+
export declare function createDecisionPipeline<TInput>(policies: readonly DecisionPolicy<TInput>[]): DecisionPipeline<TInput>;
|
|
86
|
+
//# sourceMappingURL=decisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../../src/application/decisions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAEjF,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,cAAc,CAAC,MAAM;IACpC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5C,kDAAkD;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IACnC,oFAAoF;IACpF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAgB,CAAC,MAAM;IACtC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/C,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC9C,YAAY,KAAK,EAAE,SAAS,kBAAkB,EAAE,EAO/C;CACF;AAED,+DAA+D;AAC/D,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAM3C;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAC3C,QAAQ,EAAE,SAAS,cAAc,CAAC,MAAM,CAAC,EAAE,GAC1C,gBAAgB,CAAC,MAAM,CAAC,CA8C1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { AppError } from '../contract/errors.js';
|
|
3
3
|
import type { ManagedResource } from './resource.js';
|
|
4
4
|
import { type ApplicationResourceShutdown, type ApplicationShutdownResult, type ApplicationSnapshot } from './schemas.js';
|
|
@@ -84,6 +84,28 @@ export interface ApplicationAdmission {
|
|
|
84
84
|
acquire(): ApplicationOperationLease | null;
|
|
85
85
|
run<T>(work: () => T | Promise<T>): Promise<T>;
|
|
86
86
|
}
|
|
87
|
+
export declare const ApplicationRestartInputSchema: z.ZodReadonly<z.ZodObject<{
|
|
88
|
+
resourceId: z.ZodString;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
export type ApplicationRestartInput = z.infer<typeof ApplicationRestartInputSchema>;
|
|
91
|
+
export declare const ApplicationRestartOutcomeSchema: z.ZodEnum<{
|
|
92
|
+
failed: "failed";
|
|
93
|
+
refused: "refused";
|
|
94
|
+
restarted: "restarted";
|
|
95
|
+
}>;
|
|
96
|
+
export type ApplicationRestartOutcome = z.infer<typeof ApplicationRestartOutcomeSchema>;
|
|
97
|
+
export declare const ApplicationRestartResultSchema: z.ZodReadonly<z.ZodObject<{
|
|
98
|
+
resourceId: z.ZodString;
|
|
99
|
+
affected: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
100
|
+
outcome: z.ZodEnum<{
|
|
101
|
+
failed: "failed";
|
|
102
|
+
refused: "refused";
|
|
103
|
+
restarted: "restarted";
|
|
104
|
+
}>;
|
|
105
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
106
|
+
durationMs: z.ZodNumber;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
export type ApplicationRestartResult = z.infer<typeof ApplicationRestartResultSchema>;
|
|
87
109
|
export interface ApplicationHandle {
|
|
88
110
|
readonly id: string;
|
|
89
111
|
readonly admission: ApplicationAdmission;
|
|
@@ -91,6 +113,16 @@ export interface ApplicationHandle {
|
|
|
91
113
|
getSnapshot(): ApplicationSnapshot;
|
|
92
114
|
subscribe(listener: (snapshot: ApplicationSnapshot) => void): () => void;
|
|
93
115
|
shutdown(options?: ApplicationShutdownOptions): Promise<ApplicationShutdownResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Replace one resource and everything that depends on it, leaving the rest of
|
|
118
|
+
* the graph running and the process epoch unchanged.
|
|
119
|
+
*
|
|
120
|
+
* Serialised against itself and refused during shutdown: two restarts of
|
|
121
|
+
* overlapping subtrees, or a restart racing the way down, are the two ways to
|
|
122
|
+
* end up with two live generations of one resource — which is the failure this
|
|
123
|
+
* exists to make impossible, not merely unlikely.
|
|
124
|
+
*/
|
|
125
|
+
restart(input: ApplicationRestartInput): Promise<ApplicationRestartResult>;
|
|
94
126
|
}
|
|
95
127
|
/**
|
|
96
128
|
* An `AppError`, not an `Error` with a `code` field on it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../src/application/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../src/application/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,YAAY,CAAC;AACpB,OAAO,EAIL,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAE9B,KAAK,mBAAmB,EAGzB,MAAM,WAAW,CAAC;AAEnB,6EAA6E;AAC7E,MAAM,MAAM,wBAAwB,GAAG,2BAA2B,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AA8DvF,wEAAwE;AACxE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;IACzC,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;iBAI3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAC9C,QAAQ,CAAC,UAAU,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IACzE,QAAQ,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACnF;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC5E;AAED;;;;;;;;;GASG;AACH,qBAAa,yBAA0B,SAAQ,QAAQ,CAAC,2BAA2B,CAAC;IAClF,cAGC;CACF;AA2BD,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAq+B9E"}
|
|
@@ -129,6 +129,6 @@ export interface WatchHub {
|
|
|
129
129
|
* Exported because the client has to produce exactly this, and two
|
|
130
130
|
* implementations of one key is the failure the digest exists to prevent.
|
|
131
131
|
*/
|
|
132
|
-
export declare function watchKey(operation: WatchOperation, args: unknown):
|
|
132
|
+
export declare function watchKey(operation: WatchOperation, args: unknown): WatchKey;
|
|
133
133
|
export declare function createWatchHub(config: WatchHubConfig): WatchHub;
|
|
134
134
|
//# sourceMappingURL=watch-hub.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch-hub.d.ts","sourceRoot":"","sources":["../../src/application/watch-hub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,mFAAmF;AACnF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,KAAK,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SAAS,EAAE,cAAc,GAAG,OAAO,CAAC;IAC9C;;;;;;;;;OASG;IACH,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;IAC3E,mFAAmF;IACnF,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC3D,kEAAkE;IAClE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,yFAAyF;IACzF,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjD,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,UAAU,EAAE,eAAe,GAAG,eAAe,CAAC;IACrD;;;;;;OAMG;IACH,SAAS,IAAI,MAAM,CAAC;IACpB,qEAAqE;IACrE,IAAI,IAAI,MAAM,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;CACf;AAqBD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,CAU3E;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ,CA4M/D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The application's schemas, and nothing else.
|
|
3
|
+
*
|
|
4
|
+
* A separate entry because `stitchkit/application` is the server runtime: it
|
|
5
|
+
* reaches `node:child_process`, `node:fs` and `node:crypto`, and a bundler
|
|
6
|
+
* that stubs those does not fail at the call — it fails while initialising the
|
|
7
|
+
* module, taking the whole page with it. So a contract whose `output` is an
|
|
8
|
+
* application snapshot could be declared but never consumed from a browser,
|
|
9
|
+
* which is the one thing a contract is for.
|
|
10
|
+
*
|
|
11
|
+
* The list lives here rather than in `application.ts`, which re-exports this
|
|
12
|
+
* file: two copies of it would be two public surfaces free to drift apart.
|
|
13
|
+
*/
|
|
14
|
+
export { type ApplicationAdmissionSnapshot, ApplicationAdmissionSnapshotSchema, type ApplicationHealth, ApplicationHealthSchema, type ApplicationId, ApplicationIdSchema, type ApplicationLifecycle, ApplicationLifecycleSchema, type ApplicationResourceShutdown, ApplicationResourceShutdownSchema, type ApplicationShutdownResult, ApplicationShutdownResultSchema, type ApplicationSnapshot, ApplicationSnapshotSchema, type ApplicationStatusProjection, ApplicationStatusProjectionSchema, type ManagedResourceSnapshot, ManagedResourceSnapshotSchema, type ManagedResourceState, ManagedResourceStateSchema, projectApplicationStatus, } from './application/schemas.js';
|
|
15
|
+
//# sourceMappingURL=application-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-schemas.d.ts","sourceRoot":"","sources":["../src/application-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,KAAK,4BAA4B,EACjC,kCAAkC,EAClC,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,2BAA2B,EAChC,iCAAiC,EACjC,KAAK,yBAAyB,EAC9B,+BAA+B,EAC/B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,2BAA2B,EAChC,iCAAiC,EACjC,KAAK,uBAAuB,EAC5B,6BAA6B,EAC7B,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// src/application/schemas.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ApplicationIdSchema = z.string().min(1).max(128).regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]*$/);
|
|
4
|
+
var ApplicationLifecycleSchema = z.enum([
|
|
5
|
+
"created",
|
|
6
|
+
"starting",
|
|
7
|
+
"ready",
|
|
8
|
+
"draining",
|
|
9
|
+
"stopping",
|
|
10
|
+
"stopped",
|
|
11
|
+
"failed"
|
|
12
|
+
]);
|
|
13
|
+
var ApplicationHealthSchema = z.enum(["unknown", "healthy", "degraded", "unhealthy"]);
|
|
14
|
+
var ManagedResourceStateSchema = z.enum([
|
|
15
|
+
"registered",
|
|
16
|
+
"starting",
|
|
17
|
+
"ready",
|
|
18
|
+
"failed",
|
|
19
|
+
"stopping",
|
|
20
|
+
"stopped"
|
|
21
|
+
]);
|
|
22
|
+
var NonNegativeIntegerSchema = z.number().int().nonnegative();
|
|
23
|
+
var ApplicationAdmissionSnapshotSchema = z.object({
|
|
24
|
+
accepting: z.boolean(),
|
|
25
|
+
accepted: NonNegativeIntegerSchema,
|
|
26
|
+
completed: NonNegativeIntegerSchema,
|
|
27
|
+
pending: NonNegativeIntegerSchema
|
|
28
|
+
}).readonly();
|
|
29
|
+
var ManagedResourceSnapshotSchema = z.object({
|
|
30
|
+
id: ApplicationIdSchema,
|
|
31
|
+
required: z.boolean(),
|
|
32
|
+
dependsOn: z.array(ApplicationIdSchema).readonly(),
|
|
33
|
+
state: ManagedResourceStateSchema,
|
|
34
|
+
health: ApplicationHealthSchema,
|
|
35
|
+
ready: z.boolean()
|
|
36
|
+
}).readonly();
|
|
37
|
+
var ApplicationSnapshotSchema = z.object({
|
|
38
|
+
id: ApplicationIdSchema,
|
|
39
|
+
epoch: z.string().uuid(),
|
|
40
|
+
revision: NonNegativeIntegerSchema,
|
|
41
|
+
lifecycle: ApplicationLifecycleSchema,
|
|
42
|
+
health: ApplicationHealthSchema,
|
|
43
|
+
ready: z.boolean(),
|
|
44
|
+
capturedAt: z.string().datetime({ offset: true }),
|
|
45
|
+
changedAt: z.string().datetime({ offset: true }),
|
|
46
|
+
admission: ApplicationAdmissionSnapshotSchema,
|
|
47
|
+
resources: z.array(ManagedResourceSnapshotSchema).readonly()
|
|
48
|
+
}).readonly();
|
|
49
|
+
var ApplicationStatusProjectionSchema = z.object({
|
|
50
|
+
id: ApplicationIdSchema,
|
|
51
|
+
lifecycle: ApplicationLifecycleSchema,
|
|
52
|
+
health: ApplicationHealthSchema,
|
|
53
|
+
ready: z.boolean(),
|
|
54
|
+
capturedAt: z.string().datetime({ offset: true }),
|
|
55
|
+
resources: z.object({
|
|
56
|
+
total: NonNegativeIntegerSchema,
|
|
57
|
+
ready: NonNegativeIntegerSchema,
|
|
58
|
+
degraded: NonNegativeIntegerSchema,
|
|
59
|
+
failed: NonNegativeIntegerSchema
|
|
60
|
+
}).readonly()
|
|
61
|
+
}).readonly();
|
|
62
|
+
function projectApplicationStatus(snapshot) {
|
|
63
|
+
let ready = 0;
|
|
64
|
+
let degraded = 0;
|
|
65
|
+
let failed = 0;
|
|
66
|
+
for (const resource of snapshot.resources) {
|
|
67
|
+
if (resource.ready)
|
|
68
|
+
ready += 1;
|
|
69
|
+
if (resource.health === "degraded")
|
|
70
|
+
degraded += 1;
|
|
71
|
+
if (resource.state === "failed")
|
|
72
|
+
failed += 1;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
id: snapshot.id,
|
|
76
|
+
lifecycle: snapshot.lifecycle,
|
|
77
|
+
health: snapshot.health,
|
|
78
|
+
ready: snapshot.ready,
|
|
79
|
+
capturedAt: snapshot.capturedAt,
|
|
80
|
+
resources: { total: snapshot.resources.length, ready, degraded, failed }
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var ApplicationResourceShutdownSchema = z.object({
|
|
84
|
+
id: ApplicationIdSchema,
|
|
85
|
+
state: z.enum(["not-started", "closed", "force-failed"]),
|
|
86
|
+
failures: z.array(z.enum(["start", "ready", "completion", "admission", "drain", "close", "force"])).readonly()
|
|
87
|
+
}).readonly();
|
|
88
|
+
var ApplicationShutdownResultSchema = z.object({
|
|
89
|
+
outcome: z.enum(["clean", "forced"]),
|
|
90
|
+
reason: z.enum(["deadline", "signal"]).optional(),
|
|
91
|
+
cleanupComplete: z.boolean(),
|
|
92
|
+
acceptedOperations: NonNegativeIntegerSchema,
|
|
93
|
+
completedOperations: NonNegativeIntegerSchema,
|
|
94
|
+
pendingOperations: NonNegativeIntegerSchema,
|
|
95
|
+
pendingOperationsAtForce: NonNegativeIntegerSchema,
|
|
96
|
+
resources: z.array(ApplicationResourceShutdownSchema).readonly(),
|
|
97
|
+
durationMs: z.number().nonnegative()
|
|
98
|
+
}).readonly();
|
|
99
|
+
export {
|
|
100
|
+
projectApplicationStatus,
|
|
101
|
+
ManagedResourceStateSchema,
|
|
102
|
+
ManagedResourceSnapshotSchema,
|
|
103
|
+
ApplicationStatusProjectionSchema,
|
|
104
|
+
ApplicationSnapshotSchema,
|
|
105
|
+
ApplicationShutdownResultSchema,
|
|
106
|
+
ApplicationResourceShutdownSchema,
|
|
107
|
+
ApplicationLifecycleSchema,
|
|
108
|
+
ApplicationIdSchema,
|
|
109
|
+
ApplicationHealthSchema,
|
|
110
|
+
ApplicationAdmissionSnapshotSchema
|
|
111
|
+
};
|
package/dist/application.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
export { type ActivityId, ActivityIdSchema, type ActivityLiveState, ActivityLiveStateSchema, type ActivityProjection, type ActivityProjectionConfig, type ActivityProjectionSubscriberError, type ActivitySnapshot, ActivitySnapshotSchema, type ActivityStageId, ActivityStageIdSchema, type ActivityStageSnapshot, ActivityStageSnapshotSchema, type ActivityToken, ActivityTokenBrand, type ActivityTransition, createActivityProjection, } from './application/activity.js';
|
|
2
2
|
export { type BoundedAdmission, type BoundedAdmissionClock, type BoundedAdmissionConfig, type BoundedAdmissionDrainOptions, type BoundedAdmissionDrainResult, type BoundedAdmissionForceResult, type BoundedAdmissionLeaseResult, type BoundedAdmissionPerKeyLimitResolver, type BoundedAdmissionPerKeyLimits, BoundedAdmissionPerKeyLimitsSchema, type BoundedAdmissionPolicy, BoundedAdmissionPolicySchema, BoundedAdmissionRefusalError, type BoundedAdmissionRefusalReason, BoundedAdmissionRefusalReasonSchema, type BoundedAdmissionRefusedResult, type BoundedAdmissionResult, type BoundedAdmissionSnapshot, BoundedAdmissionSnapshotSchema, type BoundedAdmissionState, BoundedAdmissionStateSchema, type BoundedOperationLease, type BoundedOperationRunContext, type BoundedOperationRunOptions, BoundedOperationWaitError, type BoundedRateBudget, BoundedRateBudgetSchema, createBoundedAdmission, } from './application/admission.js';
|
|
3
3
|
export { type BoundedChannel, type BoundedChannelCloseOptions, type BoundedChannelConfig, type BoundedChannelOfferResult, type BoundedChannelPolicy, BoundedChannelPolicySchema, BoundedChannelReaderError, type BoundedChannelSnapshot, BoundedChannelSnapshotSchema, type BoundedChannelState, BoundedChannelStateSchema, type CreditAcquireResult, type CreditAcquireWaitOptions, type CreditLease, type CreditWaitRefusalReason, type CreditWaitResult, type CreditWindow, type CreditWindowSnapshot, CreditWindowSnapshotSchema, createBoundedChannel, createCreditWindow, } from './application/channel.js';
|
|
4
|
+
export { createDecisionPipeline, type DecisionPipeline, type DecisionPolicy, DecisionPolicyError, type DecisionResult, type DecisionTraceEntry, DecisionUndecidedError, type PolicyDecision, PolicyDecisionSchema, } from './application/decisions.js';
|
|
4
5
|
export { createDiagnosticJournal } from './application/diagnostic-journal.js';
|
|
5
6
|
export { type DiagnosticJournal, type DiagnosticJournalCloseResult, DiagnosticJournalCloseResultSchema, type DiagnosticJournalConfig, type DiagnosticJournalFailure, type DiagnosticJournalFailurePhase, DiagnosticJournalFailurePhaseSchema, type DiagnosticJournalFrame, DiagnosticJournalFrameSchema, type DiagnosticJournalLimits, DiagnosticJournalLimitsSchema, type DiagnosticJournalLockDiagnosis, type DiagnosticJournalLockPolicy, DiagnosticJournalLockPolicySchema, type DiagnosticJournalRefusalReason, DiagnosticJournalRefusalReasonSchema, type DiagnosticJournalState, DiagnosticJournalStateSchema, type DiagnosticJournalStatus, DiagnosticJournalStatusSchema, type DiagnosticJournalSubmitResult, DiagnosticJournalSubmitResultSchema, type DiagnosticJournalWaitOptions, type DiagnosticJournalWaitResult, DiagnosticJournalWaitResultSchema, readDiagnosticJournalLockDiagnosis, } from './application/diagnostic-journal-contract.js';
|
|
6
7
|
export { type ApplicationEventSink, type ApplicationEventSinkConfig, type ApplicationLifecycleEvent, ApplicationLifecycleEventSchema, applicationLifecycleEvent, createApplicationEventSink, } from './application/events.js';
|
|
7
8
|
export { type ApplicationHealthHandlerOptions, ApplicationHealthHandlerOptionsSchema, type ApplicationOperationalHandlers, type ApplicationOperationalHandlersOptions, ApplicationOperationalHandlersOptionsSchema, createApplicationHealthHandler, createApplicationOperationalHandlers, } from './application/health.js';
|
|
8
|
-
export { type ApplicationAdmission, ApplicationAdmissionError, type ApplicationConfig, type ApplicationHandle, type ApplicationOperationLease, type ApplicationResourceFailure, type ApplicationResourcePhase, type ApplicationShutdownBudget, ApplicationShutdownBudgetSchema, type ApplicationShutdownOptions, ApplicationShutdownOptionsSchema, createApplication, } from './application/kernel.js';
|
|
9
|
+
export { type ApplicationAdmission, ApplicationAdmissionError, type ApplicationConfig, type ApplicationHandle, type ApplicationOperationLease, type ApplicationResourceFailure, type ApplicationResourcePhase, type ApplicationRestartInput, ApplicationRestartInputSchema, type ApplicationRestartOutcome, ApplicationRestartOutcomeSchema, type ApplicationRestartResult, ApplicationRestartResultSchema, type ApplicationShutdownBudget, ApplicationShutdownBudgetSchema, type ApplicationShutdownOptions, ApplicationShutdownOptionsSchema, createApplication, } from './application/kernel.js';
|
|
9
10
|
export { defineKeyspace, type KeyspaceBackend, type KeyspaceChange, type KeyspaceDeclaration, type KeyspaceResourceConfig, keyspaceResource, memoryKeyspaceBackend, type OpenedKeyspace, type OpenKeyspace, openKeyspace, } from './application/keyspace.js';
|
|
10
11
|
export { type SqliteKeyspaceBackendConfig, sqliteKeyspaceBackend, } from './application/keyspace-sqlite.js';
|
|
11
12
|
export { type ApplicationSnapshotSink, type ApplicationSnapshotSinkConfig, type ApplicationSnapshotSinkError, type ApplicationSnapshotSinkStatus, ApplicationSnapshotSinkStatusSchema, createApplicationSnapshotSink, type RevisionedApplicationSnapshot, } from './application/latest-sink.js';
|
|
12
13
|
export { defineManagedResource, type ManagedResource, type ManagedResourceContext, type ManagedResourceDependency, type ManagedResourcePublished, type ManagedResourcePublishesNoValue, type ManagedResourceStartResult, managedResourceDependencyId, } from './application/resource.js';
|
|
13
14
|
export { createManagedSchedule, type ManagedSchedule, type ManagedScheduleClock, type ManagedScheduleConfig, type ManagedScheduleDescriptor, ManagedScheduleDescriptorSchema, type ManagedScheduleErrorPolicy, ManagedScheduleErrorPolicySchema, type ManagedScheduleOverlap, ManagedScheduleOverlapSchema, type ManagedScheduleRunContext, type ManagedScheduleStatus, ManagedScheduleStatusSchema, type ManagedScheduleTimer, } from './application/schedule.js';
|
|
14
|
-
export { type ApplicationAdmissionSnapshot, ApplicationAdmissionSnapshotSchema, type ApplicationHealth, ApplicationHealthSchema, type ApplicationId, ApplicationIdSchema, type ApplicationLifecycle, ApplicationLifecycleSchema, type ApplicationResourceShutdown, ApplicationResourceShutdownSchema, type ApplicationShutdownResult, ApplicationShutdownResultSchema, type ApplicationSnapshot, ApplicationSnapshotSchema, type ApplicationStatusProjection, ApplicationStatusProjectionSchema, type ManagedResourceSnapshot, ManagedResourceSnapshotSchema, type ManagedResourceState, ManagedResourceStateSchema, projectApplicationStatus, } from './application/schemas.js';
|
|
15
15
|
export { type ManagedServerResource, type ManagedServerResourceConfig, managedServerResource, } from './application/server-resource.js';
|
|
16
16
|
export { type AttachedWatcher, createWatchHub, type WatchHub, type WatchHubConfig, type WatchOperation, type WatchSubscriber, watchKey, } from './application/watch-hub.js';
|
|
17
|
+
export * from './application-schemas.js';
|
|
17
18
|
export type { SqliteDatabase, SqliteStatement, SqliteValue } from './internal/sqlite.js';
|
|
18
19
|
//# sourceMappingURL=application.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","s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EAC/B,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,2BAA2B,EAChC,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,+BAA+B,EAC/B,KAAK,0BAA0B,EAC/B,gCAAgC,EAChC,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,iCAAi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