@owlmeans/viable-common 0.0.42 → 0.0.44
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 +33 -15
- package/build/agent/consts.d.ts +58 -0
- package/build/agent/consts.d.ts.map +1 -0
- package/build/agent/consts.js +63 -0
- package/build/agent/consts.js.map +1 -0
- package/build/agent/consts.local.d.ts +21 -0
- package/build/agent/consts.local.d.ts.map +1 -0
- package/build/agent/consts.local.js +44 -0
- package/build/agent/consts.local.js.map +1 -0
- package/build/agent/index.d.ts +1 -0
- package/build/agent/index.d.ts.map +1 -1
- package/build/agent/index.js +1 -0
- package/build/agent/index.js.map +1 -1
- package/build/agent/presentation.d.ts +2 -86
- package/build/agent/presentation.d.ts.map +1 -1
- package/build/agent/presentation.js +2 -104
- package/build/agent/presentation.js.map +1 -1
- package/build/agent/types.d.ts +30 -0
- package/build/agent/types.d.ts.map +1 -1
- package/build/agent/types.local.d.ts +2 -0
- package/build/agent/types.local.d.ts.map +1 -0
- package/build/agent/types.local.js +2 -0
- package/build/agent/types.local.js.map +1 -0
- package/build/areas/consts.d.ts +5 -0
- package/build/areas/consts.d.ts.map +1 -1
- package/build/areas/consts.js +4 -0
- package/build/areas/consts.js.map +1 -1
- package/build/areas/tenancy.d.ts +1 -36
- package/build/areas/tenancy.d.ts.map +1 -1
- package/build/areas/tenancy.js +1 -5
- package/build/areas/tenancy.js.map +1 -1
- package/build/areas/types.d.ts +32 -0
- package/build/areas/types.d.ts.map +1 -1
- package/build/ba/types.d.ts +1 -1
- package/build/ba/types.d.ts.map +1 -1
- package/build/blueprint/consts.d.ts +41 -0
- package/build/blueprint/consts.d.ts.map +1 -1
- package/build/blueprint/consts.js +51 -0
- package/build/blueprint/consts.js.map +1 -1
- package/build/blueprint/consts.local.d.ts +2 -0
- package/build/blueprint/consts.local.d.ts.map +1 -0
- package/build/blueprint/consts.local.js +3 -0
- package/build/blueprint/consts.local.js.map +1 -0
- package/build/blueprint/index.d.ts +1 -0
- package/build/blueprint/index.d.ts.map +1 -1
- package/build/blueprint/index.js +1 -0
- package/build/blueprint/index.js.map +1 -1
- package/build/blueprint/types.d.ts +2 -50
- package/build/blueprint/types.d.ts.map +1 -1
- package/build/blueprint/types.js +1 -65
- package/build/blueprint/types.js.map +1 -1
- package/build/blueprint/utils.d.ts +11 -0
- package/build/blueprint/utils.d.ts.map +1 -0
- package/build/blueprint/utils.js +16 -0
- package/build/blueprint/utils.js.map +1 -0
- package/build/branding.d.ts +0 -8
- package/build/branding.d.ts.map +1 -1
- package/build/branding.js +0 -16
- package/build/branding.js.map +1 -1
- package/build/connect/consts.d.ts +0 -10
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +0 -23
- package/build/connect/consts.js.map +1 -1
- package/build/connect/entrypoints.d.ts +49 -86
- package/build/connect/entrypoints.d.ts.map +1 -1
- package/build/connect/entrypoints.js +5 -2
- package/build/connect/entrypoints.js.map +1 -1
- package/build/connect/errors.d.ts +32 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +65 -0
- package/build/connect/errors.js.map +1 -1
- package/build/connect/index.d.ts +1 -0
- package/build/connect/index.d.ts.map +1 -1
- package/build/connect/index.js +1 -0
- package/build/connect/index.js.map +1 -1
- package/build/connect/references.d.ts +1 -153
- package/build/connect/references.d.ts.map +1 -1
- package/build/connect/references.js.map +1 -1
- package/build/connect/schemas.d.ts +2 -1
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +9 -0
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/types.d.ts +214 -1
- package/build/connect/types.d.ts.map +1 -1
- package/build/connect/types.local.d.ts +4 -0
- package/build/connect/types.local.d.ts.map +1 -0
- package/build/connect/types.local.js +2 -0
- package/build/connect/types.local.js.map +1 -0
- package/build/connect/utils.d.ts +12 -0
- package/build/connect/utils.d.ts.map +1 -0
- package/build/connect/utils.js +25 -0
- package/build/connect/utils.js.map +1 -0
- package/build/consts.d.ts +8 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +16 -0
- package/build/consts.js.map +1 -1
- package/build/convert/consts.d.ts +0 -12
- package/build/convert/consts.d.ts.map +1 -1
- package/build/convert/consts.js +0 -3
- package/build/convert/consts.js.map +1 -1
- package/build/convert/consts.local.d.ts +55 -0
- package/build/convert/consts.local.d.ts.map +1 -0
- package/build/convert/consts.local.js +104 -0
- package/build/convert/consts.local.js.map +1 -0
- package/build/convert/helpers.d.ts.map +1 -1
- package/build/convert/helpers.js +1 -102
- package/build/convert/helpers.js.map +1 -1
- package/build/convert/index.d.ts +1 -0
- package/build/convert/index.d.ts.map +1 -1
- package/build/convert/index.js +1 -0
- package/build/convert/index.js.map +1 -1
- package/build/convert/types.d.ts +10 -1
- package/build/convert/types.d.ts.map +1 -1
- package/build/convert/utils.d.ts +4 -0
- package/build/convert/utils.d.ts.map +1 -0
- package/build/convert/utils.js +5 -0
- package/build/convert/utils.js.map +1 -0
- package/build/design/consts.d.ts +37 -0
- package/build/design/consts.d.ts.map +1 -1
- package/build/design/consts.js +44 -8
- package/build/design/consts.js.map +1 -1
- package/build/design/runtime.d.ts +2 -103
- package/build/design/runtime.d.ts.map +1 -1
- package/build/design/runtime.js +1 -44
- package/build/design/runtime.js.map +1 -1
- package/build/design/schemas.d.ts +1 -9
- package/build/design/schemas.d.ts.map +1 -1
- package/build/design/schemas.js +1 -1
- package/build/design/schemas.js.map +1 -1
- package/build/design/types.d.ts +75 -1
- package/build/design/types.d.ts.map +1 -1
- package/build/dev/schemas.d.ts.map +1 -1
- package/build/dev/schemas.js.map +1 -1
- package/build/dev/types.local.d.ts +4 -0
- package/build/dev/types.local.d.ts.map +1 -0
- package/build/dev/types.local.js +2 -0
- package/build/dev/types.local.js.map +1 -0
- package/build/integrity/consts.d.ts +0 -117
- package/build/integrity/consts.d.ts.map +1 -1
- package/build/integrity/consts.js +0 -281
- package/build/integrity/consts.js.map +1 -1
- package/build/integrity/consts.local.d.ts +5 -0
- package/build/integrity/consts.local.d.ts.map +1 -0
- package/build/integrity/consts.local.js +5 -0
- package/build/integrity/consts.local.js.map +1 -0
- package/build/integrity/index.d.ts +1 -0
- package/build/integrity/index.d.ts.map +1 -1
- package/build/integrity/index.js +1 -0
- package/build/integrity/index.js.map +1 -1
- package/build/integrity/types.d.ts +33 -1
- package/build/integrity/types.d.ts.map +1 -1
- package/build/integrity/utils.d.ts +88 -0
- package/build/integrity/utils.d.ts.map +1 -0
- package/build/integrity/utils.js +280 -0
- package/build/integrity/utils.js.map +1 -0
- package/build/integrity/verify.d.ts.map +1 -1
- package/build/integrity/verify.js +2 -1
- package/build/integrity/verify.js.map +1 -1
- package/build/intent/consts.local.d.ts +4 -0
- package/build/intent/consts.local.d.ts.map +1 -0
- package/build/intent/consts.local.js +3 -0
- package/build/intent/consts.local.js.map +1 -0
- package/build/intent/entrypoints.d.ts +0 -1
- package/build/intent/entrypoints.d.ts.map +1 -1
- package/build/intent/flow.d.ts.map +1 -1
- package/build/intent/flow.js +2 -2
- package/build/intent/flow.js.map +1 -1
- package/build/intent/types.d.ts +2 -0
- package/build/intent/types.d.ts.map +1 -1
- package/build/metadata/consts.d.ts +33 -0
- package/build/metadata/consts.d.ts.map +1 -1
- package/build/metadata/consts.js +37 -0
- package/build/metadata/consts.js.map +1 -1
- package/build/metadata/types.d.ts +1 -33
- package/build/metadata/types.d.ts.map +1 -1
- package/build/metadata/types.js +1 -38
- package/build/metadata/types.js.map +1 -1
- package/build/planning/consts.d.ts +13 -1
- package/build/planning/consts.d.ts.map +1 -1
- package/build/planning/consts.js +13 -0
- package/build/planning/consts.js.map +1 -1
- package/build/planning/index.d.ts +0 -1
- package/build/planning/index.d.ts.map +1 -1
- package/build/planning/index.js +0 -1
- package/build/planning/index.js.map +1 -1
- package/build/planning/landing.d.ts +0 -12
- package/build/planning/landing.d.ts.map +1 -1
- package/build/planning/landing.js +1 -13
- package/build/planning/landing.js.map +1 -1
- package/build/planning/schemas.d.ts +37 -0
- package/build/planning/schemas.d.ts.map +1 -1
- package/build/planning/schemas.js +173 -4
- package/build/planning/schemas.js.map +1 -1
- package/build/planning/types.d.ts +2 -2
- package/build/planning/types.d.ts.map +1 -1
- package/build/preview/consts.d.ts +3 -1
- package/build/preview/consts.d.ts.map +1 -1
- package/build/preview/consts.js +2 -0
- package/build/preview/consts.js.map +1 -1
- package/build/preview/types.d.ts +17 -2
- package/build/preview/types.d.ts.map +1 -1
- package/build/scaffold/helpers.d.ts +1 -14
- package/build/scaffold/helpers.d.ts.map +1 -1
- package/build/scaffold/helpers.js +11 -0
- package/build/scaffold/helpers.js.map +1 -1
- package/build/scaffold/types.d.ts +2 -0
- package/build/scaffold/types.d.ts.map +1 -1
- package/build/slot/consts.d.ts +7 -13
- package/build/slot/consts.d.ts.map +1 -1
- package/build/slot/consts.js +10 -36
- package/build/slot/consts.js.map +1 -1
- package/build/slot/helpers.d.ts +1 -6
- package/build/slot/helpers.d.ts.map +1 -1
- package/build/slot/helpers.js.map +1 -1
- package/build/slot/index.d.ts +1 -0
- package/build/slot/index.d.ts.map +1 -1
- package/build/slot/index.js +1 -0
- package/build/slot/index.js.map +1 -1
- package/build/slot/layout.d.ts +1 -57
- package/build/slot/layout.d.ts.map +1 -1
- package/build/slot/layout.js +0 -12
- package/build/slot/layout.js.map +1 -1
- package/build/slot/types.d.ts +55 -1
- package/build/slot/types.d.ts.map +1 -1
- package/build/slot/utils.d.ts +18 -0
- package/build/slot/utils.d.ts.map +1 -0
- package/build/slot/utils.js +41 -0
- package/build/slot/utils.js.map +1 -0
- package/build/topology/card.d.ts +1 -6
- package/build/topology/card.d.ts.map +1 -1
- package/build/topology/card.js +1 -3
- package/build/topology/card.js.map +1 -1
- package/build/topology/consts.local.d.ts +4 -0
- package/build/topology/consts.local.d.ts.map +1 -0
- package/build/topology/consts.local.js +4 -0
- package/build/topology/consts.local.js.map +1 -0
- package/build/topology/types.d.ts +5 -0
- package/build/topology/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/agent/consts.local.ts +47 -0
- package/src/agent/consts.ts +61 -0
- package/src/agent/index.ts +1 -0
- package/src/agent/presentation.ts +4 -147
- package/src/agent/types.local.ts +1 -0
- package/src/agent/types.ts +40 -0
- package/src/areas/consts.ts +7 -0
- package/src/areas/tenancy.ts +2 -38
- package/src/areas/types.ts +31 -0
- package/src/ba/types.ts +1 -1
- package/src/blueprint/consts.local.ts +3 -0
- package/src/blueprint/consts.ts +52 -0
- package/src/blueprint/index.ts +1 -0
- package/src/blueprint/types.ts +2 -72
- package/src/blueprint/utils.ts +20 -0
- package/src/branding.ts +0 -17
- package/src/connect/consts.ts +0 -22
- package/src/connect/entrypoints.ts +7 -35
- package/src/connect/errors.ts +75 -0
- package/src/connect/index.ts +1 -0
- package/src/connect/references.ts +4 -75
- package/src/connect/schemas.ts +11 -0
- package/src/connect/types.local.ts +5 -0
- package/src/connect/types.ts +124 -1
- package/src/connect/utils.ts +23 -0
- package/src/consts.ts +17 -0
- package/src/convert/consts.local.ts +120 -0
- package/src/convert/consts.ts +0 -14
- package/src/convert/helpers.ts +1 -119
- package/src/convert/index.ts +1 -0
- package/src/convert/types.ts +11 -5
- package/src/convert/utils.ts +8 -0
- package/src/design/consts.ts +48 -0
- package/src/design/runtime.ts +2 -115
- package/src/design/schemas.ts +2 -10
- package/src/design/types.ts +81 -1
- package/src/dev/schemas.ts +1 -3
- package/src/dev/types.local.ts +4 -0
- package/src/integrity/consts.local.ts +5 -0
- package/src/integrity/consts.ts +0 -348
- package/src/integrity/index.ts +1 -0
- package/src/integrity/types.ts +34 -1
- package/src/integrity/utils.ts +320 -0
- package/src/integrity/verify.ts +2 -4
- package/src/intent/consts.local.ts +3 -0
- package/src/intent/entrypoints.ts +0 -1
- package/src/intent/flow.ts +2 -3
- package/src/intent/types.ts +3 -0
- package/src/metadata/consts.ts +37 -0
- package/src/metadata/types.ts +1 -37
- package/src/planning/consts.ts +15 -2
- package/src/planning/index.ts +0 -1
- package/src/planning/landing.ts +1 -14
- package/src/planning/schemas.ts +191 -4
- package/src/planning/types.ts +2 -2
- package/src/preview/consts.ts +2 -0
- package/src/preview/types.ts +19 -0
- package/src/scaffold/helpers.ts +1 -4
- package/src/scaffold/types.ts +3 -0
- package/src/slot/consts.ts +11 -40
- package/src/slot/helpers.ts +1 -6
- package/src/slot/index.ts +1 -0
- package/src/slot/layout.ts +1 -62
- package/src/slot/types.ts +57 -1
- package/src/slot/utils.ts +45 -0
- package/src/topology/card.ts +2 -9
- package/src/topology/consts.local.ts +6 -0
- package/src/topology/types.ts +6 -0
- package/tests/branding.spec.ts +2 -2
- package/tests/connect-convert.spec.ts +21 -1
- package/tests/connect-errors.spec.ts +34 -1
- package/tests/convert.spec.ts +2 -3
- package/tests/error-status.spec.ts +7 -1
- package/tests/planning.spec.ts +3 -18
- package/tests/presentation.spec.ts +2 -4
- package/build/planning/flows.d.ts +0 -34
- package/build/planning/flows.d.ts.map +0 -1
- package/build/planning/flows.js +0 -174
- package/build/planning/flows.js.map +0 -1
- package/src/planning/flows.ts +0 -204
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ filesystem, no inference SDK. It is safe to import from a browser bundle.
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
bun add @owlmeans/viable-common@^0.0.
|
|
24
|
+
bun add @owlmeans/viable-common@^0.0.44
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Rules worth knowing before you change something
|
|
@@ -39,7 +39,7 @@ means "inherit" has no other spelling. `tests/convert.spec.ts` walks every expor
|
|
|
39
39
|
both faults, and for draft-04 tuple `items`.
|
|
40
40
|
|
|
41
41
|
**A field that crosses a version skew carries no `enum`.** A connector is installed with
|
|
42
|
-
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.
|
|
42
|
+
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.42` and talks to a separately deployed platform, so an executor kind it
|
|
43
43
|
sends must remain an unused capability on an older platform rather than a refused session.
|
|
44
44
|
|
|
45
45
|
**A ceiling exists once.** The inquiry answer cap here equals `DEFAULT_INQUIRY_ANSWER_CHARS` in
|
|
@@ -59,7 +59,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
59
59
|
your project's skill store (`.agents/skills/`):
|
|
60
60
|
|
|
61
61
|
```sh
|
|
62
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
62
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/viable-common",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.0.44",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.128Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -6,7 +6,7 @@ description: Shared, runtime-free taxonomy for presenting OwlMeans Viable agent
|
|
|
6
6
|
|
|
7
7
|
# Agent output presentation
|
|
8
8
|
|
|
9
|
-
**Install:** `"@owlmeans/viable-common": "^0.0.
|
|
9
|
+
**Install:** `"@owlmeans/viable-common": "^0.0.44"` in `dependencies`
|
|
10
10
|
|
|
11
11
|
`@owlmeans/viable-common`'s `agent/presentation.ts` owns the browser-safe vocabulary for agent
|
|
12
12
|
output. Keep the server and every client on `classifyAgentMessage()`; consumers may refine a
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/viable-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Cross-cutting domain (contracts only)
|
|
11
|
-
**Install:** `"@owlmeans/viable-common": "^0.0.
|
|
11
|
+
**Install:** `"@owlmeans/viable-common": "^0.0.44"` in `dependencies`
|
|
12
12
|
**Subpaths:** `.` · `./slot` · `./connect` · `./convert` · `./integrity` · `./intent` — the barrel
|
|
13
13
|
re-exports every subpath except `./intent`.
|
|
14
14
|
**Runtime-free:** no `@langchain/*`, no filesystem, no Ajv at run time (a devDependency, for the
|
|
@@ -31,9 +31,9 @@ execution state and card fields name.
|
|
|
31
31
|
|
|
32
32
|
| Subpath | What it declares |
|
|
33
33
|
|---|---|
|
|
34
|
-
| `.` (barrel) | The planning module (`VIABLE_*_TYPE`, `VIABLE_TYPE_SCHEMAS`, `VIABLE_FLOW_SCHEMAS`, `ViableStoryStatus`/`ViableProjectStatus` and their transitions, `ViableSpecCategory`, `ViableRelationship`, `ViableChannel`, `ViableProjectCard`/`ViableStoryCard`, the card helpers, the landing sentence helpers, the `Project*` refusals); `SlotMetadata` and the three metadata vocabularies (`metadataConfigs`, `metadataLists`, `metadataSecrets`), `BRANDING_ENV_KEYS` / `brandingEnv`; `ProjectArea` / `AREA_PATHS` / `AREA_ACCESS` / `AREA_TIER`, `ADMIN_PERMISSION` / `OPERATOR_PERMISSION`; the tenancy contract (`ProjectTenancy`, `ViableTenancyDecision`, `NO_TENANCY`, `tenancyOf`, `tenantedArea`, `TENANCY_QUOTE_MAX`); `ModelRole` and the viable `ExecutionState`; the `ViableSkill` / `ViablePersona` enums; the `Blueprint` layer types, `BlueprintRef` / `BlueprintPatch`, `BlueprintCase` / `GameKind`, `DEFAULT_BLUEPRINT_ID` / `BLUEPRINT_META_KEY`, `landingGatePreferenceOf`; the target topology (`TopologyDescriptor`, `LAYOUT_TOPOLOGIES`, `resolveTopology`, `packageForRole` — meaning in `/blueprints`); the BA shapes (`mergeConnectingStories`), the dev (`AccessBlock`, `AccessLevel`, `PermissionDefault`), UX, design and scaffold shapes and their schemas, `StoryDesignPort`; `ModerationCategory` / `ModerationSubject` / `decideModeration`; the `docs/` metadata paths; `PreviewEventType
|
|
34
|
+
| `.` (barrel) | The planning module (`VIABLE_*_TYPE`, `VIABLE_TYPE_SCHEMAS`, `VIABLE_FLOW_SCHEMAS`, `ViableStoryStatus`/`ViableProjectStatus` and their transitions, `ViableSpecCategory`, `ViableRelationship`, `ViableChannel`, `ViableProjectCard`/`ViableStoryCard`, the card helpers, the landing sentence helpers, the `Project*` refusals); `SlotMetadata` and the three metadata vocabularies (`metadataConfigs`, `metadataLists`, `metadataSecrets`), `BRANDING_ENV_KEYS` / `brandingEnv`; `ProjectArea` / `AREA_PATHS` / `AREA_ACCESS` / `AREA_TIER`, `ADMIN_PERMISSION` / `OPERATOR_PERMISSION`; the tenancy contract (`ProjectTenancy`, `ViableTenancyDecision`, `NO_TENANCY`, `tenancyOf`, `tenantedArea`, `TENANCY_QUOTE_MAX`); `ModelRole` and the viable `ExecutionState`; the `ViableSkill` / `ViablePersona` enums; the `Blueprint` layer types, `BlueprintRef` / `BlueprintPatch`, `BlueprintCase` / `GameKind` / `WorkKind`, `CASE_QUOTE_MAX`, `DEFAULT_BLUEPRINT_ID` / `BLUEPRINT_META_KEY`, `landingGatePreferenceOf`; the target topology (`TopologyDescriptor`, `LAYOUT_TOPOLOGIES`, `resolveTopology`, `packageForRole` — meaning in `/blueprints`); the BA shapes (`mergeConnectingStories`), the dev (`AccessBlock`, `AccessLevel`, `PermissionDefault`), UX, design and scaffold shapes and their schemas, `StoryDesignPort`; `ModerationCategory` / `ModerationSubject` / `decideModeration`; the `docs/` metadata paths; `PreviewEventType` (error kinds plus `Analytics` — an analytics event a target's web posted through the preview reporter's channel; the target-side plugins live in `@owlmeans/viable-log`) and the `OwlMeansAnalyticsPayload` shape; the agent-output taxonomy (`classifyAgentMessage`, `isAgentMessageHidden` — `/agent-presentation`) and the spectator entry types |
|
|
35
35
|
| `./slot` | `SlotCommandType` and the `SlotFileCommand` / `SlotShellCommand` / `SlotGitCommand` / `SlotDatabaseCommand` sets; `SlotDatabaseInfo`, `SlotDatabaseQueryArgs` / `SlotDatabaseQueryResult`, `DATABASE_READ_LIMITS`; the per-command deadlines and timeouts (`commandDeadline`, `commandTimeout`), `SubProject`, `LAYOUTS` / `ROLE_DIRS` / `subprojectDirOf`, `WorkloadKind`, the target ports and process markers, `slotOrigin` / `targetRedirectUrisForOrigin` |
|
|
36
|
-
| `./connect` | `ConnectTarget`, `ConnectLlm`, `ConnectHarness`, `ConnectExecutor`, `ConnectOpKind`, `ConnectProjectStatus`, `ConnectStoryStatus`, `ConnectPipelineState`, `ConnectWaitReason`, `ConnectProjectBranding` / `ConnectProjectBrandingSave`, the planning-kit views (`PlanningKitView`, `ConnectKitDescribe`, `ConnectKitApplyBody`, `ConnectKitApplyResult` and their `*Schema`s), `ModelTier` + `tierOfRole`/`clampTier`, `ModelTask*`, `InquiryPayload` + `ConnectInquiryKind`, the session and domain-status views, the `Connect*` error family
|
|
36
|
+
| `./connect` | `ConnectTarget`, `ConnectLlm`, `ConnectHarness`, `ConnectExecutor`, `ConnectOpKind`, `ConnectProjectStatus`, `ConnectStoryStatus`, `ConnectPipelineState`, `ConnectWaitReason`, `ConnectProjectBranding` / `ConnectProjectBrandingSave`, the planning-kit views (`PlanningKitView`, `ConnectKitDescribe`, `ConnectKitApplyBody`, `ConnectKitApplyResult` and their `*Schema`s), `ModelTier` + `tierOfRole`/`clampTier`, `ModelTask*`, `InquiryPayload` + `ConnectInquiryKind`, the session and domain-status views, the convert bodies (`ConnectConvertCreateBody`, `ConnectConvertStartBody`, `ConnectConvertProceedBody`), the `Connect*` error family with `ConnectConfirmation` / `ConnectConfirmationAction`, `connectProtocols(opts)` and every `*Schema` behind them |
|
|
37
37
|
| `./convert` | `ConversionStage`/`Status`/`Decision` and the `stageAfter`/`decisionFor`/`canEnter` transitions, `OriginKind`/`OriginShape`/`OriginState`, `StackId` + `STACK_FAMILY`, `ArchitectureCase`, `ConvertibilityVerdict`/`ConvertibilityReason`, the census classifiers (`fileClassOf`, `sizeClassOf`, `entropyClassOf`, `binaryByExtension`), the `docs/conversion/` paths, `CONVERTED_ORIGIN_DIR`, `SOURCE_LIST_EXCLUSIONS`, `CENSUS_SKIP_DIRS`, `RELOCATE_ALWAYS_KEEP`, and the model-answer schemas the conversion asks with |
|
|
38
38
|
| `./integrity` | `TargetLayout` + `TARGET_LAYOUTS`, `detectTargetLayout`, `verifyTargetShape`, `TARGET_INTEGRITY_FILES`, `TARGET_PROTECTED_FILES`, `isLegacyLayout`, `targetPackageName` |
|
|
39
39
|
| `./intent` | `intent` (the four aliases), `makeIntentProtocols(opts?)`, `intentFlow` + `IntentFlowStep` + `INTENT_PAYLOAD_REF`, `IntentStashBodySchema` / `IntentPickupBodySchema`, the `INTENT_*` constants, `IntentDraft`, `IntentExpired` (404) / `IntentThrottled` (429) |
|
|
@@ -98,7 +98,7 @@ the wire and in target files — a parent agent's vocabulary, which never change
|
|
|
98
98
|
| project `id` / story `id` | `id` (a card id) |
|
|
99
99
|
| project `alias` / `name` / `description` | `code` / `title` / `description` |
|
|
100
100
|
| project `specification` / `vision` / `designSystem` | specification bodies, categories `specification` / `vision` / `design-system` |
|
|
101
|
-
| project `formerAliases`, `language`, `blueprint`, `blueprintCase`, `gameKind`, `target`, `origin`, `connectLlmMode`, `converterLlmMode` | `fields.*` |
|
|
101
|
+
| project `formerAliases`, `language`, `blueprint`, `blueprintCase`, `gameKind`, `workKind`, `caseQuote`, `target`, `origin`, `connectLlmMode`, `converterLlmMode` | `fields.*` |
|
|
102
102
|
| the landing-gate decision | project `fields.landing` — `{ story: code \| null, at }` |
|
|
103
103
|
| the tenancy decision | project `fields.tenancy` — `ViableTenancyDecision` `{ operators, users, quotes?, by: 'model' \| 'owner', at }` |
|
|
104
104
|
| story narrative (`story`) / `code` / `status` | `title` / `code` / `status` (same strings) |
|
|
@@ -262,6 +262,10 @@ DEPLOYMENT's parts are injected: the guard alias, the ownership gate, and the pa
|
|
|
262
262
|
`ConnectProjectStatus.project` flattens the project card into a parent agent's names (`name` =
|
|
263
263
|
title, `alias` = code, the three brief bodies) plus `status` and `intrinsic`;
|
|
264
264
|
`ConnectConfirmBody` carries the three brief parts including `designSystem`.
|
|
265
|
+
- `convert.start` and `convert.proceed` carry `confirm?: boolean` (`ConnectConvertStartBody(Schema)`
|
|
266
|
+
— the start's whole body — and `ConnectConvertProceedBody(Schema)`): a PERSON agreed to what the
|
|
267
|
+
step costs. The platform refuses a step that would use the plan's conversion or spend credits
|
|
268
|
+
without it (`ConnectConfirmationRequired`); a `null` is "not confirmed", never a refused body.
|
|
265
269
|
- Branding routes hang under `base` (guard + ownership gate, no paid gate). The save body
|
|
266
270
|
(`ConnectProjectBrandingSaveSchema`) is a PATCH of strings with structural bounds only
|
|
267
271
|
(`CONNECT_BRANDING_*_MAX`, each equal to its platform twin); value acceptability is the
|
|
@@ -325,8 +329,15 @@ only through a total helper: `landingGatePreferenceOf` (`LandingGatePreference.A
|
|
|
325
329
|
no key or an unknown value) and `tenancyOf`. An execution carries a `BlueprintRef` — `id`,
|
|
326
330
|
optional `case`, optional `tenancy`, an override patch — never a resolved blueprint.
|
|
327
331
|
|
|
328
|
-
`BlueprintCase` (`web`, `scalable`, `ai-pipeline`, `ai-agent`, `game
|
|
329
|
-
`fields.blueprintCase` / `fields.gameKind`
|
|
332
|
+
`BlueprintCase` (`web`, `scalable`, `ai-pipeline`, `ai-agent`, `game`, `work-management`,
|
|
333
|
+
`work-management-tenanted`) and `GameKind` are what `fields.blueprintCase` / `fields.gameKind`
|
|
334
|
+
carry. `work-management-tenanted` is never classified directly: code picks it from
|
|
335
|
+
`work-management` when the project's tenancy decision has a flag on. `WorkKind` (`project`, `crm`,
|
|
336
|
+
`service-desk`, `inventory`, `recruiting`, `field-service`, `process`) is `fields.workKind` — which
|
|
337
|
+
ready-made card types and flows a work-management product starts from, changing no dependency —
|
|
338
|
+
and `fields.caseQuote` (≤ `CASE_QUOTE_MAX`) is the requester's sentence that case was verified
|
|
339
|
+
against. `TemplateLayer.seeds` names case seed directories under the overlay's `.cases/`, copied
|
|
340
|
+
over the staged tree in order (names, never paths; a variant lists its base seed first). What a case MEANS (`BLUEPRINT_CASES`,
|
|
330
341
|
`applyBlueprintCase`, `applyBlueprintPatch` / `freezeBlueprint`, `joinPersonaSkills`, the
|
|
331
342
|
classification schema) lives in `@owlmeans/viable` (`/blueprints`, `/blueprint-cases`); that table
|
|
332
343
|
is `Record<BlueprintCase, …>`, so a new member fails to compile there until it has a row.
|
|
@@ -397,16 +408,23 @@ silently at the smaller; never introduce a local cap.
|
|
|
397
408
|
|
|
398
409
|
`ConnectError` and its family (`ConnectSessionNotFound`, `ConnectSessionGone`, `ConnectOpTimeout`,
|
|
399
410
|
`ConnectOpRefused`, `LocalSlotUnsupported`, `ConnectOpUnknown`, `ConnectOutOfCredits`,
|
|
400
|
-
`ConnectConsentRequired`) are `ResilientError` classes with
|
|
401
|
-
refusals a connector phrases for a person pack their fields
|
|
402
|
-
`message` survive a marshal), are built with `static encode(...)`
|
|
403
|
-
`finalizeUnmarshal()`:
|
|
411
|
+
`ConnectConsentRequired`, `ConnectConfirmationRequired`) are `ResilientError` classes with
|
|
412
|
+
`viable-connect:` markers. The three refusals a connector phrases for a person pack their fields
|
|
413
|
+
into the message (only `type` and `message` survive a marshal), are built with `static encode(...)`
|
|
414
|
+
and rebuilt in `finalizeUnmarshal()`:
|
|
404
415
|
|
|
405
416
|
- `ConnectOutOfCredits` — `out-of-credits:<gate>:<requiredUsd>:<balanceUsd>:<encodeURIComponent(topUpUrl)>`;
|
|
406
417
|
- `ConnectConsentRequired` — `consent-required:<gate>:<deadline epoch ms | 0>:<encodeURIComponent(consentUrl)>`
|
|
407
418
|
(`0` = unknown; epoch ms and the URL last because ISO dates and URLs contain colons). It is the
|
|
408
419
|
connector's face of the EU spend consent (`PerformanceConsentRequired` on the web, `/payment`):
|
|
409
|
-
only a PERSON gives it, in the browser at `consentUrl
|
|
420
|
+
only a PERSON gives it, in the browser at `consentUrl`;
|
|
421
|
+
- `ConnectConfirmationRequired` — `confirmation-required:<action>:<cap>:<spent>:<estimate>:<fromAllowance>:<fromCreditLimits>:<moneyUsd>`,
|
|
422
|
+
`encode(fields: ConnectConfirmation)` and its inverse `decode(packed)` (an unreadable number reads
|
|
423
|
+
back as `0`, never `NaN`). A conversion verb (`action`: `convert-start` / `convert-proceed`) would
|
|
424
|
+
use the plan's conversion or spend credits: `cap` and `spent` are the conversion limit and what the
|
|
425
|
+
conversion used of it (`0` with no plan unit), `estimate` the stage's, split into `fromAllowance`
|
|
426
|
+
and `fromCreditLimits` (credits) and `moneyUsd` (topped-up credits, the only money figure). A person
|
|
427
|
+
agrees in the CONVERSATION and the caller repeats the call with `confirm: true`.
|
|
410
428
|
|
|
411
429
|
`ConnectSessionGone` is registered FATAL on the agent side: the step fails as an OUTCOME, so the
|
|
412
430
|
run row records where it stopped and `pipeline.resume` picks it up when a connector returns.
|
|
@@ -425,7 +443,7 @@ refuses an exported class whose status was not decided:
|
|
|
425
443
|
| Status | Classes |
|
|
426
444
|
|---|---|
|
|
427
445
|
| 402 | `ConnectOutOfCredits` |
|
|
428
|
-
| 428 | `ConnectConsentRequired` |
|
|
446
|
+
| 428 | `ConnectConsentRequired`, `ConnectConfirmationRequired` |
|
|
429
447
|
| 404 | `ProjectNotFound`, `ProjectStoryNotFound`, `ConnectSessionNotFound`, `ConnectOpUnknown` |
|
|
430
448
|
| 409 | `ProjectAgentOccupied`, `ProjectStoryMissconfigured`, `ConnectSessionGone` (no connector attached), `LocalSlotUnsupported` |
|
|
431
449
|
| 422 | `ConnectOpRefused` |
|
|
@@ -441,15 +459,15 @@ the manager's `useErrorPhrase` read the same substrings. A marker change changes
|
|
|
441
459
|
|
|
442
460
|
| File | Pins |
|
|
443
461
|
|---|---|
|
|
444
|
-
| `planning.spec.ts` | the two flows and transition tables, type declarations, slots, code policies, reserved types outside `cardTypes`, field schemas (null optionals, refused strays and closed-set values), landing fields and sentence, the tenancy decision, card helpers, the `follows` anchor, refusal type names after a marshal |
|
|
462
|
+
| `planning.spec.ts` | the two flows and transition tables, type declarations, slots, code policies, reserved types outside `cardTypes`, field schemas (null optionals, refused strays and closed-set values), landing fields and sentence, the tenancy decision, the work kind and bounded case quote, card helpers, the `follows` anchor, refusal type names after a marshal |
|
|
445
463
|
| `tenancy.spec.ts` | `NO_TENANCY` frozen, `tenancyOf` defaults and the literal-`true` rule, `tenantedArea` |
|
|
446
464
|
| `access-schema.spec.ts` | the model-facing access schema: model keys only, byte-identical |
|
|
447
465
|
| `scaffold.spec.ts` | old- and new-shape plans passing the schema and slot, `null` optionals, no `minItems` |
|
|
448
466
|
| `blueprint.spec.ts` · `branding.spec.ts` | `landingGatePreferenceOf` defaults · the build env and metadata vocabulary |
|
|
449
|
-
| `connect-entrypoints.spec.ts` · `connect-convert.spec.ts` | every route's method and path, aliases = `connectRef`, the paid gate on the delegated session alone, no socket or story route, branding body, the kit routes and their closed shapes · conversion routes, an unknown executor kind accepted |
|
|
467
|
+
| `connect-entrypoints.spec.ts` · `connect-convert.spec.ts` | every route's method and path, aliases = `connectRef`, the paid gate on the delegated session alone, no socket or story route, branding body, the kit routes and their closed shapes · conversion routes, the start's body and both verbs' `confirm`, an unknown executor kind accepted |
|
|
450
468
|
| `convert.spec.ts` | the three structural walks over the barrel, nullable enums under Ajv, census classifiers, stage transitions |
|
|
451
469
|
| `design.spec.ts` | the design aggregate, staleness ranking, schema refusals, `userStoryOfDesign` |
|
|
452
|
-
| `error-status.spec.ts` · `connect-errors.spec.ts` | declared statuses through a marshal · packed refusal fields fresh and after a round trip |
|
|
470
|
+
| `error-status.spec.ts` · `connect-errors.spec.ts` | declared statuses through a marshal · packed refusal fields fresh and after a round trip, the confirmation's `decode` |
|
|
453
471
|
| `intent.spec.ts` | the four declarations without guards, schema cases incl. crafted refs, the flow walk and `suspendFlow` payload, error statuses |
|
|
454
472
|
| `presentation.spec.ts` | the agent-output classifier (`/agent-presentation`) |
|
|
455
473
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A compact, runtime-free description of how an agent message should be presented.
|
|
3
|
+
*
|
|
4
|
+
* The server emits this with thinking events and the browser refines it as streaming output
|
|
5
|
+
* becomes parseable. Keeping the vocabulary here prevents the two runtimes from drifting into
|
|
6
|
+
* their own guesses about the same model response.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum AgentMessageCategory {
|
|
9
|
+
Code = "code",
|
|
10
|
+
Diff = "diff",
|
|
11
|
+
Structured = "structured",
|
|
12
|
+
Markdown = "markdown",
|
|
13
|
+
Plain = "plain"
|
|
14
|
+
}
|
|
15
|
+
export declare enum AgentCodeLanguage {
|
|
16
|
+
ReactTsx = "react-tsx",
|
|
17
|
+
Css = "css",
|
|
18
|
+
TypeScript = "typescript",
|
|
19
|
+
Json = "json",
|
|
20
|
+
Other = "other"
|
|
21
|
+
}
|
|
22
|
+
/** A semantic shape that the manager can render as a purpose-built card. */
|
|
23
|
+
export declare enum AgentStructuredKind {
|
|
24
|
+
ToolCalls = "tool-calls",
|
|
25
|
+
ArtifactSelection = "artifact-selection",
|
|
26
|
+
EntitySelection = "entity-selection",
|
|
27
|
+
StoryPlan = "story-plan",
|
|
28
|
+
ScreenPlan = "screen-plan",
|
|
29
|
+
ComponentPlan = "component-plan",
|
|
30
|
+
TransitionPlan = "transition-plan",
|
|
31
|
+
EntrypointSelection = "entrypoint-selection",
|
|
32
|
+
AccessPolicy = "access-policy",
|
|
33
|
+
ScaffoldPlan = "scaffold-plan",
|
|
34
|
+
RuntimeDecision = "runtime-decision",
|
|
35
|
+
CandidateRanking = "candidate-ranking",
|
|
36
|
+
Decision = "decision",
|
|
37
|
+
GenericRecord = "generic-record",
|
|
38
|
+
GenericList = "generic-list",
|
|
39
|
+
GenericValue = "generic-value"
|
|
40
|
+
}
|
|
41
|
+
export declare enum AgentMarkdownKind {
|
|
42
|
+
Specification = "specification",
|
|
43
|
+
DesignDocument = "design-document",
|
|
44
|
+
Documentation = "documentation"
|
|
45
|
+
}
|
|
46
|
+
/** The family of specialist that produced an output, not an authorization role. */
|
|
47
|
+
export declare enum AgentMessageRole {
|
|
48
|
+
Technical = "technical",
|
|
49
|
+
Analytical = "analytical",
|
|
50
|
+
Product = "product",
|
|
51
|
+
Ux = "ux",
|
|
52
|
+
VisualDesign = "visual-design",
|
|
53
|
+
Architect = "architect",
|
|
54
|
+
Developer = "developer",
|
|
55
|
+
Repair = "repair",
|
|
56
|
+
Orchestrator = "orchestrator"
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/agent/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,4EAA4E;AAC5E,oBAAY,mBAAmB;IAC7B,SAAS,eAAe;IACxB,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IACpC,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,mBAAmB,yBAAyB;IAC5C,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;CAC/B;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,cAAc,oBAAoB;IAClC,aAAa,kBAAkB;CAChC;AAED,mFAAmF;AACnF,oBAAY,gBAAgB;IAC1B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A compact, runtime-free description of how an agent message should be presented.
|
|
3
|
+
*
|
|
4
|
+
* The server emits this with thinking events and the browser refines it as streaming output
|
|
5
|
+
* becomes parseable. Keeping the vocabulary here prevents the two runtimes from drifting into
|
|
6
|
+
* their own guesses about the same model response.
|
|
7
|
+
*/
|
|
8
|
+
export var AgentMessageCategory;
|
|
9
|
+
(function (AgentMessageCategory) {
|
|
10
|
+
AgentMessageCategory["Code"] = "code";
|
|
11
|
+
AgentMessageCategory["Diff"] = "diff";
|
|
12
|
+
AgentMessageCategory["Structured"] = "structured";
|
|
13
|
+
AgentMessageCategory["Markdown"] = "markdown";
|
|
14
|
+
AgentMessageCategory["Plain"] = "plain";
|
|
15
|
+
})(AgentMessageCategory || (AgentMessageCategory = {}));
|
|
16
|
+
export var AgentCodeLanguage;
|
|
17
|
+
(function (AgentCodeLanguage) {
|
|
18
|
+
AgentCodeLanguage["ReactTsx"] = "react-tsx";
|
|
19
|
+
AgentCodeLanguage["Css"] = "css";
|
|
20
|
+
AgentCodeLanguage["TypeScript"] = "typescript";
|
|
21
|
+
AgentCodeLanguage["Json"] = "json";
|
|
22
|
+
AgentCodeLanguage["Other"] = "other";
|
|
23
|
+
})(AgentCodeLanguage || (AgentCodeLanguage = {}));
|
|
24
|
+
/** A semantic shape that the manager can render as a purpose-built card. */
|
|
25
|
+
export var AgentStructuredKind;
|
|
26
|
+
(function (AgentStructuredKind) {
|
|
27
|
+
AgentStructuredKind["ToolCalls"] = "tool-calls";
|
|
28
|
+
AgentStructuredKind["ArtifactSelection"] = "artifact-selection";
|
|
29
|
+
AgentStructuredKind["EntitySelection"] = "entity-selection";
|
|
30
|
+
AgentStructuredKind["StoryPlan"] = "story-plan";
|
|
31
|
+
AgentStructuredKind["ScreenPlan"] = "screen-plan";
|
|
32
|
+
AgentStructuredKind["ComponentPlan"] = "component-plan";
|
|
33
|
+
AgentStructuredKind["TransitionPlan"] = "transition-plan";
|
|
34
|
+
AgentStructuredKind["EntrypointSelection"] = "entrypoint-selection";
|
|
35
|
+
AgentStructuredKind["AccessPolicy"] = "access-policy";
|
|
36
|
+
AgentStructuredKind["ScaffoldPlan"] = "scaffold-plan";
|
|
37
|
+
AgentStructuredKind["RuntimeDecision"] = "runtime-decision";
|
|
38
|
+
AgentStructuredKind["CandidateRanking"] = "candidate-ranking";
|
|
39
|
+
AgentStructuredKind["Decision"] = "decision";
|
|
40
|
+
AgentStructuredKind["GenericRecord"] = "generic-record";
|
|
41
|
+
AgentStructuredKind["GenericList"] = "generic-list";
|
|
42
|
+
AgentStructuredKind["GenericValue"] = "generic-value";
|
|
43
|
+
})(AgentStructuredKind || (AgentStructuredKind = {}));
|
|
44
|
+
export var AgentMarkdownKind;
|
|
45
|
+
(function (AgentMarkdownKind) {
|
|
46
|
+
AgentMarkdownKind["Specification"] = "specification";
|
|
47
|
+
AgentMarkdownKind["DesignDocument"] = "design-document";
|
|
48
|
+
AgentMarkdownKind["Documentation"] = "documentation";
|
|
49
|
+
})(AgentMarkdownKind || (AgentMarkdownKind = {}));
|
|
50
|
+
/** The family of specialist that produced an output, not an authorization role. */
|
|
51
|
+
export var AgentMessageRole;
|
|
52
|
+
(function (AgentMessageRole) {
|
|
53
|
+
AgentMessageRole["Technical"] = "technical";
|
|
54
|
+
AgentMessageRole["Analytical"] = "analytical";
|
|
55
|
+
AgentMessageRole["Product"] = "product";
|
|
56
|
+
AgentMessageRole["Ux"] = "ux";
|
|
57
|
+
AgentMessageRole["VisualDesign"] = "visual-design";
|
|
58
|
+
AgentMessageRole["Architect"] = "architect";
|
|
59
|
+
AgentMessageRole["Developer"] = "developer";
|
|
60
|
+
AgentMessageRole["Repair"] = "repair";
|
|
61
|
+
AgentMessageRole["Orchestrator"] = "orchestrator";
|
|
62
|
+
})(AgentMessageRole || (AgentMessageRole = {}));
|
|
63
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/agent/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,6CAAqB,CAAA;IACrB,uCAAe,CAAA;AACjB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,2CAAsB,CAAA;IACtB,gCAAW,CAAA;IACX,8CAAyB,CAAA;IACzB,kCAAa,CAAA;IACb,oCAAe,CAAA;AACjB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAED,4EAA4E;AAC5E,MAAM,CAAN,IAAY,mBAiBX;AAjBD,WAAY,mBAAmB;IAC7B,+CAAwB,CAAA;IACxB,+DAAwC,CAAA;IACxC,2DAAoC,CAAA;IACpC,+CAAwB,CAAA;IACxB,iDAA0B,CAAA;IAC1B,uDAAgC,CAAA;IAChC,yDAAkC,CAAA;IAClC,mEAA4C,CAAA;IAC5C,qDAA8B,CAAA;IAC9B,qDAA8B,CAAA;IAC9B,2DAAoC,CAAA;IACpC,6DAAsC,CAAA;IACtC,4CAAqB,CAAA;IACrB,uDAAgC,CAAA;IAChC,mDAA4B,CAAA;IAC5B,qDAA8B,CAAA;AAChC,CAAC,EAjBW,mBAAmB,KAAnB,mBAAmB,QAiB9B;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,uDAAkC,CAAA;IAClC,oDAA+B,CAAA;AACjC,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED,mFAAmF;AACnF,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;IACzB,uCAAmB,CAAA;IACnB,6BAAS,CAAA;IACT,kDAA8B,CAAA;IAC9B,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,iDAA6B,CAAA;AAC/B,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentMarkdownKind, AgentStructuredKind } from './consts.js';
|
|
2
|
+
export declare const documentActions: Record<string, AgentMarkdownKind>;
|
|
3
|
+
export declare const codeActions: Set<string>;
|
|
4
|
+
/**
|
|
5
|
+
* The model's schema makes the final output self-describing; while it streams, the helper action
|
|
6
|
+
* gives the client the same semantic cue before a complete JSON value exists.
|
|
7
|
+
*/
|
|
8
|
+
export declare const structuredActions: Record<string, AgentStructuredKind>;
|
|
9
|
+
/**
|
|
10
|
+
* Classifies known model output by source AND shape. The `value` comes from a caller's JSON
|
|
11
|
+
* parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
|
|
15
|
+
* lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
|
|
16
|
+
* are file/shell operations, not model-schema output, so they always render as ToolCalls even
|
|
17
|
+
* when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
|
|
18
|
+
* exactly like an ArtifactSelection.
|
|
19
|
+
*/
|
|
20
|
+
export declare const agentLoopActions: Set<string>;
|
|
21
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/agent/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEpE,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAO7D,CAAA;AAED,eAAO,MAAM,WAAW,aAAuD,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAajE,CAAA;AAED;;;GAGG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,aAG3B,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AgentMarkdownKind, AgentStructuredKind } from './consts.js';
|
|
2
|
+
export const documentActions = {
|
|
3
|
+
'write-specification': AgentMarkdownKind.Specification,
|
|
4
|
+
'summarize-specification': AgentMarkdownKind.Specification,
|
|
5
|
+
'write-design-concept': AgentMarkdownKind.DesignDocument,
|
|
6
|
+
'describe-ui-component': AgentMarkdownKind.DesignDocument,
|
|
7
|
+
'describe-ui-screen': AgentMarkdownKind.DesignDocument,
|
|
8
|
+
'describe-ui-layout': AgentMarkdownKind.DesignDocument,
|
|
9
|
+
};
|
|
10
|
+
export const codeActions = new Set(['code', 'update-code', 'update-code-full']);
|
|
11
|
+
/**
|
|
12
|
+
* The model's schema makes the final output self-describing; while it streams, the helper action
|
|
13
|
+
* gives the client the same semantic cue before a complete JSON value exists.
|
|
14
|
+
*/
|
|
15
|
+
export const structuredActions = {
|
|
16
|
+
'choose-files-for-fix': AgentStructuredKind.ArtifactSelection,
|
|
17
|
+
'list-files-to-fix': AgentStructuredKind.ArtifactSelection,
|
|
18
|
+
'extract-user-stories-from-spec': AgentStructuredKind.StoryPlan,
|
|
19
|
+
'derive-connecting-stories': AgentStructuredKind.StoryPlan,
|
|
20
|
+
'derive-area-scaffold-stories': AgentStructuredKind.StoryPlan,
|
|
21
|
+
'describe-ux-story-transitions': AgentStructuredKind.TransitionPlan,
|
|
22
|
+
'find-entrypoint-for-screen': AgentStructuredKind.EntrypointSelection,
|
|
23
|
+
'describe-api-access': AgentStructuredKind.AccessPolicy,
|
|
24
|
+
'describe-screen-access': AgentStructuredKind.AccessPolicy,
|
|
25
|
+
'plan-scaffold': AgentStructuredKind.ScaffoldPlan,
|
|
26
|
+
'runtime-gate': AgentStructuredKind.RuntimeDecision,
|
|
27
|
+
'detect-story-with-home-screen': AgentStructuredKind.CandidateRanking,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Classifies known model output by source AND shape. The `value` comes from a caller's JSON
|
|
31
|
+
* parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
|
|
35
|
+
* lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
|
|
36
|
+
* are file/shell operations, not model-schema output, so they always render as ToolCalls even
|
|
37
|
+
* when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
|
|
38
|
+
* exactly like an ArtifactSelection.
|
|
39
|
+
*/
|
|
40
|
+
export const agentLoopActions = new Set([
|
|
41
|
+
'coding-agent-ask', 'arbitrary-modification', 'fix-agent', 'architect', 'declaration-lookup',
|
|
42
|
+
'source-extract',
|
|
43
|
+
]);
|
|
44
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/agent/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,qBAAqB,EAAE,iBAAiB,CAAC,aAAa;IACtD,yBAAyB,EAAE,iBAAiB,CAAC,aAAa;IAC1D,sBAAsB,EAAE,iBAAiB,CAAC,cAAc;IACxD,uBAAuB,EAAE,iBAAiB,CAAC,cAAc;IACzD,oBAAoB,EAAE,iBAAiB,CAAC,cAAc;IACtD,oBAAoB,EAAE,iBAAiB,CAAC,cAAc;CACvD,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwC;IACpE,sBAAsB,EAAE,mBAAmB,CAAC,iBAAiB;IAC7D,mBAAmB,EAAE,mBAAmB,CAAC,iBAAiB;IAC1D,gCAAgC,EAAE,mBAAmB,CAAC,SAAS;IAC/D,2BAA2B,EAAE,mBAAmB,CAAC,SAAS;IAC1D,8BAA8B,EAAE,mBAAmB,CAAC,SAAS;IAC7D,+BAA+B,EAAE,mBAAmB,CAAC,cAAc;IACnE,4BAA4B,EAAE,mBAAmB,CAAC,mBAAmB;IACrE,qBAAqB,EAAE,mBAAmB,CAAC,YAAY;IACvD,wBAAwB,EAAE,mBAAmB,CAAC,YAAY;IAC1D,eAAe,EAAE,mBAAmB,CAAC,YAAY;IACjD,cAAc,EAAE,mBAAmB,CAAC,eAAe;IACnD,+BAA+B,EAAE,mBAAmB,CAAC,gBAAgB;CACtE,CAAA;AAED;;;GAGG;AACH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IACtC,kBAAkB,EAAE,wBAAwB,EAAE,WAAW,EAAE,WAAW,EAAE,oBAAoB;IAC5F,gBAAgB;CACjB,CAAC,CAAA"}
|
package/build/agent/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
|
package/build/agent/index.js
CHANGED
package/build/agent/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
|
|
@@ -1,89 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* The server emits this with thinking events and the browser refines it as streaming output
|
|
5
|
-
* becomes parseable. Keeping the vocabulary here prevents the two runtimes from drifting into
|
|
6
|
-
* their own guesses about the same model response.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum AgentMessageCategory {
|
|
9
|
-
Code = "code",
|
|
10
|
-
Diff = "diff",
|
|
11
|
-
Structured = "structured",
|
|
12
|
-
Markdown = "markdown",
|
|
13
|
-
Plain = "plain"
|
|
14
|
-
}
|
|
15
|
-
export declare enum AgentCodeLanguage {
|
|
16
|
-
ReactTsx = "react-tsx",
|
|
17
|
-
Css = "css",
|
|
18
|
-
TypeScript = "typescript",
|
|
19
|
-
Json = "json",
|
|
20
|
-
Other = "other"
|
|
21
|
-
}
|
|
22
|
-
/** A semantic shape that the manager can render as a purpose-built card. */
|
|
23
|
-
export declare enum AgentStructuredKind {
|
|
24
|
-
ToolCalls = "tool-calls",
|
|
25
|
-
ArtifactSelection = "artifact-selection",
|
|
26
|
-
EntitySelection = "entity-selection",
|
|
27
|
-
StoryPlan = "story-plan",
|
|
28
|
-
ScreenPlan = "screen-plan",
|
|
29
|
-
ComponentPlan = "component-plan",
|
|
30
|
-
TransitionPlan = "transition-plan",
|
|
31
|
-
EntrypointSelection = "entrypoint-selection",
|
|
32
|
-
AccessPolicy = "access-policy",
|
|
33
|
-
ScaffoldPlan = "scaffold-plan",
|
|
34
|
-
RuntimeDecision = "runtime-decision",
|
|
35
|
-
CandidateRanking = "candidate-ranking",
|
|
36
|
-
Decision = "decision",
|
|
37
|
-
GenericRecord = "generic-record",
|
|
38
|
-
GenericList = "generic-list",
|
|
39
|
-
GenericValue = "generic-value"
|
|
40
|
-
}
|
|
41
|
-
export declare enum AgentMarkdownKind {
|
|
42
|
-
Specification = "specification",
|
|
43
|
-
DesignDocument = "design-document",
|
|
44
|
-
Documentation = "documentation"
|
|
45
|
-
}
|
|
46
|
-
/** The family of specialist that produced an output, not an authorization role. */
|
|
47
|
-
export declare enum AgentMessageRole {
|
|
48
|
-
Technical = "technical",
|
|
49
|
-
Analytical = "analytical",
|
|
50
|
-
Product = "product",
|
|
51
|
-
Ux = "ux",
|
|
52
|
-
VisualDesign = "visual-design",
|
|
53
|
-
Architect = "architect",
|
|
54
|
-
Developer = "developer",
|
|
55
|
-
Repair = "repair",
|
|
56
|
-
Orchestrator = "orchestrator"
|
|
57
|
-
}
|
|
58
|
-
export interface AgentCodePresentation {
|
|
59
|
-
category: AgentMessageCategory.Code | AgentMessageCategory.Diff;
|
|
60
|
-
language: AgentCodeLanguage;
|
|
61
|
-
role: AgentMessageRole;
|
|
62
|
-
}
|
|
63
|
-
export interface AgentStructuredPresentation {
|
|
64
|
-
category: AgentMessageCategory.Structured;
|
|
65
|
-
structure: AgentStructuredKind;
|
|
66
|
-
role: AgentMessageRole;
|
|
67
|
-
}
|
|
68
|
-
export interface AgentMarkdownPresentation {
|
|
69
|
-
category: AgentMessageCategory.Markdown;
|
|
70
|
-
document: AgentMarkdownKind;
|
|
71
|
-
role: AgentMessageRole;
|
|
72
|
-
}
|
|
73
|
-
export interface AgentPlainPresentation {
|
|
74
|
-
category: AgentMessageCategory.Plain;
|
|
75
|
-
role: AgentMessageRole;
|
|
76
|
-
}
|
|
77
|
-
export type AgentMessagePresentation = AgentCodePresentation | AgentStructuredPresentation | AgentMarkdownPresentation | AgentPlainPresentation;
|
|
78
|
-
/** The attribution and content available to either side of a thinking event. */
|
|
79
|
-
export interface AgentMessageClassificationInput {
|
|
80
|
-
agent?: string;
|
|
81
|
-
helper?: string;
|
|
82
|
-
action?: string;
|
|
83
|
-
outputType?: string;
|
|
84
|
-
text?: string;
|
|
85
|
-
value?: unknown;
|
|
86
|
-
}
|
|
1
|
+
import { AgentCodeLanguage, AgentMessageRole } from './consts.js';
|
|
2
|
+
import type { AgentMessageClassificationInput, AgentMessagePresentation } from './types.js';
|
|
87
3
|
/**
|
|
88
4
|
* Source extraction is an internal context-reduction pass. Its terminal tool call contains only
|
|
89
5
|
* line ranges, which are useful to the coder but add no useful information to a person's journal.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/agent/presentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/agent/presentation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA2C,gBAAgB,EAAuB,MAAM,aAAa,CAAA;AAE/H,OAAO,KAAK,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAc3F;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,OACxC,CAAA;AAEtC,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,UAAW,+BAA+B,KAAG,gBAgB3E,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,OAIvD,CAAA;AAkDD,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAGlD,CAAA;AAaD,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,iBAmBlD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,OACuD,CAAA;AAcpG,eAAO,MAAM,oBAAoB,UAAW,+BAA+B,KAAG,wBAsC7E,CAAA"}
|
|
@@ -1,92 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* The server emits this with thinking events and the browser refines it as streaming output
|
|
5
|
-
* becomes parseable. Keeping the vocabulary here prevents the two runtimes from drifting into
|
|
6
|
-
* their own guesses about the same model response.
|
|
7
|
-
*/
|
|
8
|
-
export var AgentMessageCategory;
|
|
9
|
-
(function (AgentMessageCategory) {
|
|
10
|
-
AgentMessageCategory["Code"] = "code";
|
|
11
|
-
AgentMessageCategory["Diff"] = "diff";
|
|
12
|
-
AgentMessageCategory["Structured"] = "structured";
|
|
13
|
-
AgentMessageCategory["Markdown"] = "markdown";
|
|
14
|
-
AgentMessageCategory["Plain"] = "plain";
|
|
15
|
-
})(AgentMessageCategory || (AgentMessageCategory = {}));
|
|
16
|
-
export var AgentCodeLanguage;
|
|
17
|
-
(function (AgentCodeLanguage) {
|
|
18
|
-
AgentCodeLanguage["ReactTsx"] = "react-tsx";
|
|
19
|
-
AgentCodeLanguage["Css"] = "css";
|
|
20
|
-
AgentCodeLanguage["TypeScript"] = "typescript";
|
|
21
|
-
AgentCodeLanguage["Json"] = "json";
|
|
22
|
-
AgentCodeLanguage["Other"] = "other";
|
|
23
|
-
})(AgentCodeLanguage || (AgentCodeLanguage = {}));
|
|
24
|
-
/** A semantic shape that the manager can render as a purpose-built card. */
|
|
25
|
-
export var AgentStructuredKind;
|
|
26
|
-
(function (AgentStructuredKind) {
|
|
27
|
-
AgentStructuredKind["ToolCalls"] = "tool-calls";
|
|
28
|
-
AgentStructuredKind["ArtifactSelection"] = "artifact-selection";
|
|
29
|
-
AgentStructuredKind["EntitySelection"] = "entity-selection";
|
|
30
|
-
AgentStructuredKind["StoryPlan"] = "story-plan";
|
|
31
|
-
AgentStructuredKind["ScreenPlan"] = "screen-plan";
|
|
32
|
-
AgentStructuredKind["ComponentPlan"] = "component-plan";
|
|
33
|
-
AgentStructuredKind["TransitionPlan"] = "transition-plan";
|
|
34
|
-
AgentStructuredKind["EntrypointSelection"] = "entrypoint-selection";
|
|
35
|
-
AgentStructuredKind["AccessPolicy"] = "access-policy";
|
|
36
|
-
AgentStructuredKind["ScaffoldPlan"] = "scaffold-plan";
|
|
37
|
-
AgentStructuredKind["RuntimeDecision"] = "runtime-decision";
|
|
38
|
-
AgentStructuredKind["CandidateRanking"] = "candidate-ranking";
|
|
39
|
-
AgentStructuredKind["Decision"] = "decision";
|
|
40
|
-
AgentStructuredKind["GenericRecord"] = "generic-record";
|
|
41
|
-
AgentStructuredKind["GenericList"] = "generic-list";
|
|
42
|
-
AgentStructuredKind["GenericValue"] = "generic-value";
|
|
43
|
-
})(AgentStructuredKind || (AgentStructuredKind = {}));
|
|
44
|
-
export var AgentMarkdownKind;
|
|
45
|
-
(function (AgentMarkdownKind) {
|
|
46
|
-
AgentMarkdownKind["Specification"] = "specification";
|
|
47
|
-
AgentMarkdownKind["DesignDocument"] = "design-document";
|
|
48
|
-
AgentMarkdownKind["Documentation"] = "documentation";
|
|
49
|
-
})(AgentMarkdownKind || (AgentMarkdownKind = {}));
|
|
50
|
-
/** The family of specialist that produced an output, not an authorization role. */
|
|
51
|
-
export var AgentMessageRole;
|
|
52
|
-
(function (AgentMessageRole) {
|
|
53
|
-
AgentMessageRole["Technical"] = "technical";
|
|
54
|
-
AgentMessageRole["Analytical"] = "analytical";
|
|
55
|
-
AgentMessageRole["Product"] = "product";
|
|
56
|
-
AgentMessageRole["Ux"] = "ux";
|
|
57
|
-
AgentMessageRole["VisualDesign"] = "visual-design";
|
|
58
|
-
AgentMessageRole["Architect"] = "architect";
|
|
59
|
-
AgentMessageRole["Developer"] = "developer";
|
|
60
|
-
AgentMessageRole["Repair"] = "repair";
|
|
61
|
-
AgentMessageRole["Orchestrator"] = "orchestrator";
|
|
62
|
-
})(AgentMessageRole || (AgentMessageRole = {}));
|
|
63
|
-
const documentActions = {
|
|
64
|
-
'write-specification': AgentMarkdownKind.Specification,
|
|
65
|
-
'summarize-specification': AgentMarkdownKind.Specification,
|
|
66
|
-
'write-design-concept': AgentMarkdownKind.DesignDocument,
|
|
67
|
-
'describe-ui-component': AgentMarkdownKind.DesignDocument,
|
|
68
|
-
'describe-ui-screen': AgentMarkdownKind.DesignDocument,
|
|
69
|
-
'describe-ui-layout': AgentMarkdownKind.DesignDocument,
|
|
70
|
-
};
|
|
71
|
-
const codeActions = new Set(['code', 'update-code', 'update-code-full']);
|
|
72
|
-
/**
|
|
73
|
-
* The model's schema makes the final output self-describing; while it streams, the helper action
|
|
74
|
-
* gives the client the same semantic cue before a complete JSON value exists.
|
|
75
|
-
*/
|
|
76
|
-
const structuredActions = {
|
|
77
|
-
'choose-files-for-fix': AgentStructuredKind.ArtifactSelection,
|
|
78
|
-
'list-files-to-fix': AgentStructuredKind.ArtifactSelection,
|
|
79
|
-
'extract-user-stories-from-spec': AgentStructuredKind.StoryPlan,
|
|
80
|
-
'derive-connecting-stories': AgentStructuredKind.StoryPlan,
|
|
81
|
-
'derive-area-scaffold-stories': AgentStructuredKind.StoryPlan,
|
|
82
|
-
'describe-ux-story-transitions': AgentStructuredKind.TransitionPlan,
|
|
83
|
-
'find-entrypoint-for-screen': AgentStructuredKind.EntrypointSelection,
|
|
84
|
-
'describe-api-access': AgentStructuredKind.AccessPolicy,
|
|
85
|
-
'describe-screen-access': AgentStructuredKind.AccessPolicy,
|
|
86
|
-
'plan-scaffold': AgentStructuredKind.ScaffoldPlan,
|
|
87
|
-
'runtime-gate': AgentStructuredKind.RuntimeDecision,
|
|
88
|
-
'detect-story-with-home-screen': AgentStructuredKind.CandidateRanking,
|
|
89
|
-
};
|
|
1
|
+
import { agentLoopActions, codeActions, documentActions, structuredActions } from './consts.local.js';
|
|
2
|
+
import { AgentCodeLanguage, AgentMarkdownKind, AgentMessageCategory, AgentMessageRole, AgentStructuredKind } from './consts.js';
|
|
90
3
|
const asRecord = (value) => value != null && typeof value === 'object' && !Array.isArray(value)
|
|
91
4
|
? value
|
|
92
5
|
: undefined;
|
|
@@ -241,21 +154,6 @@ const markdownKindOf = (text) => {
|
|
|
241
154
|
const listItems = text.match(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/gm)?.length ?? 0;
|
|
242
155
|
return listItems >= 2 ? AgentMarkdownKind.Documentation : undefined;
|
|
243
156
|
};
|
|
244
|
-
/**
|
|
245
|
-
* Classifies known model output by source AND shape. The `value` comes from a caller's JSON
|
|
246
|
-
* parser; this runtime-free package intentionally never repairs or parses streamed JSON itself.
|
|
247
|
-
*/
|
|
248
|
-
/**
|
|
249
|
-
* Actions run by an unconstrained tool-calling loop (the coding agent, the repair/architect/
|
|
250
|
-
* lookup sub-agents, source extraction) rather than a single pinned-schema call. Their tool calls
|
|
251
|
-
* are file/shell operations, not model-schema output, so they always render as ToolCalls even
|
|
252
|
-
* when a call's arguments happen to shape-match a schema kind — `read_sources({ files })` looks
|
|
253
|
-
* exactly like an ArtifactSelection.
|
|
254
|
-
*/
|
|
255
|
-
const agentLoopActions = new Set([
|
|
256
|
-
'coding-agent-ask', 'arbitrary-modification', 'fix-agent', 'architect', 'declaration-lookup',
|
|
257
|
-
'source-extract',
|
|
258
|
-
]);
|
|
259
157
|
const isGenericStructure = (kind) => kind == null || kind === AgentStructuredKind.GenericRecord || kind === AgentStructuredKind.GenericList ||
|
|
260
158
|
kind === AgentStructuredKind.GenericValue;
|
|
261
159
|
export const classifyAgentMessage = (input) => {
|