@owlmeans/viable-common 0.0.32 → 0.0.34
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 +3 -3
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +109 -57
- package/build/ba/index.d.ts +0 -1
- package/build/ba/index.d.ts.map +1 -1
- package/build/ba/index.js +0 -1
- package/build/ba/index.js.map +1 -1
- package/build/blueprint/case.js +3 -3
- package/build/blueprint/consts.d.ts +38 -0
- package/build/blueprint/consts.d.ts.map +1 -1
- package/build/blueprint/consts.js +40 -0
- package/build/blueprint/consts.js.map +1 -1
- package/build/blueprint/index.d.ts +0 -3
- package/build/blueprint/index.d.ts.map +1 -1
- package/build/blueprint/index.js +0 -3
- package/build/blueprint/index.js.map +1 -1
- package/build/blueprint/types.d.ts +5 -5
- package/build/connect/errors.d.ts +23 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +50 -0
- package/build/connect/errors.js.map +1 -1
- package/build/intent/consts.d.ts +57 -0
- package/build/intent/consts.d.ts.map +1 -0
- package/build/intent/consts.js +58 -0
- package/build/intent/consts.js.map +1 -0
- package/build/intent/entrypoints.d.ts +27 -0
- package/build/intent/entrypoints.d.ts.map +1 -0
- package/build/intent/entrypoints.js +28 -0
- package/build/intent/entrypoints.js.map +1 -0
- package/build/intent/errors.d.ts +20 -0
- package/build/intent/errors.d.ts.map +1 -0
- package/build/intent/errors.js +28 -0
- package/build/intent/errors.js.map +1 -0
- package/build/intent/flow.d.ts +17 -0
- package/build/intent/flow.d.ts.map +1 -0
- package/build/intent/flow.js +65 -0
- package/build/intent/flow.js.map +1 -0
- package/build/intent/index.d.ts +7 -0
- package/build/intent/index.d.ts.map +1 -0
- package/build/intent/index.js +6 -0
- package/build/intent/index.js.map +1 -0
- package/build/intent/schemas.d.ts +10 -0
- package/build/intent/schemas.d.ts.map +1 -0
- package/build/intent/schemas.js +24 -0
- package/build/intent/schemas.js.map +1 -0
- package/build/intent/types.d.ts +40 -0
- package/build/intent/types.d.ts.map +1 -0
- package/build/intent/types.js +2 -0
- package/build/intent/types.js.map +1 -0
- package/build/skills/catalogue.d.ts.map +1 -1
- package/build/skills/catalogue.js +15 -1
- package/build/skills/catalogue.js.map +1 -1
- package/build/skills/consts.d.ts +0 -34
- package/build/skills/consts.d.ts.map +1 -1
- package/build/skills/consts.js +0 -106
- package/build/skills/consts.js.map +1 -1
- package/build/skills/index.d.ts +0 -1
- package/build/skills/index.d.ts.map +1 -1
- package/build/skills/index.js +0 -1
- package/build/skills/index.js.map +1 -1
- package/build/skills/roles.d.ts +0 -9
- package/build/skills/roles.d.ts.map +1 -1
- package/build/skills/roles.js +0 -226
- package/build/skills/roles.js.map +1 -1
- package/package.json +18 -8
- package/src/ba/index.ts +0 -1
- package/src/blueprint/consts.ts +40 -0
- package/src/blueprint/index.ts +0 -3
- package/src/blueprint/types.ts +5 -5
- package/src/connect/errors.ts +55 -0
- package/src/intent/consts.ts +66 -0
- package/src/intent/entrypoints.ts +43 -0
- package/src/intent/errors.ts +33 -0
- package/src/intent/flow.ts +67 -0
- package/src/intent/index.ts +6 -0
- package/src/intent/schemas.ts +27 -0
- package/src/intent/types.ts +45 -0
- package/src/skills/consts.ts +0 -112
- package/src/skills/index.ts +0 -1
- package/src/skills/roles.ts +0 -267
- package/tests/blueprint.spec.ts +2 -66
- package/tests/connect-errors.spec.ts +31 -1
- package/tests/error-status.spec.ts +6 -1
- package/tests/intent.spec.ts +121 -0
- package/src/ba/schemas.ts +0 -196
- package/src/blueprint/case.ts +0 -320
- package/src/blueprint/resolve.ts +0 -136
- package/src/blueprint/schemas.ts +0 -44
- package/src/skills/catalogue.ts +0 -1850
- package/tests/skills.spec.ts +0 -110
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/connect/errors.ts"],"names":[],"mappings":"A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,kBAAkB,CAAC,YAAY,CAAC,CAAA;AAC/C,cAAc,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAA;AACzD,cAAc,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;AACrD,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;AACnD,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;AACnD,cAAc,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;AACvD,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;AACnD,cAAc,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;AACtD,cAAc,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The intent-first hand-off — how a prompt typed on the public site reaches the platform.
|
|
3
|
+
*
|
|
4
|
+
* A visitor types the idea for a project on the marketing site before they have an account. The
|
|
5
|
+
* site cannot write into the platform's browser storage (IndexedDB is per origin) and must not put
|
|
6
|
+
* the prompt in a URL, so the prompt takes a short detour through the platform's own cache: the
|
|
7
|
+
* site stashes it behind an unguessable reference, sends the browser to the platform with only that
|
|
8
|
+
* reference, and the platform picks the prompt up once — after which it lives in the visitor's own
|
|
9
|
+
* browser until they decide what to do with it.
|
|
10
|
+
*
|
|
11
|
+
* Everything here is serializable and runtime-free: the site, the manager API and the manager web
|
|
12
|
+
* read the same declarations, and none of them may reinvent a name the others parse.
|
|
13
|
+
*/
|
|
14
|
+
/** Every address of the hand-off. API routes are guest routes; the landing is a screen. */
|
|
15
|
+
export declare const intent: Readonly<{
|
|
16
|
+
readonly base: 'viable:manager-api:intent:base';
|
|
17
|
+
readonly stash: 'viable:manager-api:intent:stash';
|
|
18
|
+
readonly pickup: 'viable:manager-api:intent:pickup';
|
|
19
|
+
readonly landing: 'viable:manager-web:intent:landing';
|
|
20
|
+
}>;
|
|
21
|
+
/** Where the guest API lives, and the screen the visitor's browser is sent to. */
|
|
22
|
+
export declare const INTENT_API_PATH = "/public/intent";
|
|
23
|
+
export declare const INTENT_LANDING_PATH = "/start";
|
|
24
|
+
/** The flow the two sides walk. */
|
|
25
|
+
export declare const INTENT_FLOW = "viable:intent";
|
|
26
|
+
/**
|
|
27
|
+
* How long the platform keeps a stashed prompt waiting for pickup. Short on purpose: the pickup
|
|
28
|
+
* happens the moment the browser lands, so anything older was abandoned, and a prompt is personal
|
|
29
|
+
* data the platform has no business holding once nobody is coming for it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const INTENT_TTL_SECONDS = 120;
|
|
32
|
+
/** The longest prompt the platform will create a project from (`PromptSchema` in viable). */
|
|
33
|
+
export declare const INTENT_PROMPT_MAX = 8192;
|
|
34
|
+
/**
|
|
35
|
+
* The reference's shape: `createIdOfLength(24)` — Base58, so no `0`, `O`, `I` or `l`. Anything else
|
|
36
|
+
* is refused before the cache is asked, which keeps a crafted reference from ever being a key.
|
|
37
|
+
*/
|
|
38
|
+
export declare const INTENT_REF_LENGTH = 24;
|
|
39
|
+
export declare const INTENT_REF_PATTERN = "^[1-9A-HJ-NP-Za-km-z]{24}$";
|
|
40
|
+
/** The flow payload key carrying the reference — short, because a payload is CSV-joined. */
|
|
41
|
+
export declare const INTENT_PAYLOAD_REF = "ref";
|
|
42
|
+
/** How long the visitor's draft survives in their own browser waiting for a decision. */
|
|
43
|
+
export declare const INTENT_DRAFT_TTL_MS: number;
|
|
44
|
+
/** How long a suspended landing waits while the visitor signs in or registers. */
|
|
45
|
+
export declare const INTENT_SUSPEND_TTL_MS: number;
|
|
46
|
+
/** Steps of {@link intentFlow}, exported so a screen never spells one as a literal. */
|
|
47
|
+
export declare enum IntentFlowStep {
|
|
48
|
+
/** The public site: the prompt is typed and stashed. */
|
|
49
|
+
Compose = "compose",
|
|
50
|
+
/** The platform's landing screen: the stash is picked up. */
|
|
51
|
+
Land = "land",
|
|
52
|
+
/** The platform's own sign-in dispatcher. */
|
|
53
|
+
SignIn = "sign-in",
|
|
54
|
+
/** The platform's home screen, where the draft is offered back. */
|
|
55
|
+
Review = "review"
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/intent/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,2FAA2F;AAC3F,eAAO,MAAM,MAAM;mBACX,gCAAgC;oBAC/B,iCAAiC;qBAChC,kCAAkC;sBACjC,mCAAmC;EACnC,CAAA;AAEX,kFAAkF;AAClF,eAAO,MAAM,eAAe,mBAAmB,CAAA;AAC/C,eAAO,MAAM,mBAAmB,WAAW,CAAA;AAE3C,mCAAmC;AACnC,eAAO,MAAM,WAAW,kBAAkB,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,kBAAkB,+BAA+B,CAAA;AAE9D,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,QAAsB,CAAA;AAEtD,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,QAAiB,CAAA;AAEnD,uFAAuF;AACvF,oBAAY,cAAc;IACxB,wDAAwD;IACxD,OAAO,YAAY;IACnB,6DAA6D;IAC7D,IAAI,SAAS;IACb,6CAA6C;IAC7C,MAAM,YAAY;IAClB,mEAAmE;IACnE,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The intent-first hand-off — how a prompt typed on the public site reaches the platform.
|
|
3
|
+
*
|
|
4
|
+
* A visitor types the idea for a project on the marketing site before they have an account. The
|
|
5
|
+
* site cannot write into the platform's browser storage (IndexedDB is per origin) and must not put
|
|
6
|
+
* the prompt in a URL, so the prompt takes a short detour through the platform's own cache: the
|
|
7
|
+
* site stashes it behind an unguessable reference, sends the browser to the platform with only that
|
|
8
|
+
* reference, and the platform picks the prompt up once — after which it lives in the visitor's own
|
|
9
|
+
* browser until they decide what to do with it.
|
|
10
|
+
*
|
|
11
|
+
* Everything here is serializable and runtime-free: the site, the manager API and the manager web
|
|
12
|
+
* read the same declarations, and none of them may reinvent a name the others parse.
|
|
13
|
+
*/
|
|
14
|
+
/** Every address of the hand-off. API routes are guest routes; the landing is a screen. */
|
|
15
|
+
export const intent = Object.freeze({
|
|
16
|
+
base: 'viable:manager-api:intent:base',
|
|
17
|
+
stash: 'viable:manager-api:intent:stash',
|
|
18
|
+
pickup: 'viable:manager-api:intent:pickup',
|
|
19
|
+
landing: 'viable:manager-web:intent:landing',
|
|
20
|
+
});
|
|
21
|
+
/** Where the guest API lives, and the screen the visitor's browser is sent to. */
|
|
22
|
+
export const INTENT_API_PATH = '/public/intent';
|
|
23
|
+
export const INTENT_LANDING_PATH = '/start';
|
|
24
|
+
/** The flow the two sides walk. */
|
|
25
|
+
export const INTENT_FLOW = 'viable:intent';
|
|
26
|
+
/**
|
|
27
|
+
* How long the platform keeps a stashed prompt waiting for pickup. Short on purpose: the pickup
|
|
28
|
+
* happens the moment the browser lands, so anything older was abandoned, and a prompt is personal
|
|
29
|
+
* data the platform has no business holding once nobody is coming for it.
|
|
30
|
+
*/
|
|
31
|
+
export const INTENT_TTL_SECONDS = 120;
|
|
32
|
+
/** The longest prompt the platform will create a project from (`PromptSchema` in viable). */
|
|
33
|
+
export const INTENT_PROMPT_MAX = 8192;
|
|
34
|
+
/**
|
|
35
|
+
* The reference's shape: `createIdOfLength(24)` — Base58, so no `0`, `O`, `I` or `l`. Anything else
|
|
36
|
+
* is refused before the cache is asked, which keeps a crafted reference from ever being a key.
|
|
37
|
+
*/
|
|
38
|
+
export const INTENT_REF_LENGTH = 24;
|
|
39
|
+
export const INTENT_REF_PATTERN = '^[1-9A-HJ-NP-Za-km-z]{24}$';
|
|
40
|
+
/** The flow payload key carrying the reference — short, because a payload is CSV-joined. */
|
|
41
|
+
export const INTENT_PAYLOAD_REF = 'ref';
|
|
42
|
+
/** How long the visitor's draft survives in their own browser waiting for a decision. */
|
|
43
|
+
export const INTENT_DRAFT_TTL_MS = 24 * 60 * 60 * 1000;
|
|
44
|
+
/** How long a suspended landing waits while the visitor signs in or registers. */
|
|
45
|
+
export const INTENT_SUSPEND_TTL_MS = 30 * 60 * 1000;
|
|
46
|
+
/** Steps of {@link intentFlow}, exported so a screen never spells one as a literal. */
|
|
47
|
+
export var IntentFlowStep;
|
|
48
|
+
(function (IntentFlowStep) {
|
|
49
|
+
/** The public site: the prompt is typed and stashed. */
|
|
50
|
+
IntentFlowStep["Compose"] = "compose";
|
|
51
|
+
/** The platform's landing screen: the stash is picked up. */
|
|
52
|
+
IntentFlowStep["Land"] = "land";
|
|
53
|
+
/** The platform's own sign-in dispatcher. */
|
|
54
|
+
IntentFlowStep["SignIn"] = "sign-in";
|
|
55
|
+
/** The platform's home screen, where the draft is offered back. */
|
|
56
|
+
IntentFlowStep["Review"] = "review";
|
|
57
|
+
})(IntentFlowStep || (IntentFlowStep = {}));
|
|
58
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/intent/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,2FAA2F;AAC3F,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,gCAAgC;IACtC,KAAK,EAAE,iCAAiC;IACxC,MAAM,EAAE,kCAAkC;IAC1C,OAAO,EAAE,mCAAmC;CACpC,CAAC,CAAA;AAEX,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAA;AAE3C,mCAAmC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAA;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAErC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAA;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAA4B,CAAA;AAE9D,4FAA4F;AAC5F,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAA;AAEvC,yFAAyF;AACzF,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAEtD,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAEnD,uFAAuF;AACvF,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,wDAAwD;IACxD,qCAAmB,CAAA;IACnB,6DAA6D;IAC7D,+BAAa,CAAA;IACb,6CAA6C;IAC7C,oCAAkB,CAAA;IAClB,mEAAmE;IACnE,mCAAiB,CAAA;AACnB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IntentPickupBody, IntentPickupResult, IntentProtocolOptions, IntentStashBody, IntentStashResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Declare the intent-first hand-off: two GUEST API routes and the landing screen's address.
|
|
4
|
+
*
|
|
5
|
+
* No guard and no gate anywhere on the API — the caller is a visitor who has no account yet — and
|
|
6
|
+
* no `service` on any route: each consumer fills it in (the public site names the platform's
|
|
7
|
+
* services in its own configuration; the manager binds them to its own).
|
|
8
|
+
*
|
|
9
|
+
* TODO(cors): these routes ride the framework's global `origin: '*'` CORS policy (no credentials).
|
|
10
|
+
* If viable ever restricts allowed origins globally, this entrypoint must keep answering the public
|
|
11
|
+
* site's origins — owlmeans.com, owlmeans.pl and, in dev/stage, `http://localhost:4321`.
|
|
12
|
+
*
|
|
13
|
+
* The landing screen is `sticky`, like the OAuth consent screens: it is an ordinary in-app screen
|
|
14
|
+
* that a visitor arrives at directly from another origin.
|
|
15
|
+
*/
|
|
16
|
+
export declare const makeIntentProtocols: (opts?: IntentProtocolOptions) => {
|
|
17
|
+
base: import("@owlmeans/entrypoint").EntrypointProtocol<import("@owlmeans/entrypoint").OpenRequest, import("@owlmeans/entrypoint").OpenValue>;
|
|
18
|
+
stash: import("@owlmeans/entrypoint").EntrypointProtocol<{
|
|
19
|
+
body: IntentStashBody;
|
|
20
|
+
}, IntentStashResult>;
|
|
21
|
+
pickup: import("@owlmeans/entrypoint").EntrypointProtocol<{
|
|
22
|
+
body: IntentPickupBody;
|
|
23
|
+
}, IntentPickupResult>;
|
|
24
|
+
landing: import("@owlmeans/entrypoint").EntrypointProtocol<import("@owlmeans/entrypoint").OpenRequest, import("@owlmeans/entrypoint").OpenValue>;
|
|
25
|
+
};
|
|
26
|
+
export type IntentProtocols = ReturnType<typeof makeIntentProtocols>;
|
|
27
|
+
//# sourceMappingURL=entrypoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../../src/intent/entrypoints.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAChG,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,UAAU,qBAAqB;;;;;;;;;CAkB9D,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { contract, openProtocol, protocol, typed } from '@owlmeans/entrypoint';
|
|
2
|
+
import { frontend, route, RouteMethod } from '@owlmeans/route';
|
|
3
|
+
import { INTENT_API_PATH, INTENT_LANDING_PATH, intent } from './consts.js';
|
|
4
|
+
import { IntentPickupBodySchema, IntentStashBodySchema } from './schemas.js';
|
|
5
|
+
/**
|
|
6
|
+
* Declare the intent-first hand-off: two GUEST API routes and the landing screen's address.
|
|
7
|
+
*
|
|
8
|
+
* No guard and no gate anywhere on the API — the caller is a visitor who has no account yet — and
|
|
9
|
+
* no `service` on any route: each consumer fills it in (the public site names the platform's
|
|
10
|
+
* services in its own configuration; the manager binds them to its own).
|
|
11
|
+
*
|
|
12
|
+
* TODO(cors): these routes ride the framework's global `origin: '*'` CORS policy (no credentials).
|
|
13
|
+
* If viable ever restricts allowed origins globally, this entrypoint must keep answering the public
|
|
14
|
+
* site's origins — owlmeans.com, owlmeans.pl and, in dev/stage, `http://localhost:4321`.
|
|
15
|
+
*
|
|
16
|
+
* The landing screen is `sticky`, like the OAuth consent screens: it is an ordinary in-app screen
|
|
17
|
+
* that a visitor arrives at directly from another origin.
|
|
18
|
+
*/
|
|
19
|
+
export const makeIntentProtocols = (opts = {}) => {
|
|
20
|
+
const base = openProtocol(route(intent.base, opts.path ?? INTENT_API_PATH));
|
|
21
|
+
return {
|
|
22
|
+
base,
|
|
23
|
+
stash: protocol(route(intent.stash, '/', { parent: base, method: RouteMethod.POST }), contract.request({ body: typed(IntentStashBodySchema) }, typed())),
|
|
24
|
+
pickup: protocol(route(intent.pickup, '/pickup', { parent: base, method: RouteMethod.POST }), contract.request({ body: typed(IntentPickupBodySchema) }, typed())),
|
|
25
|
+
landing: openProtocol(route(intent.landing, opts.landing ?? INTENT_LANDING_PATH, frontend()), { sticky: true }),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=entrypoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources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EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAChH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ResilientError } from '@owlmeans/error';
|
|
2
|
+
export declare class IntentError extends ResilientError {
|
|
3
|
+
static typeName: string;
|
|
4
|
+
constructor(message?: string);
|
|
5
|
+
}
|
|
6
|
+
/** No stashed prompt under that reference — expired, already picked up, or never existed. */
|
|
7
|
+
export declare class IntentExpired extends IntentError {
|
|
8
|
+
static typeName: string;
|
|
9
|
+
/** The reference answers nothing (any more): answered 404. */
|
|
10
|
+
static httpStatus: number;
|
|
11
|
+
constructor(message?: string);
|
|
12
|
+
}
|
|
13
|
+
/** Too many stashes or pickups from one address, or across everyone. */
|
|
14
|
+
export declare class IntentThrottled extends IntentError {
|
|
15
|
+
static typeName: string;
|
|
16
|
+
/** Answered 429. */
|
|
17
|
+
static httpStatus: number;
|
|
18
|
+
constructor(message?: string);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/intent/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,WAAY,SAAQ,cAAc;IAC7C,OAAuB,QAAQ,SAA2C;IAE1E,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,6FAA6F;AAC7F,qBAAa,aAAc,SAAQ,WAAW;IAC5C,OAAuB,QAAQ,SAAmC;IAClE,8DAA8D;IAC9D,OAAc,UAAU,SAAM;IAE9B,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,wEAAwE;AACxE,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,OAAuB,QAAQ,SAAqC;IACpE,oBAAoB;IACpB,OAAc,UAAU,SAAM;IAE9B,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ResilientError } from '@owlmeans/error';
|
|
2
|
+
export class IntentError extends ResilientError {
|
|
3
|
+
static typeName = `ViableIntent${ResilientError.typeName}`;
|
|
4
|
+
constructor(message = 'error') {
|
|
5
|
+
super(IntentError.typeName, `viable-intent:${message}`);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/** No stashed prompt under that reference — expired, already picked up, or never existed. */
|
|
9
|
+
export class IntentExpired extends IntentError {
|
|
10
|
+
static typeName = `Expired${IntentError.typeName}`;
|
|
11
|
+
/** The reference answers nothing (any more): answered 404. */
|
|
12
|
+
static httpStatus = 404;
|
|
13
|
+
constructor(message = 'error') {
|
|
14
|
+
super(`expired:${message}`);
|
|
15
|
+
this.type = IntentExpired.typeName;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Too many stashes or pickups from one address, or across everyone. */
|
|
19
|
+
export class IntentThrottled extends IntentError {
|
|
20
|
+
static typeName = `Throttled${IntentError.typeName}`;
|
|
21
|
+
/** Answered 429. */
|
|
22
|
+
static httpStatus = 429;
|
|
23
|
+
constructor(message = 'error') {
|
|
24
|
+
super(`throttled:${message}`);
|
|
25
|
+
this.type = IntentThrottled.typeName;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/intent/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,OAAO,WAAY,SAAQ,cAAc;IACtC,MAAM,CAAU,QAAQ,GAAG,eAAe,cAAc,CAAC,QAAQ,EAAE,CAAA;IAE1E,YAAY,OAAO,GAAW,OAAO;QACnC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,iBAAiB,OAAO,EAAE,CAAC,CAAA;IACzD,CAAC;CACF;AAED,6FAA6F;AAC7F,MAAM,OAAO,aAAc,SAAQ,WAAW;IACrC,MAAM,CAAU,QAAQ,GAAG,UAAU,WAAW,CAAC,QAAQ,EAAE,CAAA;IAClE,8DAA8D;IACvD,MAAM,CAAC,UAAU,GAAG,GAAG,CAAA;IAE9B,YAAY,OAAO,GAAW,OAAO;QACnC,KAAK,CAAC,WAAW,OAAO,EAAE,CAAC,CAAA;QAC3B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,QAAQ,CAAA;IACpC,CAAC;CACF;AAED,wEAAwE;AACxE,MAAM,OAAO,eAAgB,SAAQ,WAAW;IACvC,MAAM,CAAU,QAAQ,GAAG,YAAY,WAAW,CAAC,QAAQ,EAAE,CAAA;IACpE,oBAAoB;IACb,MAAM,CAAC,UAAU,GAAG,GAAG,CAAA;IAE9B,YAAY,OAAO,GAAW,OAAO;QACnC,KAAK,CAAC,aAAa,OAAO,EAAE,CAAC,CAAA;QAC7B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ShallowFlow } from '@owlmeans/flow';
|
|
2
|
+
/**
|
|
3
|
+
* The hand-off flow both sides walk.
|
|
4
|
+
*
|
|
5
|
+
* `compose` runs on the public site: the prompt is stashed and `handoff` carries the reference to
|
|
6
|
+
* `land`, whose module is the platform's landing screen — so the site redirects to
|
|
7
|
+
* `land`'s address with the payload as query. The landing then enters at `land` FRESH (the
|
|
8
|
+
* reference arrives as `?ref=`, never as a serialized token, which the platform's own sign-in
|
|
9
|
+
* parses from `?flow=` on every page), and either goes on to `review` (signed in) or parks the flow
|
|
10
|
+
* with `suspendFlow` at `sign-in`, whose non-explicit way forward is `review` — the home screen —
|
|
11
|
+
* so whichever sign-in method finishes lands there.
|
|
12
|
+
*
|
|
13
|
+
* The steps address CONCRETE entrypoint aliases, never `$`-prefixed references: this flow is never
|
|
14
|
+
* the live `FlowService` model and nothing here needs `configureFlows`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const intentFlow: ShallowFlow;
|
|
17
|
+
//# sourceMappingURL=flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/intent/flow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAKjD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,WA6CxB,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DISPATCHER } from '@owlmeans/auth';
|
|
2
|
+
import { HOME } from '@owlmeans/context';
|
|
3
|
+
import { INTENT_FLOW, INTENT_PAYLOAD_REF, intent, IntentFlowStep } from './consts.js';
|
|
4
|
+
const payloadMap = { [INTENT_PAYLOAD_REF]: 0 };
|
|
5
|
+
/**
|
|
6
|
+
* The hand-off flow both sides walk.
|
|
7
|
+
*
|
|
8
|
+
* `compose` runs on the public site: the prompt is stashed and `handoff` carries the reference to
|
|
9
|
+
* `land`, whose module is the platform's landing screen — so the site redirects to
|
|
10
|
+
* `land`'s address with the payload as query. The landing then enters at `land` FRESH (the
|
|
11
|
+
* reference arrives as `?ref=`, never as a serialized token, which the platform's own sign-in
|
|
12
|
+
* parses from `?flow=` on every page), and either goes on to `review` (signed in) or parks the flow
|
|
13
|
+
* with `suspendFlow` at `sign-in`, whose non-explicit way forward is `review` — the home screen —
|
|
14
|
+
* so whichever sign-in method finishes lands there.
|
|
15
|
+
*
|
|
16
|
+
* The steps address CONCRETE entrypoint aliases, never `$`-prefixed references: this flow is never
|
|
17
|
+
* the live `FlowService` model and nothing here needs `configureFlows`.
|
|
18
|
+
*/
|
|
19
|
+
export const intentFlow = {
|
|
20
|
+
flow: INTENT_FLOW,
|
|
21
|
+
initialStep: IntentFlowStep.Compose,
|
|
22
|
+
steps: {
|
|
23
|
+
[IntentFlowStep.Compose]: {
|
|
24
|
+
index: 0,
|
|
25
|
+
step: IntentFlowStep.Compose,
|
|
26
|
+
service: '',
|
|
27
|
+
initial: true,
|
|
28
|
+
payloadMap,
|
|
29
|
+
transitions: {
|
|
30
|
+
handoff: { transition: 'handoff', step: IntentFlowStep.Land },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
[IntentFlowStep.Land]: {
|
|
34
|
+
index: 1,
|
|
35
|
+
step: IntentFlowStep.Land,
|
|
36
|
+
service: '',
|
|
37
|
+
module: intent.landing,
|
|
38
|
+
initial: true,
|
|
39
|
+
payloadMap,
|
|
40
|
+
transitions: {
|
|
41
|
+
review: { transition: 'review', step: IntentFlowStep.Review },
|
|
42
|
+
'sign-in': { transition: 'sign-in', step: IntentFlowStep.SignIn, explicit: true },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
[IntentFlowStep.SignIn]: {
|
|
46
|
+
index: 2,
|
|
47
|
+
step: IntentFlowStep.SignIn,
|
|
48
|
+
service: '',
|
|
49
|
+
module: DISPATCHER,
|
|
50
|
+
payloadMap,
|
|
51
|
+
transitions: {
|
|
52
|
+
next: { transition: 'next', step: IntentFlowStep.Review },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
[IntentFlowStep.Review]: {
|
|
56
|
+
index: 3,
|
|
57
|
+
step: IntentFlowStep.Review,
|
|
58
|
+
service: '',
|
|
59
|
+
module: HOME,
|
|
60
|
+
payloadMap,
|
|
61
|
+
transitions: {},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/intent/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,M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cAAc,CAAC,MAAM,CAAC,EAAE;YACvB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,cAAc,CAAC,MAAM;YAC3B,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,IAAI;YACZ,UAAU;YACV,WAAW,EAAE,EAAE;SAChB;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/intent/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,mBAAmB,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/intent/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSONSchemaType } from 'ajv';
|
|
2
|
+
import type { IntentPickupBody, IntentStashBody } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The stash body. `consent` is a constant `true`, not a boolean: the data-processing confirmation is
|
|
5
|
+
* a precondition of the request existing, so the wire refuses its absence instead of the handler
|
|
6
|
+
* having to remember to look.
|
|
7
|
+
*/
|
|
8
|
+
export declare const IntentStashBodySchema: JSONSchemaType<IntentStashBody>;
|
|
9
|
+
export declare const IntentPickupBodySchema: JSONSchemaType<IntentPickupBody>;
|
|
10
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/intent/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAQjE,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,gBAAgB,CAOnE,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { INTENT_PROMPT_MAX, INTENT_REF_LENGTH, INTENT_REF_PATTERN } from './consts.js';
|
|
2
|
+
/**
|
|
3
|
+
* The stash body. `consent` is a constant `true`, not a boolean: the data-processing confirmation is
|
|
4
|
+
* a precondition of the request existing, so the wire refuses its absence instead of the handler
|
|
5
|
+
* having to remember to look.
|
|
6
|
+
*/
|
|
7
|
+
export const IntentStashBodySchema = {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
prompt: { type: 'string', minLength: 1, maxLength: INTENT_PROMPT_MAX },
|
|
11
|
+
consent: { type: 'boolean', const: true },
|
|
12
|
+
},
|
|
13
|
+
required: ['prompt', 'consent'],
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
};
|
|
16
|
+
export const IntentPickupBodySchema = {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
ref: { type: 'string', minLength: INTENT_REF_LENGTH, maxLength: INTENT_REF_LENGTH, pattern: INTENT_REF_PATTERN },
|
|
20
|
+
},
|
|
21
|
+
required: ['ref'],
|
|
22
|
+
additionalProperties: false,
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/intent/schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAoC;IACpE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE;QACtE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE;KAC1C;IACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC/B,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAqC;IACtE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAkB,EAAE;KACjH;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ResourceRecord } from '@owlmeans/resource';
|
|
2
|
+
/** What the public site sends: the prompt and the person's confirmation of its processing. */
|
|
3
|
+
export interface IntentStashBody {
|
|
4
|
+
prompt: string;
|
|
5
|
+
/** Always `true` — the site's checkbox; a request without it is refused by the schema. */
|
|
6
|
+
consent: true;
|
|
7
|
+
}
|
|
8
|
+
/** The reference the platform answers with, and the moment its record expires. */
|
|
9
|
+
export interface IntentStashResult {
|
|
10
|
+
ref: string;
|
|
11
|
+
/** Epoch milliseconds. */
|
|
12
|
+
expiresAt: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IntentPickupBody {
|
|
15
|
+
ref: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IntentPickupResult {
|
|
18
|
+
prompt: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The prompt as it waits in the visitor's browser between pickup and the decision on the home
|
|
22
|
+
* screen. `expiresAt` is checked on read — browser storage has no TTL of its own.
|
|
23
|
+
*/
|
|
24
|
+
export interface IntentDraft extends ResourceRecord {
|
|
25
|
+
id: string;
|
|
26
|
+
/** The reference it was picked up with; a reload of the landing reuses the draft of that ref. */
|
|
27
|
+
ref: string;
|
|
28
|
+
prompt: string;
|
|
29
|
+
expiresAt: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options of {@link makeIntentProtocols}.
|
|
33
|
+
*/
|
|
34
|
+
export interface IntentProtocolOptions {
|
|
35
|
+
/** Path prefix of the guest API; defaults to `/public/intent`. */
|
|
36
|
+
path?: string;
|
|
37
|
+
/** Path of the landing screen; defaults to `/start`. */
|
|
38
|
+
landing?: string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/intent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,8FAA8F;AAC9F,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,OAAO,EAAE,IAAI,CAAA;CACd;AAED,kFAAkF;AAClF,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,EAAE,EAAE,MAAM,CAAA;IACV,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/intent/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/skills/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAe,WAAW,EAAE,MAAM,aAAa,CAAA;AAgBtD,2FAA2F;AAC3F,eAAO,MAAM,eAAe,SAAU,MAAM,EAAE,KAAG,MACuC,CAAA;AAKxF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAA;AACxC,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,sBAAsB,UAKlC,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,iBAAiB,UAAmE,CAAA;AAEjG;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,UAEzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAgD,CAAA;AAE5E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAUrB,CAAA;AAER,eAAO,MAAM,aAAa,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/skills/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAe,WAAW,EAAE,MAAM,aAAa,CAAA;AAgBtD,2FAA2F;AAC3F,eAAO,MAAM,eAAe,SAAU,MAAM,EAAE,KAAG,MACuC,CAAA;AAKxF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAA;AACxC,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,sBAAsB,UAKlC,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,iBAAiB,UAAmE,CAAA;AAEjG;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,UAEzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAgD,CAAA;AAE5E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAUrB,CAAA;AAER,eAAO,MAAM,aAAa,EAAE,eAAe,EA2uD1C,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,WAAW,UAAW,WAAW,KAAG,eACI,CAAA"}
|
|
@@ -1201,7 +1201,8 @@ file per entity: \`sources/api/src/app/<entity>/<action>.ts\`. It NEVER imports
|
|
|
1201
1201
|
NEVER calls \`handlers<Context>()\`; that belongs only in the file that BINDS it:
|
|
1202
1202
|
|
|
1203
1203
|
// sources/api/src/app/task/create.ts — the handler module
|
|
1204
|
-
|
|
1204
|
+
import type { Task } from 'project-common/models/task/task'
|
|
1205
|
+
export const handleTaskCreate = async (payload: Task, ctx: Context) => {
|
|
1205
1206
|
const tasks = getTaskResource(ctx)
|
|
1206
1207
|
return await tasks.create(payload)
|
|
1207
1208
|
}
|
|
@@ -1249,6 +1250,12 @@ package, and every request to the route then fails with \`TypeError: handler is
|
|
|
1249
1250
|
\`api.body(p, (payload, ctx, request) => …)\` — the typed body first;
|
|
1250
1251
|
\`api.params(p, (params, ctx, request) => …)\` — the typed route params first;
|
|
1251
1252
|
\`api.request(p, (request, ctx) => …)\` — the whole request first.
|
|
1253
|
+
- The PROTOCOL decides the handler's types. The body, params and response its declaration in
|
|
1254
|
+
\`sources/common/src/entrypoints.ts\` names are the handler's parameter and return types, imported
|
|
1255
|
+
from the shared package. Never declare an input or record type in \`sources/api\` or
|
|
1256
|
+
\`sources/backend\` (\`CreateTaskInput\`, \`TaskRecord\`, \`Task & { id: string }\`): the shared
|
|
1257
|
+
package cannot import it, so the declaration can never name it, and the binding fails with
|
|
1258
|
+
\`TS2345 "Argument of type '(payload: CreateTaskInput, ctx: Context) => …' is not assignable"\`.
|
|
1252
1259
|
Only \`.request\` hands you the request as the FIRST argument. When you need to name its type,
|
|
1253
1260
|
\`HandlerRequest\` comes from \`@owlmeans/entrypoint\` — \`@owlmeans/server-api\` does NOT export it.
|
|
1254
1261
|
- Handlers are ENTITY-SCOPED: \`sources/api/src/app/<entity>/<action>.ts\`, named exports only.
|
|
@@ -1290,6 +1297,13 @@ says before rewriting anything.
|
|
|
1290
1297
|
handler module. Left as a type error, this is also the runtime fingerprint of the same defect:
|
|
1291
1298
|
a story reported \`completed\` whose every request to that route fails with
|
|
1292
1299
|
\`TypeError: handler is not a function\` (\`execute is not a function\` for \`.request\`).
|
|
1300
|
+
- **\`TS2345 "Argument of type '(payload: X, …) => …' is not assignable to parameter of type
|
|
1301
|
+
'(payload: Y, …) => …'"\` at a \`bind(...)\` line in \`sources/api/src/entrypoints.ts\` is the
|
|
1302
|
+
HANDLER disagreeing with its protocol.** The declaration in \`sources/common/src/entrypoints.ts\`
|
|
1303
|
+
is the authority: change the handler's parameter and return types to exactly the declared ones,
|
|
1304
|
+
imported from the shared package. Never edit the declaration toward the handler, never declare a
|
|
1305
|
+
type in \`sources/common/src/entrypoints.ts\` to match it, and never cast at the binding — each
|
|
1306
|
+
of those moves the error into the other file and the loop never converges.
|
|
1293
1307
|
- "Cannot find module" for \`postgres\`, \`@/lib/db.js\` or \`@/db/schema/...\` inside a
|
|
1294
1308
|
\`resources/**\` file means the file was written against the REMOVED Drizzle-DDL layout.
|
|
1295
1309
|
Rewrite it as an OwlMeans resource: an AJV schema on \`resource.schema\`, built with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../../src/skills/catalogue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAA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;;;;;;;;;;;;;;;;;;;;;;GAqClF,CAAC;IAEF,SAAS,CAAC,WAAW,CAAC,eAAe,EAAE,yBAAyB,EAAE,iBAAiB,CAAC;IACpF,SAAS,CAAC,WAAW,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,kBAAkB,CAAC;IACnF,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;IACvE,SAAS,CAAC,WAAW,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;IAClF,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,oCAAoC,EAAE,aAAa,CAAC;IACvF,SAAS,CAAC,WAAW,CAAC,aAAa,EAAE,kBAAkB,EAAE,eAAe,CAAC;CAC1E,CAAA;AAED,yFAAyF;AACzF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAkB,EAAmB,EAAE,CACjE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,CAAE,CAAA"}
|
package/build/skills/consts.d.ts
CHANGED
|
@@ -75,38 +75,4 @@ export declare enum ViableSkill {
|
|
|
75
75
|
LibrariesAi = "libraries-ai",
|
|
76
76
|
LibrariesGame = "libraries-game"
|
|
77
77
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Sort weights. Skills render in this order inside the cached block, so the sequence is
|
|
80
|
-
* part of the cache key — reordering them invalidates every prefix at once. Grouped in
|
|
81
|
-
* tens to leave room for a consumer's own skills between them.
|
|
82
|
-
*/
|
|
83
|
-
export declare const SKILL_ORDER: Record<ViableSkill, number>;
|
|
84
|
-
/**
|
|
85
|
-
* The catalogue entries whose subject a PUBLISHED `@owlmeans` package already documents.
|
|
86
|
-
*
|
|
87
|
-
* The catalogue and `agent-meta/skills/*` state the same contract twice — the P1 duplication —
|
|
88
|
-
* and the duplication is not symmetric: a package skill is versioned with the package and reaches
|
|
89
|
-
* a prompt through `owlmeansPackagesPlugin` whenever the request names that package, while a
|
|
90
|
-
* catalogue entry is a constant here that has to be edited by hand every time the framework moves.
|
|
91
|
-
*
|
|
92
|
-
* Naming the overlap is what makes it a DATA decision instead of a code one. A blueprint lists
|
|
93
|
-
* which of these its prompts carry, and a persona's skills are filtered against that list — so
|
|
94
|
-
* dropping one is a line in a blueprint, and restoring it is the same line. Everything NOT in this
|
|
95
|
-
* set is viable's own (output discipline, scope, the view-model convention, the fixer heuristics,
|
|
96
|
-
* where files live) and always loads, because no published package documents it.
|
|
97
|
-
*
|
|
98
|
-
* The default blueprint currently lists every one of them: the reduction is a real change to what
|
|
99
|
-
* a coder is told, and it is measured against a green end-to-end baseline rather than guessed.
|
|
100
|
-
*/
|
|
101
|
-
export declare const FRAMEWORK_OWNED_SKILLS: ViableSkill[];
|
|
102
|
-
/**
|
|
103
|
-
* Filter a persona's skills against what a blueprint asks for.
|
|
104
|
-
*
|
|
105
|
-
* A skill nobody owns always survives. A framework-owned one survives only while the blueprint
|
|
106
|
-
* lists it — so a blueprint built on another persistence layer stops teaching the Postgres
|
|
107
|
-
* resource contract without anybody editing a persona, and a blueprint that lists nothing at all
|
|
108
|
-
* (the shape a test builds) is read as "everything", because an empty allow-list almost always
|
|
109
|
-
* means "not stated" rather than "none".
|
|
110
|
-
*/
|
|
111
|
-
export declare const skillsForBlueprint: (skills: ViableSkill[], allowed?: ViableSkill[]) => ViableSkill[];
|
|
112
78
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/skills/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,WAAW;IACrB,gDAAgD;IAChD,gBAAgB,uBAAuB;IACvC,0CAA0C;IAC1C,cAAc,qBAAqB;IACnC,qCAAqC;IACrC,eAAe,qBAAqB;IACpC,kFAAkF;IAClF,aAAa,oBAAoB;IACjC,wEAAwE;IACxE,mBAAmB,0BAA0B;IAE7C,OAAO,a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