@owlmeans/server-planning 0.1.18-rc.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/README.md +150 -0
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/server-planning/SKILL.md +203 -0
- package/build/actions/cards.d.ts +16 -0
- package/build/actions/cards.d.ts.map +1 -0
- package/build/actions/cards.js +32 -0
- package/build/actions/cards.js.map +1 -0
- package/build/actions/commit.d.ts +14 -0
- package/build/actions/commit.d.ts.map +1 -0
- package/build/actions/commit.js +48 -0
- package/build/actions/commit.js.map +1 -0
- package/build/actions/execute.d.ts +13 -0
- package/build/actions/execute.d.ts.map +1 -0
- package/build/actions/execute.js +35 -0
- package/build/actions/execute.js.map +1 -0
- package/build/actions/index.d.ts +9 -0
- package/build/actions/index.d.ts.map +1 -0
- package/build/actions/index.js +9 -0
- package/build/actions/index.js.map +1 -0
- package/build/actions/links.d.ts +5 -0
- package/build/actions/links.d.ts.map +1 -0
- package/build/actions/links.js +8 -0
- package/build/actions/links.js.map +1 -0
- package/build/actions/schemas.d.ts +6 -0
- package/build/actions/schemas.d.ts.map +1 -0
- package/build/actions/schemas.js +9 -0
- package/build/actions/schemas.js.map +1 -0
- package/build/actions/specs.d.ts +10 -0
- package/build/actions/specs.d.ts.map +1 -0
- package/build/actions/specs.js +14 -0
- package/build/actions/specs.js.map +1 -0
- package/build/actions/transitions.d.ts +6 -0
- package/build/actions/transitions.d.ts.map +1 -0
- package/build/actions/transitions.js +8 -0
- package/build/actions/transitions.js.map +1 -0
- package/build/actions/watch.d.ts +12 -0
- package/build/actions/watch.d.ts.map +1 -0
- package/build/actions/watch.js +45 -0
- package/build/actions/watch.js.map +1 -0
- package/build/consts.d.ts +18 -0
- package/build/consts.d.ts.map +1 -0
- package/build/consts.js +19 -0
- package/build/consts.js.map +1 -0
- package/build/executor/changes.d.ts +31 -0
- package/build/executor/changes.d.ts.map +1 -0
- package/build/executor/changes.js +55 -0
- package/build/executor/changes.js.map +1 -0
- package/build/executor/code.d.ts +15 -0
- package/build/executor/code.d.ts.map +1 -0
- package/build/executor/code.js +59 -0
- package/build/executor/code.js.map +1 -0
- package/build/executor/receipt.d.ts +12 -0
- package/build/executor/receipt.d.ts.map +1 -0
- package/build/executor/receipt.js +56 -0
- package/build/executor/receipt.js.map +1 -0
- package/build/executor/resolve.d.ts +35 -0
- package/build/executor/resolve.d.ts.map +1 -0
- package/build/executor/resolve.js +136 -0
- package/build/executor/resolve.js.map +1 -0
- package/build/executor/validate.d.ts +13 -0
- package/build/executor/validate.d.ts.map +1 -0
- package/build/executor/validate.js +222 -0
- package/build/executor/validate.js.map +1 -0
- package/build/executor.d.ts +15 -0
- package/build/executor.d.ts.map +1 -0
- package/build/executor.js +113 -0
- package/build/executor.js.map +1 -0
- package/build/facade.d.ts +12 -0
- package/build/facade.d.ts.map +1 -0
- package/build/facade.js +131 -0
- package/build/facade.js.map +1 -0
- package/build/helper.d.ts +18 -0
- package/build/helper.d.ts.map +1 -0
- package/build/helper.js +32 -0
- package/build/helper.js.map +1 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +11 -0
- package/build/index.js.map +1 -0
- package/build/projection.d.ts +28 -0
- package/build/projection.d.ts.map +1 -0
- package/build/projection.js +40 -0
- package/build/projection.js.map +1 -0
- package/build/registry.d.ts +30 -0
- package/build/registry.d.ts.map +1 -0
- package/build/registry.js +103 -0
- package/build/registry.js.map +1 -0
- package/build/service.d.ts +40 -0
- package/build/service.d.ts.map +1 -0
- package/build/service.js +109 -0
- package/build/service.js.map +1 -0
- package/build/store/commits.d.ts +15 -0
- package/build/store/commits.d.ts.map +1 -0
- package/build/store/commits.js +147 -0
- package/build/store/commits.js.map +1 -0
- package/build/store/composite.d.ts +12 -0
- package/build/store/composite.d.ts.map +1 -0
- package/build/store/composite.js +150 -0
- package/build/store/composite.js.map +1 -0
- package/build/store/fold.d.ts +39 -0
- package/build/store/fold.d.ts.map +1 -0
- package/build/store/fold.js +220 -0
- package/build/store/fold.js.map +1 -0
- package/build/store/index.d.ts +6 -0
- package/build/store/index.d.ts.map +1 -0
- package/build/store/index.js +5 -0
- package/build/store/index.js.map +1 -0
- package/build/store/memory.d.ts +19 -0
- package/build/store/memory.d.ts.map +1 -0
- package/build/store/memory.js +0 -0
- package/build/store/memory.js.map +1 -0
- package/build/store/types.d.ts +82 -0
- package/build/store/types.d.ts.map +1 -0
- package/build/store/types.js +2 -0
- package/build/store/types.js.map +1 -0
- package/build/types.d.ts +46 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/utils/guard.d.ts +19 -0
- package/build/utils/guard.d.ts.map +1 -0
- package/build/utils/guard.js +35 -0
- package/build/utils/guard.js.map +1 -0
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.d.ts.map +1 -0
- package/build/utils/index.js +3 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/scope.d.ts +20 -0
- package/build/utils/scope.d.ts.map +1 -0
- package/build/utils/scope.js +36 -0
- package/build/utils/scope.js.map +1 -0
- package/package.json +66 -0
- package/src/actions/cards.ts +52 -0
- package/src/actions/commit.ts +55 -0
- package/src/actions/execute.ts +47 -0
- package/src/actions/index.ts +8 -0
- package/src/actions/links.ts +14 -0
- package/src/actions/schemas.ts +15 -0
- package/src/actions/specs.ts +23 -0
- package/src/actions/transitions.ts +14 -0
- package/src/actions/watch.ts +52 -0
- package/src/consts.ts +22 -0
- package/src/executor/changes.ts +78 -0
- package/src/executor/code.ts +83 -0
- package/src/executor/receipt.ts +66 -0
- package/src/executor/resolve.ts +174 -0
- package/src/executor/validate.ts +253 -0
- package/src/executor.ts +149 -0
- package/src/facade.ts +162 -0
- package/src/helper.ts +44 -0
- package/src/index.ts +13 -0
- package/src/projection.ts +65 -0
- package/src/registry.ts +143 -0
- package/src/service.ts +157 -0
- package/src/store/commits.ts +174 -0
- package/src/store/composite.ts +171 -0
- package/src/store/fold.ts +257 -0
- package/src/store/index.ts +6 -0
- package/src/store/memory.ts +0 -0
- package/src/store/types.ts +94 -0
- package/src/types.ts +48 -0
- package/src/utils/guard.ts +40 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/scope.ts +51 -0
- package/tests/commits.spec.ts +78 -0
- package/tests/context.ts +198 -0
- package/tests/entrypoints.spec.ts +72 -0
- package/tests/executor.spec.ts +69 -0
- package/tests/memory-store.spec.ts +84 -0
- package/tests/plugins.spec.ts +86 -0
- package/tests/specifications.spec.ts +61 -0
- package/tests/tsconfig.json +17 -0
- package/tests/validation.spec.ts +62 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { planningServiceOf, scopeOf } from '../utils/index.js';
|
|
3
|
+
/** The schema bundle the service holds — what a client loads to answer `can()` with no round trip. */
|
|
4
|
+
export const listSchemas = (protocol, opts) => handlers().request(protocol, async (req, ctx) => {
|
|
5
|
+
// Scoped like every other leaf: no organization, no bundle.
|
|
6
|
+
scopeOf(req);
|
|
7
|
+
return planningServiceOf(ctx, opts).schemas.bundle();
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/actions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE9D,sGAAsG;AACtG,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAA6C,EAAE,IAA6B,EACf,EAAE,CAC/D,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACvD,4DAA4D;IAC5D,OAAO,CAAC,GAAG,CAAC,CAAA;IAEZ,OAAO,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;AACtD,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
3
|
+
import type { Context, PlanningHandlerOptions } from '../types.js';
|
|
4
|
+
type RequestHandler = ReturnType<ReturnType<typeof handlers<Context>>['request']>;
|
|
5
|
+
/** @throws {WorkcardNotFound} */
|
|
6
|
+
export declare const getSpecification: (protocol: PlanningProtocols['spec']['get'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
7
|
+
/** A document's history, newest first, replayed from its log. */
|
|
8
|
+
export declare const listSpecificationRevisions: (protocol: PlanningProtocols['spec']['revisions'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,KAAK,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAEjF,iCAAiC;AACjC,eAAO,MAAM,gBAAgB,aAAc,iBAAiB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,sBAAsB,KAAG,cAKxG,CAAA;AAEL,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,aAAc,iBAAiB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,sBAAsB,KAAG,cAMxH,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { concealed, handlerFacade } from '../utils/index.js';
|
|
3
|
+
/** @throws {WorkcardNotFound} */
|
|
4
|
+
export const getSpecification = (protocol, opts) => handlers().request(protocol, async (req, ctx) => concealed(async () => {
|
|
5
|
+
const facade = await handlerFacade(ctx, req, opts);
|
|
6
|
+
return await facade.specifications.get(`${req.params.id}`);
|
|
7
|
+
}));
|
|
8
|
+
/** A document's history, newest first, replayed from its log. */
|
|
9
|
+
export const listSpecificationRevisions = (protocol, opts) => handlers().request(protocol, async (req, ctx) => concealed(async () => {
|
|
10
|
+
const facade = await handlerFacade(ctx, req, opts);
|
|
11
|
+
const limit = req.query?.limit == null ? undefined : Number(req.query.limit);
|
|
12
|
+
return { items: await facade.specifications.revisions(`${req.params.id}`, Number.isFinite(limit) ? limit : undefined) };
|
|
13
|
+
}));
|
|
14
|
+
//# sourceMappingURL=specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specs.js","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAI5D,iCAAiC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAA0C,EAAE,IAA6B,EAAkB,EAAE,CAC5H,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IAC7E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAElD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAA;AAC5D,CAAC,CAAC,CAAC,CAAA;AAEL,iEAAiE;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAgD,EAAE,IAA6B,EAAkB,EAAE,CAC5I,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IAC7E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAE5E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAA;AACzH,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
3
|
+
import type { Context, PlanningHandlerOptions } from '../types.js';
|
|
4
|
+
/** @throws {WorkcardNotFound} for an absent transition and for another entity's alike */
|
|
5
|
+
export declare const getTransition: (protocol: PlanningProtocols['transition']['get'], opts?: PlanningHandlerOptions) => ReturnType<ReturnType<typeof handlers<Context>>['request']>;
|
|
6
|
+
//# sourceMappingURL=transitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,yFAAyF;AACzF,eAAO,MAAM,aAAa,aACd,iBAAiB,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,SAAS,sBAAsB,KAC9E,UAAU,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAKxD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { concealed, handlerFacade } from '../utils/index.js';
|
|
3
|
+
/** @throws {WorkcardNotFound} for an absent transition and for another entity's alike */
|
|
4
|
+
export const getTransition = (protocol, opts) => handlers().request(protocol, async (req, ctx) => concealed(async () => {
|
|
5
|
+
const facade = await handlerFacade(ctx, req, opts);
|
|
6
|
+
return await facade.transitions.get(`${req.params.transition}`);
|
|
7
|
+
}));
|
|
8
|
+
//# sourceMappingURL=transitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAE5D,yFAAyF;AACzF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,QAAgD,EAAE,IAA6B,EAClB,EAAE,CAC/D,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IAC7E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAElD,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;AACjE,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
2
|
+
import { connection } from '@owlmeans/server-socket';
|
|
3
|
+
import type { PlanningHandlerOptions } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* The notify tool: push the caller's entity's commits down a socket as `planning-commit` frames.
|
|
6
|
+
*
|
|
7
|
+
* The subscription is filtered by the authenticated entity (never a query value) and optionally by
|
|
8
|
+
* `project`/`card`. A frame without `record` — what a cross-process bus delivers — gets the card as
|
|
9
|
+
* it reads now (`null` once deleted), so a subscriber never re-reads per frame.
|
|
10
|
+
*/
|
|
11
|
+
export declare const watchCommits: (protocol: PlanningProtocols['commit']['events'], opts?: PlanningHandlerOptions) => ReturnType<typeof connection>;
|
|
12
|
+
//# sourceMappingURL=watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/actions/watch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,KAAK,EAAW,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAMlE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,aACb,iBAAiB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,SAAS,sBAAsB,KAC7E,UAAU,CAAC,OAAO,UAAU,CA+B7B,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PLANNING_COMMIT_EVENT } from '@owlmeans/planning';
|
|
2
|
+
import { connection } from '@owlmeans/server-socket';
|
|
3
|
+
import { MessageType } from '@owlmeans/socket';
|
|
4
|
+
import { handlerFacade } from '../utils/index.js';
|
|
5
|
+
const text = (value) => value == null || value === '' ? undefined : `${value}`;
|
|
6
|
+
/**
|
|
7
|
+
* The notify tool: push the caller's entity's commits down a socket as `planning-commit` frames.
|
|
8
|
+
*
|
|
9
|
+
* The subscription is filtered by the authenticated entity (never a query value) and optionally by
|
|
10
|
+
* `project`/`card`. A frame without `record` — what a cross-process bus delivers — gets the card as
|
|
11
|
+
* it reads now (`null` once deleted), so a subscriber never re-reads per frame.
|
|
12
|
+
*/
|
|
13
|
+
export const watchCommits = (protocol, opts) => connection(protocol, async (conn, ctx, req) => {
|
|
14
|
+
const facade = await handlerFacade(ctx, req, opts);
|
|
15
|
+
const query = (req.query ?? {});
|
|
16
|
+
const frame = opts?.event ?? PLANNING_COMMIT_EVENT;
|
|
17
|
+
const filter = {
|
|
18
|
+
...(text(query.project) != null ? { project: text(query.project) } : {}),
|
|
19
|
+
...(text(query.card) != null ? { card: text(query.card) } : {}),
|
|
20
|
+
};
|
|
21
|
+
const unsubscribe = await facade.commits.subscribe(async (event) => {
|
|
22
|
+
try {
|
|
23
|
+
const enriched = event.record !== undefined ? event : { ...event, record: await facade.cards.load(event.card) };
|
|
24
|
+
await conn.notify(frame, enriched);
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
console.error('Planning commit notify error:', e);
|
|
28
|
+
}
|
|
29
|
+
}, filter);
|
|
30
|
+
conn.listen(async (message) => {
|
|
31
|
+
if (typeof message !== 'object') {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const msg = message;
|
|
35
|
+
if (msg.type === MessageType.System && msg.event === 'close') {
|
|
36
|
+
try {
|
|
37
|
+
unsubscribe();
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
console.error('Planning commit unsubscribe error:', e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45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CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAA;IAED,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAkB,EAAE,EAAE;QAC9E,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAA;YAC/G,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAA;QACnD,CAAC;IACH,CAAC,EAAE,MAAM,CAAC,CAAA;IAEV,IAAI,CAAC,MAAM,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;QAC1B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAM;QACR,CAAC;QACD,MAAM,GAAG,GAAG,OAA6B,CAAA;QACzC,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7D,IAAI,CAAC;gBACH,WAAW,EAAE,CAAA;YACf,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAA;YACxD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The alias `appendPlanningService` registers the host under — the same one a client uses. */
|
|
2
|
+
export declare const DEFAULT_ALIAS = "planning";
|
|
3
|
+
/** The alias a memory store answers `PlanningStore.alias` with. */
|
|
4
|
+
export declare const MEMORY_STORE_ALIAS = "planning-memory";
|
|
5
|
+
/**
|
|
6
|
+
* How many settled commits a hub remembers after their transition row may be gone.
|
|
7
|
+
*
|
|
8
|
+
* A project `delete` purges the project's own log, so without this a waiter that polls a moment
|
|
9
|
+
* after the fold would be told the transition never existed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_COMMIT_MEMORY = 1000;
|
|
12
|
+
/**
|
|
13
|
+
* The poll ladder `wait` climbs after its first immediate poll, in milliseconds. The last step
|
|
14
|
+
* repeats. The subscription answers first whenever the fold publishes where the hub hears it; the
|
|
15
|
+
* ladder is what answers when it folded somewhere the hub does not.
|
|
16
|
+
*/
|
|
17
|
+
export declare const COMMIT_POLL_LADDER: readonly number[];
|
|
18
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,eAAO,MAAM,aAAa,aAAmB,CAAA;AAE7C,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAA;AAEzC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAqC,CAAA"}
|
package/build/consts.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PLANNING_SERVICE } from '@owlmeans/planning';
|
|
2
|
+
/** The alias `appendPlanningService` registers the host under — the same one a client uses. */
|
|
3
|
+
export const DEFAULT_ALIAS = PLANNING_SERVICE;
|
|
4
|
+
/** The alias a memory store answers `PlanningStore.alias` with. */
|
|
5
|
+
export const MEMORY_STORE_ALIAS = 'planning-memory';
|
|
6
|
+
/**
|
|
7
|
+
* How many settled commits a hub remembers after their transition row may be gone.
|
|
8
|
+
*
|
|
9
|
+
* A project `delete` purges the project's own log, so without this a waiter that polls a moment
|
|
10
|
+
* after the fold would be told the transition never existed.
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_COMMIT_MEMORY = 1000;
|
|
13
|
+
/**
|
|
14
|
+
* The poll ladder `wait` climbs after its first immediate poll, in milliseconds. The last step
|
|
15
|
+
* repeats. The subscription answers first whenever the fold publishes where the hub hears it; the
|
|
16
|
+
* ladder is what answers when it folded somewhere the hub does not.
|
|
17
|
+
*/
|
|
18
|
+
export const COMMIT_POLL_LADDER = Object.freeze([250, 1000, 2000]);
|
|
19
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,+FAA+F;AAC/F,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAA;AAE7C,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAA;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ChangeSet, PlanningSchemaRegistry, PlanningScope, Transition, TransitionActor, TransitionExecution } from '@owlmeans/planning';
|
|
2
|
+
import type { Resolved } from './resolve.js';
|
|
3
|
+
/**
|
|
4
|
+
* Step 9: the recorded `changes`/`unset`, and whether an update wrote nothing.
|
|
5
|
+
*
|
|
6
|
+
* @throws {IllegalTransition | PlanningError}
|
|
7
|
+
*/
|
|
8
|
+
export declare const changeSetOf: (exec: TransitionExecution, resolved: Resolved, schemas: PlanningSchemaRegistry, at: string) => {
|
|
9
|
+
set: ChangeSet;
|
|
10
|
+
empty: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Who wrote it — the SCOPE's identity, never the execution's.
|
|
14
|
+
*
|
|
15
|
+
* `profileId`, `userId`, `service` and `channel` come only from the scope (the server builds it
|
|
16
|
+
* from the authenticated request); the descriptive `agent`/`runId` an in-process caller passes on
|
|
17
|
+
* the execution are kept unless the scope's own actor names them.
|
|
18
|
+
*/
|
|
19
|
+
export declare const actorOf: (scope: PlanningScope, exec: TransitionExecution) => TransitionActor;
|
|
20
|
+
/** Step 11's record: the event as it is appended, `pending`. */
|
|
21
|
+
export declare const transitionOf: (params: {
|
|
22
|
+
exec: TransitionExecution;
|
|
23
|
+
resolved: Resolved;
|
|
24
|
+
scope: PlanningScope;
|
|
25
|
+
set: ChangeSet;
|
|
26
|
+
cardId: string;
|
|
27
|
+
seq: number;
|
|
28
|
+
project?: string;
|
|
29
|
+
at: string;
|
|
30
|
+
}) => Transition;
|
|
31
|
+
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/executor/changes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EAAE,sBAAsB,EAAE,aAAa,EAAqB,UAAU,EAAE,eAAe,EAChG,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C;;;;GAIG;AACH,eAAO,MAAM,WAAW,SAChB,mBAAmB,YAAY,QAAQ,WAAW,sBAAsB,MAAM,MAAM,KACzF;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAKlC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,UAAW,aAAa,QAAQ,mBAAmB,KAAG,eAMxE,CAAA;AAIF,gEAAgE;AAChE,eAAO,MAAM,YAAY,WAAY;IACnC,IAAI,EAAE,mBAAmB,CAAA;IACzB,QAAQ,EAAE,QAAQ,CAAA;IAClB,KAAK,EAAE,aAAa,CAAA;IACpB,GAAG,EAAE,SAAS,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;CACX,KAAG,UA0BH,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CommitState, computeChanges, isEmptyChange, TransitionAction } from '@owlmeans/planning';
|
|
2
|
+
const clean = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined));
|
|
3
|
+
/**
|
|
4
|
+
* Step 9: the recorded `changes`/`unset`, and whether an update wrote nothing.
|
|
5
|
+
*
|
|
6
|
+
* @throws {IllegalTransition | PlanningError}
|
|
7
|
+
*/
|
|
8
|
+
export const changeSetOf = (exec, resolved, schemas, at) => {
|
|
9
|
+
const set = computeChanges(resolved.card, exec, resolved.type, schemas, at, { slot: resolved.slot });
|
|
10
|
+
const empty = exec.action === TransitionAction.Update && isEmptyChange(set);
|
|
11
|
+
return { set, empty };
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Who wrote it — the SCOPE's identity, never the execution's.
|
|
15
|
+
*
|
|
16
|
+
* `profileId`, `userId`, `service` and `channel` come only from the scope (the server builds it
|
|
17
|
+
* from the authenticated request); the descriptive `agent`/`runId` an in-process caller passes on
|
|
18
|
+
* the execution are kept unless the scope's own actor names them.
|
|
19
|
+
*/
|
|
20
|
+
export const actorOf = (scope, exec) => clean({
|
|
21
|
+
agent: exec.actor?.agent,
|
|
22
|
+
runId: exec.actor?.runId,
|
|
23
|
+
...clean({ profileId: scope.profileId, userId: scope.userId, service: scope.service }),
|
|
24
|
+
...clean(scope.actor ?? {}),
|
|
25
|
+
channel: scope.channel ?? scope.actor?.channel,
|
|
26
|
+
});
|
|
27
|
+
const withFrom = (link, card) => ({ ...link, from: link.from ?? card });
|
|
28
|
+
/** Step 11's record: the event as it is appended, `pending`. */
|
|
29
|
+
export const transitionOf = (params) => {
|
|
30
|
+
const { exec, resolved, scope, set, cardId, seq, project, at } = params;
|
|
31
|
+
const kind = resolved.create ? exec.card.kind : resolved.card.kind;
|
|
32
|
+
return clean({
|
|
33
|
+
entityId: scope.entityId,
|
|
34
|
+
card: cardId,
|
|
35
|
+
kind,
|
|
36
|
+
type: resolved.type.type,
|
|
37
|
+
project,
|
|
38
|
+
seq,
|
|
39
|
+
action: exec.action,
|
|
40
|
+
flow: set.flow,
|
|
41
|
+
transition: exec.action === TransitionAction.Transit ? exec.transition : undefined,
|
|
42
|
+
from: set.from,
|
|
43
|
+
to: set.to,
|
|
44
|
+
changes: set.changes,
|
|
45
|
+
unset: set.unset.length > 0 ? set.unset : undefined,
|
|
46
|
+
link: exec.link != null && exec.action !== TransitionAction.Create ? withFrom(exec.link, cardId) : undefined,
|
|
47
|
+
links: resolved.create && (exec.links?.length ?? 0) > 0 ? exec.links.map(link => withFrom(link, cardId)) : undefined,
|
|
48
|
+
actor: actorOf(scope, exec),
|
|
49
|
+
cause: exec.cause,
|
|
50
|
+
key: exec.key,
|
|
51
|
+
at,
|
|
52
|
+
commit: { state: CommitState.Pending },
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.js","sourceRoot":"","sources":["../../src/executor/changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAOjG,MAAM,KAAK,GAAG,CAAmB,MAAS,EAAK,EAAE,CAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,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,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QACrH,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;QAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,EAAE;QACF,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,EAAE;KACvC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PlanningExecContext, PlanningPlugin, PlanningScope, TransitionExecution } from '@owlmeans/planning';
|
|
2
|
+
import type { PluginRegistry } from '../registry.js';
|
|
3
|
+
import type { Resolved } from './resolve.js';
|
|
4
|
+
export declare const takenProbe: (resolved: Resolved, scope: PlanningScope, parent: string | undefined) => (code: string) => Promise<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Step 8: the code a new card gets, or the check a changed code passes.
|
|
7
|
+
*
|
|
8
|
+
* A caller-supplied code is checked for uniqueness; otherwise the plugins' `mintCode` chain answers
|
|
9
|
+
* (first answer wins, and is checked too); otherwise the type's policy mints one — a slug policy
|
|
10
|
+
* derives it from the title. A type with no policy and no supplied code gets none.
|
|
11
|
+
*
|
|
12
|
+
* @throws {CodeTaken}
|
|
13
|
+
*/
|
|
14
|
+
export declare const assignCode: (exec: TransitionExecution, resolved: Resolved, scope: PlanningScope, registry: PluginRegistry, contextOf: (plugin: PlanningPlugin) => PlanningExecContext) => Promise<TransitionExecution>;
|
|
15
|
+
//# sourceMappingURL=code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/executor/code.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EACpF,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAW5C,eAAO,MAAM,UAAU,aAAc,QAAQ,SAAS,aAAa,UAAU,MAAM,GAAG,SAAS,YAGzE,MAAM,KAAG,OAAO,CAAC,OAAO,CAE7C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,SACf,mBAAmB,YACf,QAAQ,SACX,aAAa,YACV,cAAc,aACb,CAAC,MAAM,EAAE,cAAc,KAAK,mBAAmB,KACzD,OAAO,CAAC,mBAAmB,CAwC7B,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CODE_MINT_ATTEMPTS, CodeScope, CodeStyle, CodeTaken, mintCode, TransitionAction, } from '@owlmeans/planning';
|
|
2
|
+
/** The criteria a code must be unique within — the policy's scope, `parent` when there is none. */
|
|
3
|
+
const scopeCriteria = (scope, type, parent, policy) => ({
|
|
4
|
+
entityId: scope.entityId,
|
|
5
|
+
type,
|
|
6
|
+
...((policy?.uniqueWithin ?? CodeScope.Parent) === CodeScope.Parent ? { parent: parent ?? null } : {}),
|
|
7
|
+
});
|
|
8
|
+
export const takenProbe = (resolved, scope, parent) => {
|
|
9
|
+
const base = scopeCriteria(scope, resolved.type.type, parent, resolved.type.code);
|
|
10
|
+
return async (code) => await resolved.store.cards.count({ ...base, code }) > 0;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Step 8: the code a new card gets, or the check a changed code passes.
|
|
14
|
+
*
|
|
15
|
+
* A caller-supplied code is checked for uniqueness; otherwise the plugins' `mintCode` chain answers
|
|
16
|
+
* (first answer wins, and is checked too); otherwise the type's policy mints one — a slug policy
|
|
17
|
+
* derives it from the title. A type with no policy and no supplied code gets none.
|
|
18
|
+
*
|
|
19
|
+
* @throws {CodeTaken}
|
|
20
|
+
*/
|
|
21
|
+
export const assignCode = async (exec, resolved, scope, registry, contextOf) => {
|
|
22
|
+
const policy = resolved.type.code;
|
|
23
|
+
if (exec.action !== TransitionAction.Create) {
|
|
24
|
+
const code = exec.changes?.code;
|
|
25
|
+
if (code != null && code !== resolved.card?.code
|
|
26
|
+
&& await takenProbe(resolved, scope, exec.changes?.parent ?? resolved.card?.parent)(code)) {
|
|
27
|
+
throw new CodeTaken(code);
|
|
28
|
+
}
|
|
29
|
+
return exec;
|
|
30
|
+
}
|
|
31
|
+
const draft = exec.card;
|
|
32
|
+
const taken = takenProbe(resolved, scope, draft.parent);
|
|
33
|
+
if (draft.code != null && draft.code !== '') {
|
|
34
|
+
if (await taken(draft.code)) {
|
|
35
|
+
throw new CodeTaken(draft.code);
|
|
36
|
+
}
|
|
37
|
+
return exec;
|
|
38
|
+
}
|
|
39
|
+
if (policy == null) {
|
|
40
|
+
return exec;
|
|
41
|
+
}
|
|
42
|
+
let code = await registry.mintCode(draft, taken, contextOf);
|
|
43
|
+
if (code != null) {
|
|
44
|
+
if (await taken(code)) {
|
|
45
|
+
throw new CodeTaken(code);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const count = policy.style === CodeStyle.Sequential
|
|
50
|
+
? await resolved.store.cards.count(scopeCriteria(scope, draft.type, draft.parent, policy))
|
|
51
|
+
: undefined;
|
|
52
|
+
code = await mintCode(policy, taken, CODE_MINT_ATTEMPTS, {
|
|
53
|
+
...(policy.style === CodeStyle.Slug ? { seed: draft.title } : {}),
|
|
54
|
+
...(count != null ? { count } : {}),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return { ...exec, card: { ...draft, code } };
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.js","sourceRoot":"","sources":["../../src/executor/code.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,GAChF,MAAM,oBAA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AAC,SAAS,CAAA;QACb,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE;YACvD,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpC,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,CAAA;AAC9C,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExecuteOptions, PlanningStore, Transition, TransitionReceipt } from '@owlmeans/planning';
|
|
2
|
+
/**
|
|
3
|
+
* A receipt for an appended (or idempotently found) transition.
|
|
4
|
+
*
|
|
5
|
+
* `committed()` waits on the store's commit source; a store without one (a foreign provider that
|
|
6
|
+
* applies writes itself) answers the card as it reads now. With `wait: true` the receipt is
|
|
7
|
+
* returned only once the commit landed — `CommitFailed` / `CommitTimeout` otherwise.
|
|
8
|
+
*
|
|
9
|
+
* @throws {CommitFailed | CommitTimeout} in wait mode
|
|
10
|
+
*/
|
|
11
|
+
export declare const makeReceipt: (store: PlanningStore, transition: Transition, opts?: ExecuteOptions) => Promise<TransitionReceipt>;
|
|
12
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../src/executor/receipt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACI,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAC3E,MAAM,oBAAoB,CAAA;AAmC3B;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,UACf,aAAa,cAAc,UAAU,SAAS,cAAc,KAClE,OAAO,CAAC,iBAAiB,CAgB3B,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CommitState, DEFAULT_COMMIT_TIMEOUT, TransitionAction } from '@owlmeans/planning';
|
|
2
|
+
const clean = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined));
|
|
3
|
+
const statusOf = async (store, transition) => {
|
|
4
|
+
if (store.commits == null || transition.id == null) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
return await store.commits.status(transition.id);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/** The transition as its latest commit status reports it, and the card when that commit landed. */
|
|
15
|
+
const viewOf = async (store, transition) => {
|
|
16
|
+
const status = await statusOf(store, transition);
|
|
17
|
+
if (status == null) {
|
|
18
|
+
return { transition };
|
|
19
|
+
}
|
|
20
|
+
const view = {
|
|
21
|
+
transition: { ...transition, commit: clean({ state: status.state, at: status.at, error: status.error }) },
|
|
22
|
+
};
|
|
23
|
+
if (status.state === CommitState.Committed) {
|
|
24
|
+
view.card = status.card !== undefined
|
|
25
|
+
? status.card
|
|
26
|
+
: transition.action === TransitionAction.Delete
|
|
27
|
+
? null
|
|
28
|
+
: await store.cards.get(transition.card, transition.entityId);
|
|
29
|
+
}
|
|
30
|
+
return view;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A receipt for an appended (or idempotently found) transition.
|
|
34
|
+
*
|
|
35
|
+
* `committed()` waits on the store's commit source; a store without one (a foreign provider that
|
|
36
|
+
* applies writes itself) answers the card as it reads now. With `wait: true` the receipt is
|
|
37
|
+
* returned only once the commit landed — `CommitFailed` / `CommitTimeout` otherwise.
|
|
38
|
+
*
|
|
39
|
+
* @throws {CommitFailed | CommitTimeout} in wait mode
|
|
40
|
+
*/
|
|
41
|
+
export const makeReceipt = async (store, transition, opts) => {
|
|
42
|
+
const committed = async (waitOpts) => {
|
|
43
|
+
if (store.commits == null || transition.id == null) {
|
|
44
|
+
return await store.cards.get(transition.card, transition.entityId);
|
|
45
|
+
}
|
|
46
|
+
return await store.commits.wait(transition.id, { timeout: waitOpts?.timeout ?? DEFAULT_COMMIT_TIMEOUT });
|
|
47
|
+
};
|
|
48
|
+
let view = await viewOf(store, transition);
|
|
49
|
+
if (opts?.wait === true && view.transition.commit.state !== CommitState.Committed) {
|
|
50
|
+
const card = await committed({ timeout: opts.timeout });
|
|
51
|
+
view = await viewOf(store, transition);
|
|
52
|
+
view.card = card;
|
|
53
|
+
}
|
|
54
|
+
return { ...view, committed };
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=receipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../src/executor/receipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAK1F,MAAM,KAAK,GAAG,CAAmB,MAAS,EAAK,EAAE,CAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAM,CAAA;AAE5F,MAAM,QAAQ,GAAG,KAAK,EAAE,KAAoB,EAAE,UAAsB,EAAgC,EAAE;IACpG,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI,IAAI,UAAU,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;QACnD,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,CAAC;QACH,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI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GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;QACpE,CAAC;QACD,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,sBAAsB,EAAE,CAAC,CAAA;IAC1G,CAAC,CAAA;IAED,IAAI,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;IAC1C,IAAI,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,KAAK,WAAW,CAAC,SAAS,EAAE,CAAC;QAClF,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;QACvD,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,OAAO,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAA;AAC/B,CAAC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WorkcardKind } from '@owlmeans/planning';
|
|
2
|
+
import type { AnyTypeSchema, PlanningFacade, PlanningStore, SpecificationSlot, StatusFlowSchema, TransitionExecution, Workcard } from '@owlmeans/planning';
|
|
3
|
+
import type { PlanningRuntime } from '../service.js';
|
|
4
|
+
/** Everything the steps after resolution read about an execution. */
|
|
5
|
+
export interface Resolved {
|
|
6
|
+
create: boolean;
|
|
7
|
+
/** The existing card (not a create). */
|
|
8
|
+
card?: Workcard;
|
|
9
|
+
type: AnyTypeSchema;
|
|
10
|
+
flowId: string;
|
|
11
|
+
flow: StatusFlowSchema;
|
|
12
|
+
/** The primary parent, when it resolves. */
|
|
13
|
+
parent?: Workcard;
|
|
14
|
+
/** The slot a specification belongs to. */
|
|
15
|
+
slot?: SpecificationSlot;
|
|
16
|
+
/** The store the type is written to. */
|
|
17
|
+
store: PlanningStore;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Step 1: a deep copy with trimmed text, `parents ∋ parent` on a draft, and no duplicate `unset`
|
|
21
|
+
* paths. The caller's object is never touched.
|
|
22
|
+
*/
|
|
23
|
+
export declare const normalizeExecution: (input: TransitionExecution) => TransitionExecution;
|
|
24
|
+
/** The parent type's rule for a child of `kind`/`type`. @throws {CardTypeNotAllowed} */
|
|
25
|
+
export declare const assertChildAllowed: (runtime: PlanningRuntime, parent: Workcard, kind: WorkcardKind, type: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Step 4: the card, its type and flow, its parent and — for a specification — its slot.
|
|
28
|
+
*
|
|
29
|
+
* @throws {WorkcardNotFound | PlanningScopeMismatch | UnknownWorkcardType | UnknownStatusFlow}
|
|
30
|
+
* @throws {ParentNotFound | CardTypeNotAllowed | PlanningError}
|
|
31
|
+
*/
|
|
32
|
+
export declare const resolveExecution: (runtime: PlanningRuntime, facade: PlanningFacade, exec: TransitionExecution) => Promise<Resolved>;
|
|
33
|
+
/** The project a transition is filed under: a project's own id, else its parent's project. */
|
|
34
|
+
export declare const projectFor: (resolved: Resolved, exec: TransitionExecution, cardId: string) => string | undefined;
|
|
35
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/executor/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAEkE,YAAY,EACpF,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EACV,aAAa,EAAE,cAAc,EAAE,aAAa,EAAoC,iBAAiB,EACjG,gBAAgB,EAAE,mBAAmB,EAAE,QAAQ,EAChD,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,OAAO,CAAA;IACf,wCAAwC;IACxC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,gBAAgB,CAAA;IACtB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,QAAQ,CAAA;IACjB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,wCAAwC;IACxC,KAAK,EAAE,aAAa,CAAA;CACrB;AAmBD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UAAW,mBAAmB,KAAG,mBAc/D,CAAA;AAED,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,YACpB,eAAe,UAAU,QAAQ,QAAQ,YAAY,QAAQ,MAAM,KAC3E,IAYF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAClB,eAAe,UAAU,cAAc,QAAQ,mBAAmB,KAC1E,OAAO,CAAC,QAAQ,CAyElB,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,UAAU,aAAc,QAAQ,QAAQ,mBAAmB,UAAU,MAAM,KAAG,MAAM,GAAG,SASnG,CAAA"}
|