@mastra/factory 0.28.0-alpha.13 → 0.28.0-alpha.14
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 +31 -18
- package/dist/environment/build-runner.d.ts +13 -2
- package/dist/environment/build-runner.d.ts.map +1 -1
- package/dist/environment/build-runner.js +42 -0
- package/dist/environment/build-runner.js.map +1 -1
- package/dist/environment/build-workflow.d.ts +6 -4
- package/dist/environment/build-workflow.d.ts.map +1 -1
- package/dist/environment/build-workflow.js +70 -66
- package/dist/environment/build-workflow.js.map +1 -1
- package/dist/environment/build.d.ts +19 -4
- package/dist/environment/build.d.ts.map +1 -1
- package/dist/environment/build.js +70 -14
- package/dist/environment/build.js.map +1 -1
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +21 -21
- package/dist/factory.js.map +1 -1
- package/dist/integrations/github/sandbox-release.d.ts +12 -0
- package/dist/integrations/github/sandbox-release.d.ts.map +1 -1
- package/dist/integrations/github/sandbox-release.js +16 -1
- package/dist/integrations/github/sandbox-release.js.map +1 -1
- package/dist/routes/board-snapshot.d.ts +5 -0
- package/dist/routes/board-snapshot.d.ts.map +1 -1
- package/dist/routes/board-snapshot.js +12 -1
- package/dist/routes/board-snapshot.js.map +1 -1
- package/dist/routes/contracts.d.ts +66 -0
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/contracts.js +41 -1
- package/dist/routes/contracts.js.map +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +5 -0
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/sandbox-envs.d.ts +2 -0
- package/dist/routes/sandbox-envs.d.ts.map +1 -1
- package/dist/routes/sandbox-envs.js +3 -0
- package/dist/routes/sandbox-envs.js.map +1 -1
- package/dist/routes/source-control-settings.d.ts +2 -0
- package/dist/routes/source-control-settings.d.ts.map +1 -1
- package/dist/routes/source-control-settings.js +5 -0
- package/dist/routes/source-control-settings.js.map +1 -1
- package/dist/routes/surface.d.ts +2 -0
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +2 -1
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/work-item-activity.d.ts +11 -0
- package/dist/routes/work-item-activity.d.ts.map +1 -0
- package/dist/routes/work-item-activity.js +25 -0
- package/dist/routes/work-item-activity.js.map +1 -0
- package/dist/routes/work-item-starters.d.ts +29 -0
- package/dist/routes/work-item-starters.d.ts.map +1 -0
- package/dist/routes/work-item-starters.js +169 -0
- package/dist/routes/work-item-starters.js.map +1 -0
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +59 -1
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/transition-service.d.ts +20 -2
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +40 -18
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/sandbox/context-sandboxes.d.ts +70 -0
- package/dist/sandbox/context-sandboxes.d.ts.map +1 -0
- package/dist/sandbox/context-sandboxes.js +120 -0
- package/dist/sandbox/context-sandboxes.js.map +1 -0
- package/dist/sandbox/session-retirement.d.ts +11 -4
- package/dist/sandbox/session-retirement.d.ts.map +1 -1
- package/dist/sandbox/session-retirement.js +39 -13
- package/dist/sandbox/session-retirement.js.map +1 -1
- package/dist/storage/domains/projects/base.d.ts +8 -2
- package/dist/storage/domains/projects/base.d.ts.map +1 -1
- package/dist/storage/domains/projects/base.js +21 -4
- package/dist/storage/domains/projects/base.js.map +1 -1
- package/dist/tools/annotations.d.ts.map +1 -1
- package/dist/tools/annotations.js +4 -0
- package/dist/tools/annotations.js.map +1 -1
- package/dist/tools/audit-events-tool.d.ts +29 -0
- package/dist/tools/audit-events-tool.d.ts.map +1 -0
- package/dist/tools/audit-events-tool.js +180 -0
- package/dist/tools/audit-events-tool.js.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/permissions.d.ts.map +1 -1
- package/dist/tools/permissions.js +1 -0
- package/dist/tools/permissions.js.map +1 -1
- package/package.json +9 -9
|
@@ -26,6 +26,18 @@ export declare function destroyDetachedSessionSandbox(options: {
|
|
|
26
26
|
sandbox: FactorySandbox;
|
|
27
27
|
session: Pick<SourceControlSession, 'id' | 'sandboxId'>;
|
|
28
28
|
}): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Stop a session's VM by identity from a process that holds no instance of
|
|
31
|
+
* it, keeping its files for the next start. Like the detached destroy it
|
|
32
|
+
* calls the provider's plain `stop()`, never the `_stop` lifecycle wrapper:
|
|
33
|
+
* E2B pauses the VM it finds by identity, Docker stops the container named
|
|
34
|
+
* after it, and providers with nothing to stop from outside (Platform,
|
|
35
|
+
* local) return.
|
|
36
|
+
*/
|
|
37
|
+
export declare function stopDetachedSessionSandbox(options: {
|
|
38
|
+
sandbox: FactorySandbox;
|
|
39
|
+
session: Pick<SourceControlSession, 'id' | 'sandboxId'>;
|
|
40
|
+
}): Promise<void>;
|
|
29
41
|
/**
|
|
30
42
|
* Tear down the sandbox a just-deleted user session was holding. The row is
|
|
31
43
|
* already gone, so the VM is destroyed rather than stopped — nothing will
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-release.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/sandbox-release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEzF;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBhB;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B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AI,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;CAC3C,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhB"}
|
|
@@ -39,6 +39,21 @@ async function destroyDetachedSessionSandbox(options) {
|
|
|
39
39
|
}, {}).destroy();
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
+
* Stop a session's VM by identity from a process that holds no instance of
|
|
43
|
+
* it, keeping its files for the next start. Like the detached destroy it
|
|
44
|
+
* calls the provider's plain `stop()`, never the `_stop` lifecycle wrapper:
|
|
45
|
+
* E2B pauses the VM it finds by identity, Docker stops the container named
|
|
46
|
+
* after it, and providers with nothing to stop from outside (Platform,
|
|
47
|
+
* local) return.
|
|
48
|
+
*/
|
|
49
|
+
async function stopDetachedSessionSandbox(options) {
|
|
50
|
+
await options.sandbox.create({
|
|
51
|
+
sessionId: options.session.id,
|
|
52
|
+
sandboxId: options.session.sandboxId ?? void 0,
|
|
53
|
+
getRepositoryAccess: void 0
|
|
54
|
+
}, {}).stop();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
42
57
|
* Tear down the sandbox a just-deleted user session was holding. The row is
|
|
43
58
|
* already gone, so the VM is destroyed rather than stopped — nothing will
|
|
44
59
|
* ever resolve this session id again.
|
|
@@ -49,6 +64,6 @@ async function reclaimDeletedSessionSandbox(options) {
|
|
|
49
64
|
destroy: true
|
|
50
65
|
});
|
|
51
66
|
}
|
|
52
|
-
export { destroyDetachedSessionSandbox, reclaimDeletedSessionSandbox, releaseSessionSandbox };
|
|
67
|
+
export { destroyDetachedSessionSandbox, reclaimDeletedSessionSandbox, releaseSessionSandbox, stopDetachedSessionSandbox };
|
|
53
68
|
|
|
54
69
|
//# sourceMappingURL=sandbox-release.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-release.js","names":[],"sources":["../../../src/integrations/github/sandbox-release.ts"],"sourcesContent":["import type { FactorySandbox } from '@mastra/core/workspace';\n\nimport { evictSessionSandbox, peekSessionSandbox } from '../../sandbox/session-sandbox.js';\nimport type { SourceControlSession } from '../../storage/domains/source-control/base.js';\n\n/**\n * Stop or destroy the sandbox a session holds in this process, dropping it\n * from the per-process memo first so later opens construct fresh.\n *\n * Sandbox identity is the session id, so there is no reuse pool to publish\n * into — a reopened session resolves the same id through its provider\n * (reconnect/resume, or a fresh VM whose setup hook re-materializes).\n * Sessions never opened in this replica have no memo entry; destroying those\n * goes through {@link destroyDetachedSessionSandbox}.\n */\nexport async function releaseSessionSandbox(options: {\n /** The session's storage row id (the sandbox identity). */\n sessionId: string;\n /** Destroy instead of stop — for sessions that are gone for good. */\n destroy?: boolean;\n}): Promise<void> {\n const entry = peekSessionSandbox(options.sessionId);\n if (!entry) return;\n evictSessionSandbox(options.sessionId);\n const sandbox = entry.sandbox as unknown as {\n _stop?: () => Promise<void>;\n _destroy?: () => Promise<void>;\n stop?: () => Promise<void>;\n destroy?: () => Promise<void>;\n status?: string;\n };\n if (options.destroy) {\n // Constructed here but never started: the lifecycle wrapper treats that as\n // nothing to clean up, yet the VM may exist from an earlier process. The\n // provider's own destroy kills it by identity without resuming.\n if (sandbox.status === 'pending' && sandbox.destroy) {\n await sandbox.destroy();\n return;\n }\n await (sandbox._destroy ? sandbox._destroy() : sandbox.destroy?.());\n return;\n }\n await (sandbox._stop ? sandbox._stop() : sandbox.stop?.());\n}\n\n/**\n * Destroy a session's VM by identity from a process that holds no instance of\n * it. Constructs the provider sandbox (cheap, side-effect-free by contract)\n * and calls its plain `destroy()` — never `start()` and never the `_destroy`\n * lifecycle wrapper, which skips sandboxes this instance never started.\n */\nexport async function destroyDetachedSessionSandbox(options: {\n sandbox: FactorySandbox;\n session: Pick<SourceControlSession, 'id' | 'sandboxId'>;\n}): Promise<void> {\n const sandbox = options.sandbox.create(\n {\n sessionId: options.session.id,\n sandboxId: options.session.sandboxId ?? undefined,\n getRepositoryAccess: undefined,\n },\n {},\n );\n await sandbox.destroy();\n}\n\n/**\n * Tear down the sandbox a just-deleted user session was holding. The row is\n * already gone, so the VM is destroyed rather than stopped — nothing will\n * ever resolve this session id again.\n */\nexport async function reclaimDeletedSessionSandbox(options: {\n session: Pick<SourceControlSession, 'id'>;\n}): Promise<void> {\n await releaseSessionSandbox({ sessionId: options.session.id, destroy: true });\n}\n"],"mappings":";;;;;;;;;;;;AAeA,eAAsB,sBAAsB,SAK1B;CAChB,MAAM,QAAQ,mBAAmB,QAAQ,SAAS;CAClD,IAAI,CAAC,OAAO;CACZ,oBAAoB,QAAQ,SAAS;CACrC,MAAM,UAAU,MAAM;CAOtB,IAAI,QAAQ,SAAS;EAInB,IAAI,QAAQ,WAAW,aAAa,QAAQ,SAAS;GACnD,MAAM,QAAQ,QAAQ;GACtB;EACF;EACA,OAAO,QAAQ,WAAW,QAAQ,SAAS,IAAI,QAAQ,UAAU;EACjE;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,MAAM,IAAI,QAAQ,OAAO;AAC1D;;;;;;;AAQA,eAAsB,8BAA8B,SAGlC;CAShB,MARgB,QAAQ,QAAQ,OAC9B;EACE,WAAW,QAAQ,QAAQ;EAC3B,WAAW,QAAQ,QAAQ,aAAa,KAAA;EACxC,qBAAqB,KAAA;CACvB,GACA,CAAC,CAES,CAAC,CAAC,QAAQ;AACxB;;;;;;AAOA,eAAsB,6BAA6B,SAEjC;CAChB,MAAM,sBAAsB;EAAE,WAAW,QAAQ,QAAQ;EAAI,SAAS;CAAK,CAAC;AAC9E"}
|
|
1
|
+
{"version":3,"file":"sandbox-release.js","names":[],"sources":["../../../src/integrations/github/sandbox-release.ts"],"sourcesContent":["import type { FactorySandbox } from '@mastra/core/workspace';\n\nimport { evictSessionSandbox, peekSessionSandbox } from '../../sandbox/session-sandbox.js';\nimport type { SourceControlSession } from '../../storage/domains/source-control/base.js';\n\n/**\n * Stop or destroy the sandbox a session holds in this process, dropping it\n * from the per-process memo first so later opens construct fresh.\n *\n * Sandbox identity is the session id, so there is no reuse pool to publish\n * into — a reopened session resolves the same id through its provider\n * (reconnect/resume, or a fresh VM whose setup hook re-materializes).\n * Sessions never opened in this replica have no memo entry; destroying those\n * goes through {@link destroyDetachedSessionSandbox}.\n */\nexport async function releaseSessionSandbox(options: {\n /** The session's storage row id (the sandbox identity). */\n sessionId: string;\n /** Destroy instead of stop — for sessions that are gone for good. */\n destroy?: boolean;\n}): Promise<void> {\n const entry = peekSessionSandbox(options.sessionId);\n if (!entry) return;\n evictSessionSandbox(options.sessionId);\n const sandbox = entry.sandbox as unknown as {\n _stop?: () => Promise<void>;\n _destroy?: () => Promise<void>;\n stop?: () => Promise<void>;\n destroy?: () => Promise<void>;\n status?: string;\n };\n if (options.destroy) {\n // Constructed here but never started: the lifecycle wrapper treats that as\n // nothing to clean up, yet the VM may exist from an earlier process. The\n // provider's own destroy kills it by identity without resuming.\n if (sandbox.status === 'pending' && sandbox.destroy) {\n await sandbox.destroy();\n return;\n }\n await (sandbox._destroy ? sandbox._destroy() : sandbox.destroy?.());\n return;\n }\n await (sandbox._stop ? sandbox._stop() : sandbox.stop?.());\n}\n\n/**\n * Destroy a session's VM by identity from a process that holds no instance of\n * it. Constructs the provider sandbox (cheap, side-effect-free by contract)\n * and calls its plain `destroy()` — never `start()` and never the `_destroy`\n * lifecycle wrapper, which skips sandboxes this instance never started.\n */\nexport async function destroyDetachedSessionSandbox(options: {\n sandbox: FactorySandbox;\n session: Pick<SourceControlSession, 'id' | 'sandboxId'>;\n}): Promise<void> {\n const sandbox = options.sandbox.create(\n {\n sessionId: options.session.id,\n sandboxId: options.session.sandboxId ?? undefined,\n getRepositoryAccess: undefined,\n },\n {},\n );\n await sandbox.destroy();\n}\n\n/**\n * Stop a session's VM by identity from a process that holds no instance of\n * it, keeping its files for the next start. Like the detached destroy it\n * calls the provider's plain `stop()`, never the `_stop` lifecycle wrapper:\n * E2B pauses the VM it finds by identity, Docker stops the container named\n * after it, and providers with nothing to stop from outside (Platform,\n * local) return.\n */\nexport async function stopDetachedSessionSandbox(options: {\n sandbox: FactorySandbox;\n session: Pick<SourceControlSession, 'id' | 'sandboxId'>;\n}): Promise<void> {\n const sandbox = options.sandbox.create(\n {\n sessionId: options.session.id,\n sandboxId: options.session.sandboxId ?? undefined,\n getRepositoryAccess: undefined,\n },\n {},\n );\n await sandbox.stop();\n}\n\n/**\n * Tear down the sandbox a just-deleted user session was holding. The row is\n * already gone, so the VM is destroyed rather than stopped — nothing will\n * ever resolve this session id again.\n */\nexport async function reclaimDeletedSessionSandbox(options: {\n session: Pick<SourceControlSession, 'id'>;\n}): Promise<void> {\n await releaseSessionSandbox({ sessionId: options.session.id, destroy: true });\n}\n"],"mappings":";;;;;;;;;;;;AAeA,eAAsB,sBAAsB,SAK1B;CAChB,MAAM,QAAQ,mBAAmB,QAAQ,SAAS;CAClD,IAAI,CAAC,OAAO;CACZ,oBAAoB,QAAQ,SAAS;CACrC,MAAM,UAAU,MAAM;CAOtB,IAAI,QAAQ,SAAS;EAInB,IAAI,QAAQ,WAAW,aAAa,QAAQ,SAAS;GACnD,MAAM,QAAQ,QAAQ;GACtB;EACF;EACA,OAAO,QAAQ,WAAW,QAAQ,SAAS,IAAI,QAAQ,UAAU;EACjE;CACF;CACA,OAAO,QAAQ,QAAQ,QAAQ,MAAM,IAAI,QAAQ,OAAO;AAC1D;;;;;;;AAQA,eAAsB,8BAA8B,SAGlC;CAShB,MARgB,QAAQ,QAAQ,OAC9B;EACE,WAAW,QAAQ,QAAQ;EAC3B,WAAW,QAAQ,QAAQ,aAAa,KAAA;EACxC,qBAAqB,KAAA;CACvB,GACA,CAAC,CAES,CAAC,CAAC,QAAQ;AACxB;;;;;;;;;AAUA,eAAsB,2BAA2B,SAG/B;CAShB,MARgB,QAAQ,QAAQ,OAC9B;EACE,WAAW,QAAQ,QAAQ;EAC3B,WAAW,QAAQ,QAAQ,aAAa,KAAA;EACxC,qBAAqB,KAAA;CACvB,GACA,CAAC,CAES,CAAC,CAAC,KAAK;AACrB;;;;;;AAOA,eAAsB,6BAA6B,SAEjC;CAChB,MAAM,sBAAsB;EAAE,WAAW,QAAQ,QAAQ;EAAI,SAAS;CAAK,CAAC;AAC9E"}
|
|
@@ -19,6 +19,11 @@ export declare function boardSnapshot(items: readonly Card[], toWire: (item: Car
|
|
|
19
19
|
export declare function scopedSnapshot(items: readonly Card[], toWire: (item: Card) => unknown, runningSessionIds: readonly string[], parkedSessionIds: readonly string[], total?: number): BoardSnapshot;
|
|
20
20
|
/** What moved on a board, for the one reader whose cursor it answers: nothing of it is kept. */
|
|
21
21
|
export declare function movedBody(body: unknown): Pick<BoardSnapshot, 'json' | 'gzipped'>;
|
|
22
|
+
/**
|
|
23
|
+
* A computed answer's wire body, named by a hash of itself: a reader that kept it revalidates
|
|
24
|
+
* instead of downloading it again.
|
|
25
|
+
*/
|
|
26
|
+
export declare function hashedBody(body: unknown): Pick<BoardSnapshot, 'etag' | 'json'>;
|
|
22
27
|
/** {@link boardCheck} of a cached list, computed once for every reader that sends its cursor. */
|
|
23
28
|
export declare function listCheck(items: readonly Card[]): string;
|
|
24
29
|
/** Whether an `If-None-Match` header names this ETag (weak comparison, as for GET). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-snapshot.d.ts","sourceRoot":"","sources":["../../src/routes/board-snapshot.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAYlE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5B;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,EAC/B,iBAAiB,EAAE,SAAS,MAAM,EAAE,EACpC,gBAAgB,EAAE,SAAS,MAAM,EAAE,EACnC,MAAM,CAAC,EAAE,MAAM,GACd,aAAa,CAGf;AAED;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AO,EAC/B,iBAAiB,EAAE,SAAS,MAAM,EAAE,EACpC,gBAAgB,EAAE,SAAS,MAAM,EAAE,EACnC,KAAK,CAAC,EAAE,MAAM,GACb,aAAa,CAEf;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC,CAGhF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,CAG9E;AAID,iGAAiG;AACjG,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,CAIxD;AAgCD,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAIlF"}
|
|
@@ -30,6 +30,17 @@ function movedBody(body) {
|
|
|
30
30
|
gzipped: () => gzip$1(json)
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A computed answer's wire body, named by a hash of itself: a reader that kept it revalidates
|
|
35
|
+
* instead of downloading it again.
|
|
36
|
+
*/
|
|
37
|
+
function hashedBody(body) {
|
|
38
|
+
const json = JSON.stringify(body);
|
|
39
|
+
return {
|
|
40
|
+
etag: `W/"${sha1(json)}"`,
|
|
41
|
+
json
|
|
42
|
+
};
|
|
43
|
+
}
|
|
33
44
|
const checks = /* @__PURE__ */ new WeakMap();
|
|
34
45
|
/** {@link boardCheck} of a cached list, computed once for every reader that sends its cursor. */
|
|
35
46
|
function listCheck(items) {
|
|
@@ -72,6 +83,6 @@ function matchesEtag(ifNoneMatch, etag) {
|
|
|
72
83
|
const bare = (tag) => tag.trim().replace(/^W\//, "");
|
|
73
84
|
return ifNoneMatch.split(",").some((tag) => tag.trim() === "*" || bare(tag) === bare(etag));
|
|
74
85
|
}
|
|
75
|
-
export { boardSnapshot, listCheck, matchesEtag, movedBody, scopedSnapshot };
|
|
86
|
+
export { boardSnapshot, hashedBody, listCheck, matchesEtag, movedBody, scopedSnapshot };
|
|
76
87
|
|
|
77
88
|
//# sourceMappingURL=board-snapshot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-snapshot.js","names":["gzip","gzipCallback"],"sources":["../../src/routes/board-snapshot.ts"],"sourcesContent":["import { createHash, randomUUID } from 'node:crypto';\nimport { promisify } from 'node:util';\nimport { gzip as gzipCallback } from 'node:zlib';\n\nimport type { Card } from '../storage/domains/work-items/base.js';\nimport { boardCheck } from '../work-items/board-check.js';\n\nconst gzip = promisify(gzipCallback);\n\ninterface CardsJson {\n /** Names the cards in the ETag. */\n id: string;\n json: string;\n latest?: BoardSnapshot;\n}\n\nexport interface BoardSnapshot {\n etag: string;\n json: string;\n gzipped(): Promise<Buffer>;\n}\n\n// Keyed on the list a caller keeps per board version: `listShared` returns one frozen array until\n// a card changes, so a new version or an evicted list drops its entry with it.\nconst cardsJson = new WeakMap<readonly Card[], CardsJson>();\n\n/**\n * The listing's wire body for one board version and its run activity. Every tab\n * polling an unchanged board shares one serialization and one gzip, and its\n * ETag lets the browser revalidate instead of downloading the board again.\n */\nexport function boardSnapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n cursor?: string,\n): BoardSnapshot {\n // Random per cached list, so an ETag from before a restart never matches a different board.\n return snapshot(items, toWire, runningSessionIds, parkedSessionIds, () => randomUUID(), { cursor });\n}\n\n/**\n * The wire body for the cards a scoped listing picked. Its ETag names the cards by a hash of\n * their body, not by the board version: a write to a card outside the scope leaves it unchanged,\n * so the tab gets a 304. A caller that passes the same list again shares its serialization.\n * `total` is how many cards matched when `items` is only the first of them.\n */\nexport function scopedSnapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n total?: number,\n): BoardSnapshot {\n return snapshot(items, toWire, runningSessionIds, parkedSessionIds, sha1, { total });\n}\n\n/** What moved on a board, for the one reader whose cursor it answers: nothing of it is kept. */\nexport function movedBody(body: unknown): Pick<BoardSnapshot, 'json' | 'gzipped'> {\n const json = JSON.stringify(body);\n return { json, gzipped: () => gzip(json) };\n}\n\nconst checks = new WeakMap<readonly Card[], string>();\n\n/** {@link boardCheck} of a cached list, computed once for every reader that sends its cursor. */\nexport function listCheck(items: readonly Card[]): string {\n let check = checks.get(items);\n if (check === undefined) checks.set(items, (check = boardCheck(items)));\n return check;\n}\n\nfunction snapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n cardsId: (json: string) => string,\n more: { total?: number; cursor?: string },\n): BoardSnapshot {\n let cards = cardsJson.get(items);\n if (!cards) {\n const json = JSON.stringify(items.map(toWire));\n cards = { id: cardsId(json), json };\n cardsJson.set(items, cards);\n }\n // Everything the body holds beside the cards: a 304 must never hide a change to any of it.\n const rest = JSON.stringify({ runningSessionIds, parkedSessionIds, ...more });\n const etag = `W/\"${cards.id}.${sha1(rest)}\"`;\n if (cards.latest?.etag === etag) return cards.latest;\n\n const json = `{\"workItems\":${cards.json},${rest.slice(1)}`;\n let gzipped: Promise<Buffer> | undefined;\n // zlib runs on the libuv pool, off the event loop.\n cards.latest = { etag, json, gzipped: () => (gzipped ??= gzip(json)) };\n return cards.latest;\n}\n\nfunction sha1(text: string): string {\n return createHash('sha1').update(text).digest('base64url');\n}\n\n/** Whether an `If-None-Match` header names this ETag (weak comparison, as for GET). */\nexport function matchesEtag(ifNoneMatch: string | undefined, etag: string): boolean {\n if (!ifNoneMatch) return false;\n const bare = (tag: string) => tag.trim().replace(/^W\\//, '');\n return ifNoneMatch.split(',').some(tag => tag.trim() === '*' || bare(tag) === bare(etag));\n}\n"],"mappings":";;;;;AAOA,MAAMA,SAAO,UAAUC,IAAY;AAiBnC,MAAM,4BAAY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W,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,WAAW;AAC3D;;AAGA,SAAgB,YAAY,aAAiC,MAAuB;CAClF,IAAI,CAAC,aAAa,OAAO;CACzB,MAAM,QAAQ,QAAgB,IAAI,KAAK,CAAC,CAAC,QAAQ,QAAQ,EAAE;CAC3D,OAAO,YAAY,MAAM,GAAG,CAAC,CAAC,MAAK,QAAO,IAAI,KAAK,MAAM,OAAO,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;AAC1F"}
|
|
1
|
+
{"version":3,"file":"board-snapshot.js","names":["gzip","gzipCallback"],"sources":["../../src/routes/board-snapshot.ts"],"sourcesContent":["import { createHash, randomUUID } from 'node:crypto';\nimport { promisify } from 'node:util';\nimport { gzip as gzipCallback } from 'node:zlib';\n\nimport type { Card } from '../storage/domains/work-items/base.js';\nimport { boardCheck } from '../work-items/board-check.js';\n\nconst gzip = promisify(gzipCallback);\n\ninterface CardsJson {\n /** Names the cards in the ETag. */\n id: string;\n json: string;\n latest?: BoardSnapshot;\n}\n\nexport interface BoardSnapshot {\n etag: string;\n json: string;\n gzipped(): Promise<Buffer>;\n}\n\n// Keyed on the list a caller keeps per board version: `listShared` returns one frozen array until\n// a card changes, so a new version or an evicted list drops its entry with it.\nconst cardsJson = new WeakMap<readonly Card[], CardsJson>();\n\n/**\n * The listing's wire body for one board version and its run activity. Every tab\n * polling an unchanged board shares one serialization and one gzip, and its\n * ETag lets the browser revalidate instead of downloading the board again.\n */\nexport function boardSnapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n cursor?: string,\n): BoardSnapshot {\n // Random per cached list, so an ETag from before a restart never matches a different board.\n return snapshot(items, toWire, runningSessionIds, parkedSessionIds, () => randomUUID(), { cursor });\n}\n\n/**\n * The wire body for the cards a scoped listing picked. Its ETag names the cards by a hash of\n * their body, not by the board version: a write to a card outside the scope leaves it unchanged,\n * so the tab gets a 304. A caller that passes the same list again shares its serialization.\n * `total` is how many cards matched when `items` is only the first of them.\n */\nexport function scopedSnapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n total?: number,\n): BoardSnapshot {\n return snapshot(items, toWire, runningSessionIds, parkedSessionIds, sha1, { total });\n}\n\n/** What moved on a board, for the one reader whose cursor it answers: nothing of it is kept. */\nexport function movedBody(body: unknown): Pick<BoardSnapshot, 'json' | 'gzipped'> {\n const json = JSON.stringify(body);\n return { json, gzipped: () => gzip(json) };\n}\n\n/**\n * A computed answer's wire body, named by a hash of itself: a reader that kept it revalidates\n * instead of downloading it again.\n */\nexport function hashedBody(body: unknown): Pick<BoardSnapshot, 'etag' | 'json'> {\n const json = JSON.stringify(body);\n return { etag: `W/\"${sha1(json)}\"`, json };\n}\n\nconst checks = new WeakMap<readonly Card[], string>();\n\n/** {@link boardCheck} of a cached list, computed once for every reader that sends its cursor. */\nexport function listCheck(items: readonly Card[]): string {\n let check = checks.get(items);\n if (check === undefined) checks.set(items, (check = boardCheck(items)));\n return check;\n}\n\nfunction snapshot(\n items: readonly Card[],\n toWire: (item: Card) => unknown,\n runningSessionIds: readonly string[],\n parkedSessionIds: readonly string[],\n cardsId: (json: string) => string,\n more: { total?: number; cursor?: string },\n): BoardSnapshot {\n let cards = cardsJson.get(items);\n if (!cards) {\n const json = JSON.stringify(items.map(toWire));\n cards = { id: cardsId(json), json };\n cardsJson.set(items, cards);\n }\n // Everything the body holds beside the cards: a 304 must never hide a change to any of it.\n const rest = JSON.stringify({ runningSessionIds, parkedSessionIds, ...more });\n const etag = `W/\"${cards.id}.${sha1(rest)}\"`;\n if (cards.latest?.etag === etag) return cards.latest;\n\n const json = `{\"workItems\":${cards.json},${rest.slice(1)}`;\n let gzipped: Promise<Buffer> | undefined;\n // zlib runs on the libuv pool, off the event loop.\n cards.latest = { etag, json, gzipped: () => (gzipped ??= gzip(json)) };\n return cards.latest;\n}\n\nfunction sha1(text: string): string {\n return createHash('sha1').update(text).digest('base64url');\n}\n\n/** Whether an `If-None-Match` header names this ETag (weak comparison, as for GET). */\nexport function matchesEtag(ifNoneMatch: string | undefined, etag: string): boolean {\n if (!ifNoneMatch) return false;\n const bare = (tag: string) => tag.trim().replace(/^W\\//, '');\n return ifNoneMatch.split(',').some(tag => tag.trim() === '*' || bare(tag) === bare(etag));\n}\n"],"mappings":";;;;;AAOA,MAAMA,SAAO,UAAUC,IAAY;AAiBnC,MAAM,4BAAY,IAAI,QAAoC;;;;;;AAO1D,SAAgB,cACd,OACA,QACA,mBACA,kBACA,QACe;CAEf,OAAO,SAAS,OAAO,QAAQ,mBAAmB,wBAAwB,WAAW,GAAG,EAAE,OAAO,CAAC;AACpG;;;;;;;AAQA,SAAgB,eACd,OACA,QACA,mBACA,kBACA,OACe;CACf,OAAO,SAAS,OAAO,QAAQ,mBAAmB,kBAAkB,MAAM,EAAE,MAAM,CAAC;AACrF;;AAGA,SAAgB,UAAU,MAAwD;CAChF,MAAM,OAAO,KAAK,UAAU,IAAI;CAChC,OAAO;EAAE;EAAM,eAAeD,OAAK,IAAI;CAAE;AAC3C;;;;;AAMA,SAAgB,WAAW,MAAqD;CAC9E,MAAM,OAAO,KAAK,UAAU,IAAI;CAChC,OAAO;EAAE,MAAM,MAAM,KAAK,IAAI,EAAE;EAAI;CAAK;AAC3C;AAEA,MAAM,yBAAS,IAAI,QAAiC;;AAGpD,SAAgB,UAAU,OAAgC;CACxD,IAAI,QAAQ,OAAO,IAAI,KAAK;CAC5B,IAAI,UAAU,KAAA,GAAW,OAAO,IAAI,OAAQ,QAAQ,WAAW,KAAK,CAAE;CACtE,OAAO;AACT;AAEA,SAAS,SACP,OACA,QACA,mBACA,kBACA,SACA,MACe;CACf,IAAI,QAAQ,UAAU,IAAI,KAAK;CAC/B,IAAI,CAAC,OAAO;EACV,MAAM,OAAO,KAAK,UAAU,MAAM,IAAI,MAAM,CAAC;EAC7C,QAAQ;GAAE,IAAI,QAAQ,IAAI;GAAG;EAAK;EAClC,UAAU,IAAI,OAAO,KAAK;CAC5B;CAEA,MAAM,OAAO,KAAK,UAAU;EAAE;EAAmB;EAAkB,GAAG;CAAK,CAAC;CAC5E,MAAM,OAAO,MAAM,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;CAC1C,IAAI,MAAM,QAAQ,SAAS,MAAM,OAAO,MAAM;CAE9C,MAAM,OAAO,gBAAgB,MAAM,KAAK,GAAG,KAAK,MAAM,CAAC;CACvD,IAAI;CAEJ,MAAM,SAAS;EAAE;EAAM;EAAM,eAAgB,YAAYA,OAAK,IAAI;CAAG;CACrE,OAAO,MAAM;AACf;AAEA,SAAS,KAAK,MAAsB;CAClC,OAAO,WAAW,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,WAAW;AAC3D;;AAGA,SAAgB,YAAY,aAAiC,MAAuB;CAClF,IAAI,CAAC,aAAa,OAAO;CACzB,MAAM,QAAQ,QAAgB,IAAI,KAAK,CAAC,CAAC,QAAQ,QAAQ,EAAE;CAC3D,OAAO,YAAY,MAAM,GAAG,CAAC,CAAC,MAAK,QAAO,IAAI,KAAK,MAAM,OAAO,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;AAC1F"}
|
|
@@ -341,6 +341,32 @@ export declare const updateProjectEnvironmentBodySchema: z.ZodObject<{
|
|
|
341
341
|
teardownCommand: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>;
|
|
342
342
|
}, z.core.$strip>>>;
|
|
343
343
|
}, z.core.$strip>;
|
|
344
|
+
/** What the draft page's starter buttons count on the project's default board. */
|
|
345
|
+
export declare const workItemStartersResponseSchema: z.ZodObject<{
|
|
346
|
+
failed: z.ZodNumber;
|
|
347
|
+
changesRequested: z.ZodNumber;
|
|
348
|
+
review: z.ZodObject<{
|
|
349
|
+
count: z.ZodNumber;
|
|
350
|
+
oldestOpenedAt: z.ZodOptional<z.ZodString>;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
undecided: z.ZodNumber;
|
|
353
|
+
untriaged: z.ZodNumber;
|
|
354
|
+
unplannedBugs: z.ZodNumber;
|
|
355
|
+
sweep: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
area: z.ZodString;
|
|
357
|
+
count: z.ZodNumber;
|
|
358
|
+
}, z.core.$strip>>;
|
|
359
|
+
stale: z.ZodNumber;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
export declare const workItemActivityQuerySchema: z.ZodObject<{
|
|
362
|
+
since: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<number, string>>;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
/** When the project's cards were created and completed since an instant, and how many cards it has in all. */
|
|
365
|
+
export declare const workItemActivityResponseSchema: z.ZodObject<{
|
|
366
|
+
total: z.ZodNumber;
|
|
367
|
+
createdAt: z.ZodArray<z.ZodString>;
|
|
368
|
+
doneAt: z.ZodArray<z.ZodString>;
|
|
369
|
+
}, z.core.$strip>;
|
|
344
370
|
export declare const createWorkItemBodySchema: z.ZodObject<{
|
|
345
371
|
title: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
346
372
|
description: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
|
|
@@ -1622,6 +1648,46 @@ export declare const FACTORY_ROUTE_CONTRACTS: {
|
|
|
1622
1648
|
check: z.ZodOptional<z.ZodString>;
|
|
1623
1649
|
}, z.core.$strip>;
|
|
1624
1650
|
};
|
|
1651
|
+
readonly workItemStarters: {
|
|
1652
|
+
readonly method: 'GET';
|
|
1653
|
+
readonly path: '/web/factory/projects/:id/work-items/starters';
|
|
1654
|
+
readonly description: 'Count the cards behind each new-session starter on the default board';
|
|
1655
|
+
readonly pathSchema: z.ZodObject<{
|
|
1656
|
+
id: z.ZodString;
|
|
1657
|
+
}, z.core.$strip>;
|
|
1658
|
+
readonly responseSchema: z.ZodObject<{
|
|
1659
|
+
failed: z.ZodNumber;
|
|
1660
|
+
changesRequested: z.ZodNumber;
|
|
1661
|
+
review: z.ZodObject<{
|
|
1662
|
+
count: z.ZodNumber;
|
|
1663
|
+
oldestOpenedAt: z.ZodOptional<z.ZodString>;
|
|
1664
|
+
}, z.core.$strip>;
|
|
1665
|
+
undecided: z.ZodNumber;
|
|
1666
|
+
untriaged: z.ZodNumber;
|
|
1667
|
+
unplannedBugs: z.ZodNumber;
|
|
1668
|
+
sweep: z.ZodOptional<z.ZodObject<{
|
|
1669
|
+
area: z.ZodString;
|
|
1670
|
+
count: z.ZodNumber;
|
|
1671
|
+
}, z.core.$strip>>;
|
|
1672
|
+
stale: z.ZodNumber;
|
|
1673
|
+
}, z.core.$strip>;
|
|
1674
|
+
};
|
|
1675
|
+
readonly workItemActivity: {
|
|
1676
|
+
readonly method: 'GET';
|
|
1677
|
+
readonly path: '/web/factory/projects/:id/work-items/activity';
|
|
1678
|
+
readonly description: 'List when cards were created and completed since an instant';
|
|
1679
|
+
readonly pathSchema: z.ZodObject<{
|
|
1680
|
+
id: z.ZodString;
|
|
1681
|
+
}, z.core.$strip>;
|
|
1682
|
+
readonly querySchema: z.ZodObject<{
|
|
1683
|
+
since: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<number, string>>;
|
|
1684
|
+
}, z.core.$strip>;
|
|
1685
|
+
readonly responseSchema: z.ZodObject<{
|
|
1686
|
+
total: z.ZodNumber;
|
|
1687
|
+
createdAt: z.ZodArray<z.ZodString>;
|
|
1688
|
+
doneAt: z.ZodArray<z.ZodString>;
|
|
1689
|
+
}, z.core.$strip>;
|
|
1690
|
+
};
|
|
1625
1691
|
readonly workItemCreate: {
|
|
1626
1692
|
readonly method: 'POST';
|
|
1627
1693
|
readonly path: '/web/factory/projects/:id/work-items';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/routes/contracts.ts"],"names":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,EAAE,KAAK;iBACb,IAAI,EAAE,qBAAqB;iBAC3B,WAAW,EAAE,qEAAqE;iBAClF,WAAW;;;iBACX,cAAc;;;;;;iBAGd,MAAM,EAAE,KAAK;iBACb,IAAI,EAAE,wCAAwC;iBAC9C,WAAW,EAAE,sDAAsD;iBACnE,UAAU;;;;iBACV,UAAU;;;iBACV,cAAc;;;;;iBAGd,MAAM,EAAE,QAAQ;iBAChB,IAAI,EAAE,wCAAwC;iBAC9C,WAAW,EAAE,kEAAkE;iBAC/E,UAAU;;;;iBACV,cAAc;;;;CAEuC,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,uBAAuB,CAAC"}
|
package/dist/routes/contracts.js
CHANGED
|
@@ -424,6 +424,31 @@ const workItemListQuerySchema = z.object({
|
|
|
424
424
|
...query,
|
|
425
425
|
since: void 0
|
|
426
426
|
} : query);
|
|
427
|
+
const countSchema = z.number().int().nonnegative();
|
|
428
|
+
/** What the draft page's starter buttons count on the project's default board. */
|
|
429
|
+
const workItemStartersResponseSchema = z.object({
|
|
430
|
+
failed: countSchema,
|
|
431
|
+
changesRequested: countSchema,
|
|
432
|
+
review: z.object({
|
|
433
|
+
count: countSchema,
|
|
434
|
+
oldestOpenedAt: z.string().optional()
|
|
435
|
+
}),
|
|
436
|
+
undecided: countSchema,
|
|
437
|
+
untriaged: countSchema,
|
|
438
|
+
unplannedBugs: countSchema,
|
|
439
|
+
sweep: z.object({
|
|
440
|
+
area: z.string(),
|
|
441
|
+
count: countSchema
|
|
442
|
+
}).optional(),
|
|
443
|
+
stale: countSchema
|
|
444
|
+
});
|
|
445
|
+
const workItemActivityQuerySchema = z.object({ since: z.iso.datetime({ offset: true }).transform((since) => Date.parse(since)) });
|
|
446
|
+
/** When the project's cards were created and completed since an instant, and how many cards it has in all. */
|
|
447
|
+
const workItemActivityResponseSchema = z.object({
|
|
448
|
+
total: countSchema,
|
|
449
|
+
createdAt: z.array(z.string()),
|
|
450
|
+
doneAt: z.array(z.string())
|
|
451
|
+
});
|
|
427
452
|
const sessionsSchema = z.record(z.string().min(1).max(64), sessionSchema);
|
|
428
453
|
const metadataSchema = z.union([z.record(z.string(), z.unknown()), z.null()]).refine((value) => {
|
|
429
454
|
try {
|
|
@@ -946,6 +971,21 @@ const FACTORY_ROUTE_CONTRACTS = {
|
|
|
946
971
|
check: z.string().optional()
|
|
947
972
|
})
|
|
948
973
|
},
|
|
974
|
+
workItemStarters: {
|
|
975
|
+
method: "GET",
|
|
976
|
+
path: "/web/factory/projects/:id/work-items/starters",
|
|
977
|
+
description: "Count the cards behind each new-session starter on the default board",
|
|
978
|
+
pathSchema: projectPathSchema,
|
|
979
|
+
responseSchema: workItemStartersResponseSchema
|
|
980
|
+
},
|
|
981
|
+
workItemActivity: {
|
|
982
|
+
method: "GET",
|
|
983
|
+
path: "/web/factory/projects/:id/work-items/activity",
|
|
984
|
+
description: "List when cards were created and completed since an instant",
|
|
985
|
+
pathSchema: projectPathSchema,
|
|
986
|
+
querySchema: workItemActivityQuerySchema,
|
|
987
|
+
responseSchema: workItemActivityResponseSchema
|
|
988
|
+
},
|
|
949
989
|
workItemCreate: {
|
|
950
990
|
method: "POST",
|
|
951
991
|
path: "/web/factory/projects/:id/work-items",
|
|
@@ -1105,6 +1145,6 @@ const FACTORY_ROUTE_CONTRACTS = {
|
|
|
1105
1145
|
responseSchema: skillResponseSchema
|
|
1106
1146
|
}
|
|
1107
1147
|
};
|
|
1108
|
-
export { FACTORY_ROUTE_CONTRACTS, MAX_SANDBOX_ENV_VALUE_LENGTH, MAX_SKILL_OVERRIDE_LENGTH, RESERVED_SANDBOX_ENV_NAMES, THINKING_LEVELS, UUID_PATTERN, attentionQuerySchema, automationRunStartBodySchema, boardDeleteQuerySchema, boardResetBodySchema, createProjectBodySchema, createWorkItemBodySchema, decisionQuerySchema, environmentBuildResponseSchema, environmentBuildSchema, environmentBuildStartResponseSchema, environmentBuildTriggersSchema, environmentBuildsResponseSchema, environmentLastBuildSchema, environmentSandboxSchema, intakeRouteInputSchema, intakeRoutePatchSchema, intakeRouteReorderBodySchema, metricsQuerySchema, projectEnvironmentResponseSchema, projectListRepositorySchema, replaceBoardBodySchema, sandboxEnvAppliesToSchema, sandboxEnvNameSchema, sandboxEnvSetBodySchema, sandboxEnvUpdateBodySchema, skillOverrideBodySchema, skillOverrideSaveRequestSchema, startWorkItemBodySchema, transitionBodySchema, updateProjectBodySchema, updateProjectEnvironmentBodySchema, updateWorkItemBodySchema };
|
|
1148
|
+
export { FACTORY_ROUTE_CONTRACTS, MAX_SANDBOX_ENV_VALUE_LENGTH, MAX_SKILL_OVERRIDE_LENGTH, RESERVED_SANDBOX_ENV_NAMES, THINKING_LEVELS, UUID_PATTERN, attentionQuerySchema, automationRunStartBodySchema, boardDeleteQuerySchema, boardResetBodySchema, createProjectBodySchema, createWorkItemBodySchema, decisionQuerySchema, environmentBuildResponseSchema, environmentBuildSchema, environmentBuildStartResponseSchema, environmentBuildTriggersSchema, environmentBuildsResponseSchema, environmentLastBuildSchema, environmentSandboxSchema, intakeRouteInputSchema, intakeRoutePatchSchema, intakeRouteReorderBodySchema, metricsQuerySchema, projectEnvironmentResponseSchema, projectListRepositorySchema, replaceBoardBodySchema, sandboxEnvAppliesToSchema, sandboxEnvNameSchema, sandboxEnvSetBodySchema, sandboxEnvUpdateBodySchema, skillOverrideBodySchema, skillOverrideSaveRequestSchema, startWorkItemBodySchema, transitionBodySchema, updateProjectBodySchema, updateProjectEnvironmentBodySchema, updateWorkItemBodySchema, workItemActivityQuerySchema, workItemActivityResponseSchema, workItemStartersResponseSchema };
|
|
1109
1149
|
|
|
1110
1150
|
//# sourceMappingURL=contracts.js.map
|