@executioncontrolprotocol/harnesses-browser-nano 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +42 -0
  2. package/dist/_internal/request-capability-hints.d.ts +49 -0
  3. package/dist/_internal/request-capability-hints.d.ts.map +1 -0
  4. package/dist/_internal/request-capability-hints.js +488 -0
  5. package/dist/_internal/request-capability-hints.js.map +1 -0
  6. package/dist/browser-nano-harness.d.ts +71 -0
  7. package/dist/browser-nano-harness.d.ts.map +1 -0
  8. package/dist/browser-nano-harness.js +90 -0
  9. package/dist/browser-nano-harness.js.map +1 -0
  10. package/dist/harness-ids.d.ts +6 -0
  11. package/dist/harness-ids.d.ts.map +1 -0
  12. package/dist/harness-ids.js +6 -0
  13. package/dist/harness-ids.js.map +1 -0
  14. package/dist/harness-nano-config.d.ts +53 -0
  15. package/dist/harness-nano-config.d.ts.map +1 -0
  16. package/dist/harness-nano-config.js +94 -0
  17. package/dist/harness-nano-config.js.map +1 -0
  18. package/dist/index.d.ts +13 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +12 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/intent-classification.d.ts +10 -0
  23. package/dist/intent-classification.d.ts.map +1 -0
  24. package/dist/intent-classification.js +177 -0
  25. package/dist/intent-classification.js.map +1 -0
  26. package/dist/multi-shot-chat.d.ts +20 -0
  27. package/dist/multi-shot-chat.d.ts.map +1 -0
  28. package/dist/multi-shot-chat.js +136 -0
  29. package/dist/multi-shot-chat.js.map +1 -0
  30. package/dist/prompts/build-nano-prompt.d.ts +11 -0
  31. package/dist/prompts/build-nano-prompt.d.ts.map +1 -0
  32. package/dist/prompts/build-nano-prompt.js +17 -0
  33. package/dist/prompts/build-nano-prompt.js.map +1 -0
  34. package/dist/prompts/fixtures-root.d.ts +5 -0
  35. package/dist/prompts/fixtures-root.d.ts.map +1 -0
  36. package/dist/prompts/fixtures-root.js +7 -0
  37. package/dist/prompts/fixtures-root.js.map +1 -0
  38. package/dist/prompts/index.d.ts +4 -0
  39. package/dist/prompts/index.d.ts.map +1 -0
  40. package/dist/prompts/index.js +4 -0
  41. package/dist/prompts/index.js.map +1 -0
  42. package/dist/prompts/load-harness-prompt.browser.d.ts +4 -0
  43. package/dist/prompts/load-harness-prompt.browser.d.ts.map +1 -0
  44. package/dist/prompts/load-harness-prompt.browser.js +32 -0
  45. package/dist/prompts/load-harness-prompt.browser.js.map +1 -0
  46. package/dist/prompts/load-harness-prompt.d.ts +2 -0
  47. package/dist/prompts/load-harness-prompt.d.ts.map +1 -0
  48. package/dist/prompts/load-harness-prompt.js +2 -0
  49. package/dist/prompts/load-harness-prompt.js.map +1 -0
  50. package/dist/prompts/load-harness-prompt.node.d.ts +4 -0
  51. package/dist/prompts/load-harness-prompt.node.d.ts.map +1 -0
  52. package/dist/prompts/load-harness-prompt.node.js +20 -0
  53. package/dist/prompts/load-harness-prompt.node.js.map +1 -0
  54. package/dist/prompts/nano-prompt-fixture-ids.d.ts +10 -0
  55. package/dist/prompts/nano-prompt-fixture-ids.d.ts.map +1 -0
  56. package/dist/prompts/nano-prompt-fixture-ids.js +8 -0
  57. package/dist/prompts/nano-prompt-fixture-ids.js.map +1 -0
  58. package/dist/register.d.ts +5 -0
  59. package/dist/register.d.ts.map +1 -0
  60. package/dist/register.js +14 -0
  61. package/dist/register.js.map +1 -0
  62. package/dist/workflow-assistant.d.ts +19 -0
  63. package/dist/workflow-assistant.d.ts.map +1 -0
  64. package/dist/workflow-assistant.js +275 -0
  65. package/dist/workflow-assistant.js.map +1 -0
  66. package/dist/workflow-authoring.d.ts +13 -0
  67. package/dist/workflow-authoring.d.ts.map +1 -0
  68. package/dist/workflow-authoring.js +426 -0
  69. package/dist/workflow-authoring.js.map +1 -0
  70. package/fixtures/eval-cases/assistant.cases.json +658 -0
  71. package/fixtures/eval-cases/chat.cases.json +320 -0
  72. package/fixtures/eval-cases/flow.cases.json +505 -0
  73. package/fixtures/eval-cases/intent.cases.json +587 -0
  74. package/fixtures/eval-cases/workflow-create.cases.json +493 -0
  75. package/fixtures/eval-cases/workflow-patch.cases.json +379 -0
  76. package/fixtures/harness-prompts/intent-classification.prompt.json +72 -0
  77. package/fixtures/harness-prompts/workflow-assistant.prompt.json +86 -0
  78. package/fixtures/harness-prompts/workflow-authoring-create.prompt.json +50 -0
  79. package/fixtures/harness-prompts/workflow-authoring-patch.prompt.json +54 -0
  80. package/fixtures/runs/completed-with-refs.json +18 -0
  81. package/fixtures/runs/failed-echo-step.json +29 -0
  82. package/fixtures/runs/running-pending.json +14 -0
  83. package/fixtures/workflows/echo-validate-reorder.json +26 -0
  84. package/fixtures/workflows/echo-workflow.json +20 -0
  85. package/fixtures/workflows/multi-cap-workflow.json +34 -0
  86. package/fixtures/workflows/two-step-chain.json +26 -0
  87. package/package.json +49 -0
@@ -0,0 +1,29 @@
1
+ {
2
+ "run": {
3
+ "schema": "@executioncontrolprotocol.run.result",
4
+ "version": "1.0",
5
+ "run": { "id": "run-failed-echo", "status": "failed" },
6
+ "history": {
7
+ "echo": {
8
+ "status": "failed",
9
+ "output": { "error": "Echo step rejected input: value must be non-empty" },
10
+ "attempts": 1
11
+ }
12
+ }
13
+ },
14
+ "workflow": {
15
+ "schema": "@executioncontrolprotocol.workflow",
16
+ "version": "1.0",
17
+ "workflow": { "id": "echo-test", "label": "Echo test" },
18
+ "steps": [
19
+ {
20
+ "type": "step",
21
+ "id": "echo",
22
+ "label": "Echo",
23
+ "uses": "@executioncontrolprotocol/test.echo",
24
+ "input": { "value": "" },
25
+ "as": "echo"
26
+ }
27
+ ]
28
+ }
29
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "run": {
3
+ "schema": "@executioncontrolprotocol.run.result",
4
+ "version": "1.0",
5
+ "run": { "id": "run-started", "status": "started" },
6
+ "state": { "pendingStep": "echo" },
7
+ "history": {
8
+ "echo": {
9
+ "status": "started",
10
+ "attempts": 1
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schema": "@executioncontrolprotocol.workflow",
3
+ "version": "1.0",
4
+ "workflow": {
5
+ "id": "echo-validate",
6
+ "label": "Echo validate reorder"
7
+ },
8
+ "steps": [
9
+ {
10
+ "type": "step",
11
+ "id": "echo",
12
+ "label": "Echo",
13
+ "uses": "@executioncontrolprotocol/test.echo",
14
+ "input": { "value": "before-validate" },
15
+ "as": "echo"
16
+ },
17
+ {
18
+ "type": "step",
19
+ "id": "validate",
20
+ "label": "Validate",
21
+ "uses": "@executioncontrolprotocol/test.validate",
22
+ "input": { "payload": { "ok": true } },
23
+ "as": "validated"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "schema": "@executioncontrolprotocol.workflow",
3
+ "version": "1.0",
4
+ "workflow": {
5
+ "id": "echo-test",
6
+ "label": "Echo test"
7
+ },
8
+ "steps": [
9
+ {
10
+ "type": "step",
11
+ "id": "echo",
12
+ "label": "Echo",
13
+ "uses": "@executioncontrolprotocol/test.echo",
14
+ "input": {
15
+ "value": "hello from fluent API"
16
+ },
17
+ "as": "echo"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "schema": "@executioncontrolprotocol.workflow",
3
+ "version": "1.0",
4
+ "workflow": {
5
+ "id": "multi-cap",
6
+ "label": "Multi capability"
7
+ },
8
+ "steps": [
9
+ {
10
+ "type": "step",
11
+ "id": "validate",
12
+ "label": "Validate",
13
+ "uses": "@executioncontrolprotocol/test.validate",
14
+ "input": { "payload": { "ok": true } },
15
+ "as": "validated"
16
+ },
17
+ {
18
+ "type": "step",
19
+ "id": "echo",
20
+ "label": "Echo",
21
+ "uses": "@executioncontrolprotocol/test.echo",
22
+ "input": { "value": "after-validate" },
23
+ "as": "echo"
24
+ },
25
+ {
26
+ "type": "step",
27
+ "id": "notify",
28
+ "label": "Notify",
29
+ "uses": "@executioncontrolprotocol/test.notify",
30
+ "input": { "payload": { "$ref": "state.echo.output" } },
31
+ "as": "notified"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schema": "@executioncontrolprotocol.workflow",
3
+ "version": "1.0",
4
+ "workflow": {
5
+ "id": "two-step-chain",
6
+ "label": "Two step chain"
7
+ },
8
+ "steps": [
9
+ {
10
+ "type": "step",
11
+ "id": "echo",
12
+ "label": "Echo",
13
+ "uses": "@executioncontrolprotocol/test.echo",
14
+ "input": { "value": "seed" },
15
+ "as": "echo"
16
+ },
17
+ {
18
+ "type": "step",
19
+ "id": "summarize",
20
+ "label": "Summarize",
21
+ "uses": "@executioncontrolprotocol/test.summarize",
22
+ "input": { "payload": { "$ref": "state.echo.output" } },
23
+ "as": "summary"
24
+ }
25
+ ]
26
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@executioncontrolprotocol/harnesses-browser-nano",
3
+ "version": "0.10.0",
4
+ "description": "Browser Nano ECP harness for on-device and small models (demo + eval matrix)",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./prompts": {
16
+ "types": "./dist/prompts/index.d.ts",
17
+ "import": "./dist/prompts/index.js"
18
+ },
19
+ "./request-capability-hints": {
20
+ "types": "./dist/_internal/request-capability-hints.d.ts",
21
+ "import": "./dist/_internal/request-capability-hints.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "fixtures",
27
+ "README.md"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsc -b",
31
+ "eval:matrix": "vitest run --config ../../../vitest.config.mts --project eval packages/harnesses/browser-nano/test/eval"
32
+ },
33
+ "peerDependencies": {
34
+ "@executioncontrolprotocol/core": "^0.10.0",
35
+ "@executioncontrolprotocol/types": "^0.10.0",
36
+ "zod": "^3.24.0"
37
+ },
38
+ "devDependencies": {
39
+ "@executioncontrolprotocol/core": "0.10.0",
40
+ "@executioncontrolprotocol/evals": "0.10.0",
41
+ "@executioncontrolprotocol/extension-ollama": "0.10.0",
42
+ "@executioncontrolprotocol/format-eql": "0.10.0",
43
+ "@executioncontrolprotocol/format-toon": "0.10.0",
44
+ "@executioncontrolprotocol/node": "0.10.0",
45
+ "@executioncontrolprotocol/types": "0.10.0",
46
+ "typescript": "^5.7.0",
47
+ "zod": "^3.24.0"
48
+ }
49
+ }