@owlmeans/viable-common 0.0.33 → 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 +93 -62
- 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/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/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/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 +17 -7
- 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/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/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 -1864
- package/tests/skills.spec.ts +0 -125
|
@@ -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":["../../src/intent/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAK5E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,GAA0B,EAAE,EAAE,EAAE;IACtE,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,eAAe,CAAC,CAAC,CAAA;IAE3E,OAAO;QACL,IAAI;QAEJ,KAAK,EAAE,QAAQ,CACb,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,EACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,CAAkB,qBAAqB,CAAC,EAAE,EAAE,KAAK,EAAqB,CAAC,CACtG;QAED,MAAM,EAAE,QAAQ,CACd,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,EAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,CAAmB,sBAAsB,CAAC,EAAE,EAAE,KAAK,EAAsB,CAAC,CACzG;QAED,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,mBAAmB,EAAE,QAAQ,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,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAErF,MAAM,UAAU,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,cAAc,CAAC,OAAO;IACnC,KAAK,EAAE;QACL,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACxB,KAAK,EAAE,CAAC;YACR,I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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":""}
|
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,aAAa;IACpB,SAAS,eAAe;IAExB,eAAe,qBAAqB;IACpC,mBAAmB,yBAAyB;IAC5C,WAAW,iBAAiB;IAC5B,uFAAuF;IACvF,eAAe,qBAAqB;IACpC,QAAQ,cAAc;IACtB,aAAa,mBAAmB;IAChC,iGAAiG;IACjG,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAC5B,eAAe,qBAAqB;IACpC;;;OAGG;IACH,WAAW,iBAAiB;IAE5B,aAAa,mBAAmB;IAChC,eAAe,qBAAqB;IACpC,kBAAkB,wBAAwB;IAC1C,cAAc,oBAAoB;IAClC,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,eAAe,qBAAqB;IAEpC,aAAa,mBAAmB;IAChC,YAAY,kBAAkB;IAE9B,sFAAsF;IACtF,eAAe,qBAAqB;IACpC,gFAAgF;IAChF,UAAU,gBAAgB;IAC1B,4EAA4E;IAC5E,YAAY,kBAAkB;IAE9B,uFAAuF;IACvF,aAAa,mBAAmB;IAChC,wEAAwE;IACxE,SAAS,eAAe;IACxB,iFAAiF;IACjF,gBAAgB,uBAAuB;IAEvC,wDAAwD;IACxD,UAAU,gBAAgB;IAC1B,uEAAuE;IACvE,SAAS,eAAe;IACxB,sFAAsF;IACtF,MAAM,YAAY;IACl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gB,uBAAuB;IAEvC,wDAAwD;IACxD,UAAU,gBAAgB;IAC1B,uEAAuE;IACvE,SAAS,eAAe;IACxB,sFAAsF;IACtF,MAAM,YAAY;IAClB,kFAAkF;IAClF,cAAc,oBAAoB;IAElC,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IAEtC;qEACiE;IACjE,gBAAgB,sBAAsB;IAEtC,eAAe,qBAAqB;IACpC,gBAAgB,uBAAuB;IACvC,WAAW,iBAAiB;IAC5B,gBAAgB,sBAAsB;IACtC,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;CACjC"}
|
package/build/skills/consts.js
CHANGED
|
@@ -76,110 +76,4 @@ export var ViableSkill;
|
|
|
76
76
|
ViableSkill["LibrariesAi"] = "libraries-ai";
|
|
77
77
|
ViableSkill["LibrariesGame"] = "libraries-game";
|
|
78
78
|
})(ViableSkill || (ViableSkill = {}));
|
|
79
|
-
/**
|
|
80
|
-
* Sort weights. Skills render in this order inside the cached block, so the sequence is
|
|
81
|
-
* part of the cache key — reordering them invalidates every prefix at once. Grouped in
|
|
82
|
-
* tens to leave room for a consumer's own skills between them.
|
|
83
|
-
*/
|
|
84
|
-
export const SKILL_ORDER = {
|
|
85
|
-
[ViableSkill.OutputSourceOnly]: 10,
|
|
86
|
-
[ViableSkill.OutputTextOnly]: 10,
|
|
87
|
-
[ViableSkill.ScopeDiscipline]: 15,
|
|
88
|
-
[ViableSkill.MainFlowFocus]: 12,
|
|
89
|
-
[ViableSkill.NonTypescriptOutput]: 18,
|
|
90
|
-
[ViableSkill.TsStyle]: 20,
|
|
91
|
-
[ViableSkill.TsImports]: 30,
|
|
92
|
-
[ViableSkill.ReactComponents]: 40,
|
|
93
|
-
[ViableSkill.OwlMeansEntrypoints]: 41,
|
|
94
|
-
[ViableSkill.OwlMeansNav]: 42,
|
|
95
|
-
[ViableSkill.PermissionModel]: 43,
|
|
96
|
-
[ViableSkill.ShadcnUi]: 44,
|
|
97
|
-
[ViableSkill.OwlmeansState]: 50,
|
|
98
|
-
[ViableSkill.FormFeedback]: 51,
|
|
99
|
-
[ViableSkill.StoreAccess]: 52,
|
|
100
|
-
[ViableSkill.ViewModelNaming]: 55,
|
|
101
|
-
// After the frontend rules it builds on (entrypoints, nav, shadcn, form feedback, the store), and
|
|
102
|
-
// before the backend block — it is only ever carried by analysis and frontend personas.
|
|
103
|
-
[ViableSkill.LandingGate]: 56,
|
|
104
|
-
// Analysis and frontend read it the same way LandingGate is read — after the frontend rules it
|
|
105
|
-
// references (nav, shadcn) — and a backend coder reads it as a server-side check, so it sits
|
|
106
|
-
// just ahead of the backend block for either audience.
|
|
107
|
-
[ViableSkill.MarketingConsent]: 57,
|
|
108
|
-
[ViableSkill.ResourceLayer]: 60,
|
|
109
|
-
[ViableSkill.ResourceResults]: 62,
|
|
110
|
-
[ViableSkill.ResourceMigrations]: 64,
|
|
111
|
-
[ViableSkill.OwlMeansServer]: 70,
|
|
112
|
-
[ViableSkill.OwlmeansContext]: 65,
|
|
113
|
-
[ViableSkill.OwlMeansServices]: 66,
|
|
114
|
-
[ViableSkill.FixerHeuristics]: 75,
|
|
115
|
-
[ViableSkill.ProjectLayout]: 5,
|
|
116
|
-
[ViableSkill.AgentTooling]: 8,
|
|
117
|
-
[ViableSkill.QueueDiscipline]: 67,
|
|
118
|
-
[ViableSkill.WorkerJobs]: 68,
|
|
119
|
-
[ViableSkill.TargetAgents]: 69,
|
|
120
|
-
[ViableSkill.AgenticChoice]: 71,
|
|
121
|
-
[ViableSkill.TargetLlm]: 72,
|
|
122
|
-
[ViableSkill.TargetAgentTools]: 73,
|
|
123
|
-
[ViableSkill.GameDesign]: 45,
|
|
124
|
-
[ViableSkill.GameScene]: 46,
|
|
125
|
-
[ViableSkill.GameUi]: 47,
|
|
126
|
-
[ViableSkill.GameNetworking]: 48,
|
|
127
|
-
[ViableSkill.LayoutDefinition]: 80,
|
|
128
|
-
[ViableSkill.ScreenDefinition]: 82,
|
|
129
|
-
[ViableSkill.LibrariesCommon]: 90,
|
|
130
|
-
[ViableSkill.LibrariesUiState]: 90,
|
|
131
|
-
[ViableSkill.LibrariesUi]: 90,
|
|
132
|
-
[ViableSkill.LibrariesBackend]: 90,
|
|
133
|
-
[ViableSkill.LibrariesAi]: 90,
|
|
134
|
-
[ViableSkill.LibrariesGame]: 90,
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* The catalogue entries whose subject a PUBLISHED `@owlmeans` package already documents.
|
|
138
|
-
*
|
|
139
|
-
* The catalogue and `agent-meta/skills/*` state the same contract twice — the P1 duplication —
|
|
140
|
-
* and the duplication is not symmetric: a package skill is versioned with the package and reaches
|
|
141
|
-
* a prompt through `owlmeansPackagesPlugin` whenever the request names that package, while a
|
|
142
|
-
* catalogue entry is a constant here that has to be edited by hand every time the framework moves.
|
|
143
|
-
*
|
|
144
|
-
* Naming the overlap is what makes it a DATA decision instead of a code one. A blueprint lists
|
|
145
|
-
* which of these its prompts carry, and a persona's skills are filtered against that list — so
|
|
146
|
-
* dropping one is a line in a blueprint, and restoring it is the same line. Everything NOT in this
|
|
147
|
-
* set is viable's own (output discipline, scope, the view-model convention, the fixer heuristics,
|
|
148
|
-
* where files live) and always loads, because no published package documents it.
|
|
149
|
-
*
|
|
150
|
-
* The default blueprint currently lists every one of them: the reduction is a real change to what
|
|
151
|
-
* a coder is told, and it is measured against a green end-to-end baseline rather than guessed.
|
|
152
|
-
*/
|
|
153
|
-
export const FRAMEWORK_OWNED_SKILLS = [
|
|
154
|
-
ViableSkill.ResourceLayer,
|
|
155
|
-
ViableSkill.ResourceResults,
|
|
156
|
-
ViableSkill.ResourceMigrations,
|
|
157
|
-
ViableSkill.OwlmeansContext,
|
|
158
|
-
ViableSkill.OwlMeansServices,
|
|
159
|
-
ViableSkill.OwlMeansServer,
|
|
160
|
-
ViableSkill.OwlMeansEntrypoints,
|
|
161
|
-
ViableSkill.OwlMeansNav,
|
|
162
|
-
ViableSkill.PermissionModel,
|
|
163
|
-
ViableSkill.OwlmeansState,
|
|
164
|
-
ViableSkill.StoreAccess,
|
|
165
|
-
ViableSkill.ShadcnUi,
|
|
166
|
-
ViableSkill.ReactComponents,
|
|
167
|
-
ViableSkill.FormFeedback,
|
|
168
|
-
];
|
|
169
|
-
const FRAMEWORK_OWNED = new Set(FRAMEWORK_OWNED_SKILLS);
|
|
170
|
-
/**
|
|
171
|
-
* Filter a persona's skills against what a blueprint asks for.
|
|
172
|
-
*
|
|
173
|
-
* A skill nobody owns always survives. A framework-owned one survives only while the blueprint
|
|
174
|
-
* lists it — so a blueprint built on another persistence layer stops teaching the Postgres
|
|
175
|
-
* resource contract without anybody editing a persona, and a blueprint that lists nothing at all
|
|
176
|
-
* (the shape a test builds) is read as "everything", because an empty allow-list almost always
|
|
177
|
-
* means "not stated" rather than "none".
|
|
178
|
-
*/
|
|
179
|
-
export const skillsForBlueprint = (skills, allowed) => {
|
|
180
|
-
if (allowed == null || allowed.length === 0)
|
|
181
|
-
return skills;
|
|
182
|
-
const permitted = new Set(allowed);
|
|
183
|
-
return skills.filter(skill => !FRAMEWORK_OWNED.has(skill) || permitted.has(skill));
|
|
184
|
-
};
|
|
185
79
|
//# sourceMappingURL=consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/skills/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,WA+EX;AA/ED,WAAY,WAAW;IACrB,gDAAgD;IAChD,sDAAuC,CAAA;IACvC,0CAA0C;IAC1C,kDAAmC,CAAA;IACnC,qCAAqC;IACrC,mDAAoC,CAAA;IACpC,kFAAkF;IAClF,gDAAiC,CAAA;IACjC,wEAAwE;IACxE,4DAA6C,CAAA;IAE7C,mCAAoB,CAAA;IACpB,uCAAwB,CAAA;IAExB,mDAAoC,CAAA;IACpC,2DAA4C,CAAA;IAC5C,2CAA4B,CAAA;IAC5B,uFAAuF;IACvF,mDAAoC,CAAA;IACpC,qCAAsB,CAA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DAA6C,CAAA;IAE7C,mCAAoB,CAAA;IACpB,uCAAwB,CAAA;IAExB,mDAAoC,CAAA;IACpC,2DAA4C,CAAA;IAC5C,2CAA4B,CAAA;IAC5B,uFAAuF;IACvF,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iGAAiG;IACjG,6CAA8B,CAAA;IAC9B,2CAA4B,CAAA;IAC5B,mDAAoC,CAAA;IACpC;;;OAGG;IACH,2CAA4B,CAAA;IAE5B,+CAAgC,CAAA;IAChC,mDAAoC,CAAA;IACpC,yDAA0C,CAAA;IAC1C,iDAAkC,CAAA;IAClC,mDAAoC,CAAA;IACpC,qDAAsC,CAAA;IACtC,mDAAoC,CAAA;IAEpC,+CAAgC,CAAA;IAChC,6CAA8B,CAAA;IAE9B,sFAAsF;IACtF,mDAAoC,CAAA;IACpC,gFAAgF;IAChF,yCAA0B,CAAA;IAC1B,4EAA4E;IAC5E,6CAA8B,CAAA;IAE9B,uFAAuF;IACvF,+CAAgC,CAAA;IAChC,wEAAwE;IACxE,uCAAwB,CAAA;IACxB,iFAAiF;IACjF,sDAAuC,CAAA;IAEvC,wDAAwD;IACxD,yCAA0B,CAAA;IAC1B,uEAAuE;IACvE,uCAAwB,CAAA;IACxB,sFAAsF;IACtF,iCAAkB,CAAA;IAClB,kFAAkF;IAClF,iDAAkC,CAAA;IAElC,qDAAsC,CAAA;IACtC,qDAAsC,CAAA;IAEtC;qEACiE;IACjE,qDAAsC,CAAA;IAEtC,mDAAoC,CAAA;IACpC,sDAAuC,CAAA;IACvC,2CAA4B,CAAA;IAC5B,qDAAsC,CAAA;IACtC,2CAA4B,CAAA;IAC5B,+CAAgC,CAAA;AAClC,CAAC,EA/EW,WAAW,KAAX,WAAW,QA+EtB"}
|
package/build/skills/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/build/skills/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/build/skills/roles.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PromptPolicy } from '@owlmeans/llm-common';
|
|
2
1
|
/**
|
|
3
2
|
* Who the model is being asked to be.
|
|
4
3
|
*
|
|
@@ -41,12 +40,4 @@ export declare enum ViablePersona {
|
|
|
41
40
|
DeclarationLookup = "declaration-lookup",
|
|
42
41
|
FixAgent = "fix-agent"
|
|
43
42
|
}
|
|
44
|
-
/**
|
|
45
|
-
* The role text and skill set behind every helper.
|
|
46
|
-
*
|
|
47
|
-
* This is the single place a persona is written down. Before it existed the same
|
|
48
|
-
* sentences lived in thirteen helper files and seven near-identical coder factories, and
|
|
49
|
-
* the Express-5, resource-layer and client-state rules were duplicated across three of them.
|
|
50
|
-
*/
|
|
51
|
-
export declare const VIABLE_PERSONAS: Record<ViablePersona, PromptPolicy>;
|
|
52
43
|
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/skills/roles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/skills/roles.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,oBAAY,aAAa;IACvB,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,wFAAwF;IACxF,gBAAgB,sBAAsB;IACtC,UAAU,gBAAgB;IAC1B,cAAc,oBAAoB;IAElC,eAAe,qBAAqB;IACpC,kBAAkB,wBAAwB;IAC1C,cAAc,oBAAoB;IAClC,mBAAmB,yBAAyB;IAC5C,oBAAoB,2BAA2B;IAC/C,eAAe,qBAAqB;IACpC,YAAY,kBAAkB;IAC9B,kBAAkB,wBAAwB;IAC1C,sBAAsB,6BAA6B;IAEnD,WAAW,iBAAiB;IAC5B,YAAY,mBAAmB;IAC/B,WAAW,kBAAkB;IAC7B,UAAU,iBAAiB;IAC3B,cAAc,oBAAoB;IAClC,QAAQ,cAAc;IACtB,iBAAiB,wBAAwB;IACzC,qGAAqG;IACrG,gBAAgB,sBAAsB;IACtC,kFAAkF;IAClF,WAAW,iBAAiB;IAC5B,eAAe,sBAAsB;IAErC,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,eAAe,qBAAqB;IACpC,iBAAiB,uBAAuB;IACxC,QAAQ,cAAc;CACvB"}
|