@piagent/platform 1.5.2 → 1.5.4

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 (128) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/README.md +8 -2
  3. package/README.vi.md +23 -1
  4. package/benchmarks/capability-v1/DESIGN.md +30 -0
  5. package/benchmarks/capability-v1/coverage.json +23 -1
  6. package/benchmarks/capability-v1/grade.mjs +246 -0
  7. package/benchmarks/capability-v1/project/apps/web/src/control-view.js +3 -0
  8. package/benchmarks/capability-v1/project/apps/web/src/timeline-view.js +3 -0
  9. package/benchmarks/capability-v1/project/packages/session/src/admission.js +7 -0
  10. package/benchmarks/capability-v1/project/packages/session/src/runtime-route.js +3 -0
  11. package/benchmarks/capability-v1/project/packages/timeline/src/checkpoint.js +7 -0
  12. package/benchmarks/capability-v1/project/packages/timeline/src/project.js +7 -0
  13. package/benchmarks/capability-v1/project/test/smoke.test.js +19 -1
  14. package/benchmarks/capability-v1/prompts/causal-timeline-recovery.md +47 -0
  15. package/benchmarks/capability-v1/prompts/durable-session-control-plane.md +47 -0
  16. package/benchmarks/capability-v1/references/causal-timeline-recovery/apps/web/src/timeline-view.js +9 -0
  17. package/benchmarks/capability-v1/references/causal-timeline-recovery/packages/timeline/src/checkpoint.js +22 -0
  18. package/benchmarks/capability-v1/references/causal-timeline-recovery/packages/timeline/src/project.js +77 -0
  19. package/benchmarks/capability-v1/references/durable-session-control-plane/apps/web/src/control-view.js +4 -0
  20. package/benchmarks/capability-v1/references/durable-session-control-plane/packages/session/src/admission.js +52 -0
  21. package/benchmarks/capability-v1/references/durable-session-control-plane/packages/session/src/runtime-route.js +27 -0
  22. package/benchmarks/capability-v1/rubric.json +26 -0
  23. package/benchmarks/capability-v1/suite.json +32 -4
  24. package/benchmarks/capability-v1/variant.mjs +11 -0
  25. package/benchmarks/deep-logic-v1/grade.mjs +165 -0
  26. package/benchmarks/deep-logic-v1/project/README.md +3 -0
  27. package/benchmarks/deep-logic-v1/project/package.json +6 -0
  28. package/benchmarks/deep-logic-v1/project/src/config-transaction.js +3 -0
  29. package/benchmarks/deep-logic-v1/project/src/context-pack.js +3 -0
  30. package/benchmarks/deep-logic-v1/project/src/event-reconcile.js +3 -0
  31. package/benchmarks/deep-logic-v1/project/src/policy.js +3 -0
  32. package/benchmarks/deep-logic-v1/project/src/scheduler.js +3 -0
  33. package/benchmarks/deep-logic-v1/project/src/stream.js +3 -0
  34. package/benchmarks/deep-logic-v1/project/test/smoke.test.js +20 -0
  35. package/benchmarks/deep-logic-v1/prompts/budgeted-context-graph.md +13 -0
  36. package/benchmarks/deep-logic-v1/prompts/fair-dependency-scheduler.md +13 -0
  37. package/benchmarks/deep-logic-v1/prompts/layered-policy-resolution.md +14 -0
  38. package/benchmarks/deep-logic-v1/prompts/resumable-stream-assembly.md +13 -0
  39. package/benchmarks/deep-logic-v1/prompts/revision-event-reconciliation.md +14 -0
  40. package/benchmarks/deep-logic-v1/prompts/transactional-config-merge.md +13 -0
  41. package/benchmarks/deep-logic-v1/suite.json +95 -0
  42. package/benchmarks/deep-logic-v1/variant.mjs +28 -0
  43. package/docs/command-reference-vietnamese.md +5 -2
  44. package/docs/distribution-standard.md +7 -7
  45. package/docs/languages.json +2 -2
  46. package/docs/operator-manual-vietnamese.md +7 -7
  47. package/docs/publishing-for-teams.md +7 -0
  48. package/docs/quality-benchmark.md +49 -10
  49. package/docs/release-install-policy.md +6 -6
  50. package/docs/security-threat-model.md +1 -1
  51. package/docs/team-onboarding.md +2 -2
  52. package/docs-site/architecture.html +1 -1
  53. package/docs-site/benchmark.html +1 -1
  54. package/docs-site/commands.html +1 -1
  55. package/docs-site/context-engine.html +1 -1
  56. package/docs-site/en/architecture.html +1 -1
  57. package/docs-site/en/benchmark.html +1 -1
  58. package/docs-site/en/commands.html +1 -1
  59. package/docs-site/en/context-engine.html +1 -1
  60. package/docs-site/en/index.html +1 -1
  61. package/docs-site/en/mcp-approval.html +1 -1
  62. package/docs-site/en/mcp-auth.html +1 -1
  63. package/docs-site/en/mcp-servers.html +1 -1
  64. package/docs-site/en/mcp.html +1 -1
  65. package/docs-site/en/permissions.html +1 -1
  66. package/docs-site/en/profiles.html +1 -1
  67. package/docs-site/en/quickstart.html +1 -1
  68. package/docs-site/en/runtime.html +1 -1
  69. package/docs-site/en/scope.html +1 -1
  70. package/docs-site/en/security.html +1 -1
  71. package/docs-site/en/team.html +1 -1
  72. package/docs-site/en/whats-new.html +1 -1
  73. package/docs-site/en/workflows.html +1 -1
  74. package/docs-site/index.html +1 -1
  75. package/docs-site/mcp-approval.html +1 -1
  76. package/docs-site/mcp-auth.html +1 -1
  77. package/docs-site/mcp-servers.html +1 -1
  78. package/docs-site/mcp.html +1 -1
  79. package/docs-site/permissions.html +1 -1
  80. package/docs-site/profiles.html +1 -1
  81. package/docs-site/quickstart.html +1 -1
  82. package/docs-site/runtime.html +1 -1
  83. package/docs-site/scope.html +1 -1
  84. package/docs-site/security.html +1 -1
  85. package/docs-site/team.html +1 -1
  86. package/docs-site/whats-new.html +1 -1
  87. package/docs-site/workflows.html +1 -1
  88. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +2 -2
  89. package/evals/fixtures/benchmark-assurance-evidence.valid.json +2 -2
  90. package/evals/fixtures/piagent-webui/runtime-command-v1.invalid.json +12 -0
  91. package/evals/fixtures/piagent-webui/runtime-command-v1.valid.json +11 -0
  92. package/evals/fs4-readiness-matrix.v1.json +2 -2
  93. package/evals/fs5-causal-arm.v1.json +1 -1
  94. package/evals/fs5-pilot-protocol.v1.json +1 -1
  95. package/evals/fs5-pilot-protocol.v4.json +1 -1
  96. package/evals/fs5-pilot-protocol.v5.json +1 -1
  97. package/evals/private-holdout-v1/public-exposure.v1.json +3 -3
  98. package/evals/real-task-taxonomy.v1.json +5 -1
  99. package/package.json +3 -1
  100. package/packages/piagent-core/benchmark/benchmark-bootstrap.js +3 -2
  101. package/packages/piagent-core/benchmark/benchmark-cli.js +5 -1
  102. package/packages/piagent-core/benchmark/benchmark-matrix.js +1 -1
  103. package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +1 -0
  104. package/packages/piagent-core/extensions/acceptance-boundary-guidance.js +64 -0
  105. package/packages/piagent-core/extensions/acceptance-contract-semantics.js +3 -2
  106. package/packages/piagent-core/package.json +1 -1
  107. package/packages/piagent-core/runtime/quality/performance-assurance.ts +6 -4
  108. package/packages/piagent-core/runtime/registration/task-start-tool.ts +2 -2
  109. package/packages/piagent-core/runtime/workflows/webui-runtime-command.ts +89 -0
  110. package/packages/piagent-core/runtime/workflows/webui-workflow.ts +51 -0
  111. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-CbUK4gg2.js → MarkdownMessage-rD9WJKxs.js} +1 -1
  112. package/packages/piagent-webui/dist/client/assets/index-BZRFw1u6.js +174 -0
  113. package/packages/piagent-webui/dist/client/index.html +1 -1
  114. package/packages/piagent-webui/gateway/gateway-service.ts +3 -0
  115. package/packages/piagent-webui/gateway/gateway-session-stream.ts +10 -0
  116. package/packages/piagent-webui/gateway/rpc-ui-context.ts +28 -0
  117. package/packages/piagent-webui/gateway/runtime-command-controller.ts +126 -0
  118. package/packages/piagent-webui/gateway/runtime-session-controls.ts +29 -0
  119. package/packages/piagent-webui/gateway/session-command-controller.ts +23 -7
  120. package/packages/piagent-webui/gateway/session-inspection-registry.ts +22 -1
  121. package/packages/piagent-webui/gateway/session-operation-start.ts +34 -0
  122. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +24 -42
  123. package/packages/piagent-webui/package.json +2 -1
  124. package/packages/piagent-webui/server/loopback-server.ts +17 -0
  125. package/schemas/piagent-webui/catalog-v1.json +9 -0
  126. package/schemas/piagent-webui/runtime-command-v1.schema.json +70 -0
  127. package/schemas/piagent-webui/session-command-v1.schema.json +8 -0
  128. package/packages/piagent-webui/dist/client/assets/index-CNbYWd-R.js +0 -174
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://piagent.io.vn/schemas/piagent-webui/runtime-command-v1.schema.json",
4
+ "title": "Piagent WebUI typed runtime command and receipt v1",
5
+ "oneOf": [
6
+ { "$ref": "#/$defs/command" },
7
+ { "$ref": "#/$defs/receipt" }
8
+ ],
9
+ "$defs": {
10
+ "action": {
11
+ "enum": [
12
+ "runtime.status", "runtime.inspector", "runtime.commands", "orchestration.status",
13
+ "usage.live", "usage.history", "usage.logs", "usage.efficiency", "usage.preflight",
14
+ "onboarding.status", "onboarding.profile", "onboarding.tech",
15
+ "profile.status", "profile.options", "profile.tech-options", "profile.apply", "profile.auto",
16
+ "context.status", "context.rebuild", "context.search", "context.pack", "context.impact", "context.efficiency", "context.preflight", "context.compact",
17
+ "memory.status",
18
+ "mcp.status", "mcp.doctor", "mcp.detail", "mcp.approve", "mcp.reject", "mcp.reset"
19
+ ]
20
+ },
21
+ "effect": { "enum": ["read-only", "workspace-write", "model-assisted"] },
22
+ "output": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["customType", "content", "truncated", "redacted"],
26
+ "properties": {
27
+ "customType": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[A-Za-z0-9._-]+$" },
28
+ "content": { "type": "string", "maxLength": 12000, "pattern": "^[^\\u0000]*$" },
29
+ "truncated": { "type": "boolean" },
30
+ "redacted": { "type": "boolean" }
31
+ }
32
+ },
33
+ "command": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["schemaVersion", "version", "messageType", "requestId", "sessionRef", "expectedSessionRevision", "action", "argument", "confirmed"],
37
+ "properties": {
38
+ "schemaVersion": { "const": 1 },
39
+ "version": { "const": "piagent-runtime-command-v1" },
40
+ "messageType": { "const": "command" },
41
+ "requestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
42
+ "sessionRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
43
+ "expectedSessionRevision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
44
+ "action": { "$ref": "#/$defs/action" },
45
+ "argument": { "type": ["string", "null"], "maxLength": 2048, "pattern": "^[^\\u0000]*$" },
46
+ "confirmed": { "type": "boolean" }
47
+ }
48
+ },
49
+ "receipt": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["schemaVersion", "version", "messageType", "requestId", "sessionRef", "action", "state", "resultCode", "effect", "modelCallObserved", "outputs", "sessionRevisionAfter", "reasonCode"],
53
+ "properties": {
54
+ "schemaVersion": { "const": 1 },
55
+ "version": { "const": "piagent-runtime-receipt-v1" },
56
+ "messageType": { "const": "receipt" },
57
+ "requestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
58
+ "sessionRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
59
+ "action": { "$ref": "#/$defs/action" },
60
+ "state": { "enum": ["settled", "rejected", "uncertain"] },
61
+ "resultCode": { "enum": ["completed", "stale-revision", "confirmation-required", "runtime-busy", "invalid-command", "effect-unknown", "unavailable"] },
62
+ "effect": { "$ref": "#/$defs/effect" },
63
+ "modelCallObserved": { "type": "boolean" },
64
+ "outputs": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/output" } },
65
+ "sessionRevisionAfter": { "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken" },
66
+ "reasonCode": { "$ref": "common-v1.schema.json#/$defs/nullableReasonCode" }
67
+ }
68
+ }
69
+ }
70
+ }
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "thinkingLevel": { "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"] },
17
17
  "permissionMode": { "enum": ["read-only", "workspace-write", "trusted-full-access"] },
18
+ "workflow": { "enum": ["task", "scout", "be-to-fe", "discuss", "plan", "review", "commit", "pr", "onboard", "platform-improve"] },
18
19
  "baseCommandProperties": {
19
20
  "type": "object",
20
21
  "additionalProperties": false,
@@ -55,6 +56,8 @@
55
56
  "placeRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
56
57
  "modelRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
57
58
  "thinkingLevel": { "$ref": "#/$defs/thinkingLevel" },
59
+ "permissionMode": { "$ref": "#/$defs/permissionMode" },
60
+ "workflow": { "$ref": "#/$defs/workflow" },
58
61
  "message": { "type": "string", "minLength": 1, "maxLength": 32768, "pattern": "^[^\\u0000]*$" },
59
62
  "messageRequestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
60
63
  "deferInitialMessage": {
@@ -82,6 +85,7 @@
82
85
  "required": ["delivery", "message", "messageRequestId", "expectedOperationRef", "attachmentRefs"],
83
86
  "properties": {
84
87
  "delivery": { "enum": ["new-operation", "follow-up", "steer"] },
88
+ "workflow": { "$ref": "#/$defs/workflow" },
85
89
  "message": { "type": "string", "minLength": 1, "maxLength": 32768, "pattern": "^[^\\u0000]*$" },
86
90
  "messageRequestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
87
91
  "expectedOperationRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
@@ -101,6 +105,10 @@
101
105
  {
102
106
  "if": { "properties": { "delivery": { "const": "new-operation" } }, "required": ["delivery"] },
103
107
  "then": { "properties": { "expectedOperationRef": { "type": "null" } } }
108
+ },
109
+ {
110
+ "if": { "properties": { "workflow": { "$ref": "#/$defs/workflow" } }, "required": ["workflow"] },
111
+ "then": { "properties": { "delivery": { "const": "new-operation" } } }
104
112
  }
105
113
  ]
106
114
  }