@owlmeans/viable-common 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +109 -57
- package/build/ba/index.d.ts +0 -1
- package/build/ba/index.d.ts.map +1 -1
- package/build/ba/index.js +0 -1
- package/build/ba/index.js.map +1 -1
- package/build/blueprint/case.js +3 -3
- package/build/blueprint/consts.d.ts +38 -0
- package/build/blueprint/consts.d.ts.map +1 -1
- package/build/blueprint/consts.js +40 -0
- package/build/blueprint/consts.js.map +1 -1
- package/build/blueprint/index.d.ts +0 -3
- package/build/blueprint/index.d.ts.map +1 -1
- package/build/blueprint/index.js +0 -3
- package/build/blueprint/index.js.map +1 -1
- package/build/blueprint/types.d.ts +5 -5
- package/build/connect/errors.d.ts +23 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +50 -0
- package/build/connect/errors.js.map +1 -1
- package/build/intent/consts.d.ts +57 -0
- package/build/intent/consts.d.ts.map +1 -0
- package/build/intent/consts.js +58 -0
- package/build/intent/consts.js.map +1 -0
- package/build/intent/entrypoints.d.ts +27 -0
- package/build/intent/entrypoints.d.ts.map +1 -0
- package/build/intent/entrypoints.js +28 -0
- package/build/intent/entrypoints.js.map +1 -0
- package/build/intent/errors.d.ts +20 -0
- package/build/intent/errors.d.ts.map +1 -0
- package/build/intent/errors.js +28 -0
- package/build/intent/errors.js.map +1 -0
- package/build/intent/flow.d.ts +17 -0
- package/build/intent/flow.d.ts.map +1 -0
- package/build/intent/flow.js +65 -0
- package/build/intent/flow.js.map +1 -0
- package/build/intent/index.d.ts +7 -0
- package/build/intent/index.d.ts.map +1 -0
- package/build/intent/index.js +6 -0
- package/build/intent/index.js.map +1 -0
- package/build/intent/schemas.d.ts +10 -0
- package/build/intent/schemas.d.ts.map +1 -0
- package/build/intent/schemas.js +24 -0
- package/build/intent/schemas.js.map +1 -0
- package/build/intent/types.d.ts +40 -0
- package/build/intent/types.d.ts.map +1 -0
- package/build/intent/types.js +2 -0
- package/build/intent/types.js.map +1 -0
- package/build/skills/catalogue.d.ts.map +1 -1
- package/build/skills/catalogue.js +15 -1
- package/build/skills/catalogue.js.map +1 -1
- package/build/skills/consts.d.ts +0 -34
- package/build/skills/consts.d.ts.map +1 -1
- package/build/skills/consts.js +0 -106
- package/build/skills/consts.js.map +1 -1
- package/build/skills/index.d.ts +0 -1
- package/build/skills/index.d.ts.map +1 -1
- package/build/skills/index.js +0 -1
- package/build/skills/index.js.map +1 -1
- package/build/skills/roles.d.ts +0 -9
- package/build/skills/roles.d.ts.map +1 -1
- package/build/skills/roles.js +0 -226
- package/build/skills/roles.js.map +1 -1
- package/package.json +18 -8
- package/src/ba/index.ts +0 -1
- package/src/blueprint/consts.ts +40 -0
- package/src/blueprint/index.ts +0 -3
- package/src/blueprint/types.ts +5 -5
- package/src/connect/errors.ts +55 -0
- package/src/intent/consts.ts +66 -0
- package/src/intent/entrypoints.ts +43 -0
- package/src/intent/errors.ts +33 -0
- package/src/intent/flow.ts +67 -0
- package/src/intent/index.ts +6 -0
- package/src/intent/schemas.ts +27 -0
- package/src/intent/types.ts +45 -0
- package/src/skills/consts.ts +0 -112
- package/src/skills/index.ts +0 -1
- package/src/skills/roles.ts +0 -267
- package/tests/blueprint.spec.ts +2 -66
- package/tests/connect-errors.spec.ts +31 -1
- package/tests/error-status.spec.ts +6 -1
- package/tests/intent.spec.ts +121 -0
- package/src/ba/schemas.ts +0 -196
- package/src/blueprint/case.ts +0 -320
- package/src/blueprint/resolve.ts +0 -136
- package/src/blueprint/schemas.ts +0 -44
- package/src/skills/catalogue.ts +0 -1850
- package/tests/skills.spec.ts +0 -110
package/tests/skills.spec.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test'
|
|
2
|
-
|
|
3
|
-
import { SKILL_ORDER, ViableSkill } from '../src/skills/consts.js'
|
|
4
|
-
import { VIABLE_SKILLS, viableSkill } from '../src/skills/catalogue.js'
|
|
5
|
-
import { VIABLE_PERSONAS, ViablePersona } from '../src/skills/roles.js'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Pins the catalogue's own "wrap exactly once" teaching — the incident this guards against was
|
|
9
|
-
* the catalogue itself showing a handler module that wraps itself (`OwlMeansServer`), while the
|
|
10
|
-
* deterministic stampers and every OTHER skill always wrap again at the binding site. Both halves
|
|
11
|
-
* have to agree, or a coder reading both produces exactly the double wrap that made every request
|
|
12
|
-
* to a "completed" story fail with `TypeError: handler is not a function`.
|
|
13
|
-
*/
|
|
14
|
-
describe('viable-common catalogue — handler wrap-once', () => {
|
|
15
|
-
it('OwlMeansServer shows a plain handler module, the single wrap at bind, and the WRONG double wrap', () => {
|
|
16
|
-
const body = viableSkill(ViableSkill.OwlMeansServer).body
|
|
17
|
-
|
|
18
|
-
expect(body).toContain('handleTaskCreate')
|
|
19
|
-
expect(body).toContain('api.body(protocols.api.task.create, handleTaskCreate)')
|
|
20
|
-
expect(body).toContain('WRONG')
|
|
21
|
-
expect(body).toContain('BoundEntrypointHandler')
|
|
22
|
-
expect(body).toContain('handler is not a function')
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
it('WorkerJobs §3 does not say the processor module itself calls handlers()', () => {
|
|
26
|
-
const body = viableSkill(ViableSkill.WorkerJobs).body
|
|
27
|
-
|
|
28
|
-
expect(body).not.toContain('created with `handlers<Context>()`')
|
|
29
|
-
expect(body).toContain('PLAIN exported async function')
|
|
30
|
-
expect(body).toContain('WRONG')
|
|
31
|
-
expect(body).toContain('handleReportBuildJob')
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('FixerHeuristics reads a double-wrapped binding and a wrong-extension package specifier', () => {
|
|
35
|
-
const body = viableSkill(ViableSkill.FixerHeuristics).body
|
|
36
|
-
|
|
37
|
-
expect(body).toContain('BoundEntrypointHandler')
|
|
38
|
-
expect(body).toContain('TWICE')
|
|
39
|
-
expect(body).toContain("project-common/")
|
|
40
|
-
expect(body).toContain("project-backend/")
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('OwlmeansContext and OwlmeansState show no project-common/project-backend deep import with an extension', () => {
|
|
44
|
-
for (const alias of [ViableSkill.OwlmeansContext, ViableSkill.OwlmeansState]) {
|
|
45
|
-
expect(viableSkill(alias).body).not.toMatch(/project-(?:common|backend)\/[^\s'"`]*\.(?:js|type)\b/)
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The prompt service SKIPS an alias it cannot resolve, so a skill in the enum with no body is a
|
|
52
|
-
* rule no model ever receives — nothing fails, the prompt simply lacks it.
|
|
53
|
-
*/
|
|
54
|
-
describe('viable-common catalogue — completeness', () => {
|
|
55
|
-
it('declares one body and one sort weight for every skill in the enum', () => {
|
|
56
|
-
const declared = VIABLE_SKILLS.map(entry => entry.alias)
|
|
57
|
-
|
|
58
|
-
expect(Object.values(ViableSkill).filter(alias => !declared.includes(alias))).toEqual([])
|
|
59
|
-
expect(new Set(declared).size).toBe(declared.length)
|
|
60
|
-
for (const alias of Object.values(ViableSkill)) {
|
|
61
|
-
expect(typeof SKILL_ORDER[alias], alias).toBe('number')
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The house style is taught in two places a designer and a coder read — the visual designer's
|
|
68
|
-
* persona and the shadcn skill — and a template ships the same values. Neither may drift back
|
|
69
|
-
* to teaching the decoration the template now paints flat.
|
|
70
|
-
*/
|
|
71
|
-
describe('viable-common catalogue — the house style', () => {
|
|
72
|
-
it('ShadcnUi teaches the white ground, one accent and flat depth, and repaints the old classes', () => {
|
|
73
|
-
const body = viableSkill(ViableSkill.ShadcnUi).body
|
|
74
|
-
|
|
75
|
-
expect(body).toContain('bg-background')
|
|
76
|
-
expect(body).toContain('ONE product accent')
|
|
77
|
-
expect(body).toContain('shadow-floating')
|
|
78
|
-
expect(body).toContain('REPAINTED flat')
|
|
79
|
-
expect(body).toContain('explicitly asks')
|
|
80
|
-
expect(body).not.toContain('DECORATION VOCABULARY')
|
|
81
|
-
expect(body).not.toMatch(/\/\/ right[^\n]*gradient/)
|
|
82
|
-
expect(body).toContain('SelectItem')
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
it('the visual designer defaults to the house style and changes it only on an explicit ask', () => {
|
|
86
|
-
const role = VIABLE_PERSONAS[ViablePersona.VisualDesigner].role
|
|
87
|
-
|
|
88
|
-
expect(role).toContain('white ground')
|
|
89
|
-
expect(role).toContain('ONE')
|
|
90
|
-
expect(role).toContain('explicitly asks')
|
|
91
|
-
expect(role).not.toContain('expressive and bright')
|
|
92
|
-
expect(role).not.toMatch(/default to .*gradients/)
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
it('LandingGate teaches the gate card, the synchronous handoff and the screen that reads it', () => {
|
|
96
|
-
const body = viableSkill(ViableSkill.LandingGate).body
|
|
97
|
-
|
|
98
|
-
expect(body).toContain('data-home-gate')
|
|
99
|
-
expect(body).toContain('aria-pressed')
|
|
100
|
-
expect(body).toContain('useLandingStart(target)')
|
|
101
|
-
expect(body).toContain('useLandingContinuation')
|
|
102
|
-
expect(body).toContain('readLandingHandoff')
|
|
103
|
-
expect(body).toContain('clearLandingHandoff()')
|
|
104
|
-
// Named only as the thing NOT to do: its continuation lands on the guarded screen.
|
|
105
|
-
expect(body).toContain('NEVER `useLogin(target)`')
|
|
106
|
-
expect(body).toContain('SYNCHRONOUS')
|
|
107
|
-
expect(body).toContain('WRONG')
|
|
108
|
-
expect(body).not.toContain('${')
|
|
109
|
-
})
|
|
110
|
-
})
|