@piagent/platform 1.3.1 → 1.4.1
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/CHANGELOG.md +132 -0
- package/README.md +10 -4
- package/README.vi.md +27 -0
- package/architecture/layers.json +96 -1
- package/docs/README.md +1 -0
- package/docs/architecture.md +1 -0
- package/docs/authority-manifest.md +1 -0
- package/docs/auto-delegation-policy.md +1 -0
- package/docs/capability-packs.md +1 -0
- package/docs/command-reference-vietnamese.md +5 -4
- package/docs/context-engine.md +1 -0
- package/docs/context-window-policy.md +1 -0
- package/docs/distribution-standard.md +8 -7
- package/docs/en/architecture.md +13 -0
- package/docs/herdr-workflow.md +1 -0
- package/docs/languages.json +20 -4
- package/docs/mcp-and-tools.md +125 -9
- package/docs/memory-policy.md +1 -0
- package/docs/model-options.md +1 -0
- package/docs/oauth-providers.md +1 -0
- package/docs/operator-manual-vietnamese.md +15 -12
- package/docs/package-architecture-notes.md +1 -0
- package/docs/project-adapters.md +1 -0
- package/docs/project-onboarding.md +1 -0
- package/docs/publishing-for-teams.md +37 -0
- package/docs/quality-benchmark.md +1 -0
- package/docs/quickstart-vietnamese.md +3 -2
- package/docs/release-install-policy.md +22 -8
- package/docs/runtime-harness-standard.md +2 -1
- package/docs/runtime-policy-design.md +1 -0
- package/docs/runtime-quality-baseline.md +1 -0
- package/docs/security-redaction-benchmark.md +1 -0
- package/docs/security-threat-model.md +2 -1
- package/docs/subagent-orchestration-capabilities.md +1 -0
- package/docs/subagents-and-multiagent.md +1 -0
- package/docs/task-implementation-contract.md +12 -4
- package/docs/task-lifecycle-vietnamese.md +1 -0
- package/docs/team-onboarding.md +3 -2
- package/docs/third-party-neutrality.md +26 -0
- package/docs/usage-observability.md +71 -0
- package/docs/vercel-docs-site.md +1 -0
- package/docs/vi/architecture.md +13 -0
- package/docs/workflow-recipes.md +1 -0
- package/docs-site/architecture.html +5 -1
- package/docs-site/benchmark.html +5 -1
- package/docs-site/commands.html +5 -1
- package/docs-site/content/en/index.html +49 -0
- package/docs-site/content/en/runtime.html +13 -0
- package/docs-site/content/index.html +49 -0
- package/docs-site/content/runtime.html +28 -0
- package/docs-site/context-engine.html +5 -1
- package/docs-site/en/architecture.html +5 -1
- package/docs-site/en/benchmark.html +5 -1
- package/docs-site/en/commands.html +5 -1
- package/docs-site/en/context-engine.html +5 -1
- package/docs-site/en/index.html +54 -1
- package/docs-site/en/mcp-approval.html +5 -1
- package/docs-site/en/mcp-auth.html +5 -1
- package/docs-site/en/mcp-servers.html +5 -1
- package/docs-site/en/mcp.html +5 -1
- package/docs-site/en/permissions.html +5 -1
- package/docs-site/en/profiles.html +5 -1
- package/docs-site/en/quickstart.html +5 -1
- package/docs-site/en/runtime.html +18 -1
- package/docs-site/en/scope.html +5 -1
- package/docs-site/en/security.html +5 -1
- package/docs-site/en/team.html +5 -1
- package/docs-site/en/whats-new.html +5 -1
- package/docs-site/en/workflows.html +5 -1
- package/docs-site/index.html +54 -1
- package/docs-site/mcp-approval.html +5 -1
- package/docs-site/mcp-auth.html +5 -1
- package/docs-site/mcp-servers.html +5 -1
- package/docs-site/mcp.html +5 -1
- package/docs-site/permissions.html +5 -1
- package/docs-site/profiles.html +5 -1
- package/docs-site/quickstart.html +5 -1
- package/docs-site/runtime.html +33 -1
- package/docs-site/scope.html +5 -1
- package/docs-site/security.html +5 -1
- package/docs-site/team.html +5 -1
- package/docs-site/whats-new.html +5 -1
- package/docs-site/workflows.html +5 -1
- package/evals/fixtures/mutation-provenance-record.invalid.json +17 -0
- package/evals/fixtures/mutation-provenance-record.valid.json +27 -0
- package/evals/fixtures/piagent-webui/approval-v1.invalid.json +54 -0
- package/evals/fixtures/piagent-webui/approval-v1.valid.json +58 -0
- package/evals/fixtures/piagent-webui/attachment-v1.invalid.json +25 -0
- package/evals/fixtures/piagent-webui/attachment-v1.valid.json +25 -0
- package/evals/fixtures/piagent-webui/capabilities-v1.invalid.json +51 -0
- package/evals/fixtures/piagent-webui/capabilities-v1.valid.json +122 -0
- package/evals/fixtures/piagent-webui/commit-summary-v1.invalid.json +10 -0
- package/evals/fixtures/piagent-webui/commit-summary-v1.valid.json +25 -0
- package/evals/fixtures/piagent-webui/control-command-v1.invalid.json +37 -0
- package/evals/fixtures/piagent-webui/control-command-v1.valid.json +35 -0
- package/evals/fixtures/piagent-webui/diff-v1.invalid.json +13 -0
- package/evals/fixtures/piagent-webui/diff-v1.valid.json +141 -0
- package/evals/fixtures/piagent-webui/gateway-capabilities-v1.invalid.json +35 -0
- package/evals/fixtures/piagent-webui/gateway-capabilities-v1.valid.json +35 -0
- package/evals/fixtures/piagent-webui/gateway-protocol-v1.invalid.json +14 -0
- package/evals/fixtures/piagent-webui/gateway-protocol-v1.valid.json +14 -0
- package/evals/fixtures/piagent-webui/handoff-history-v1.invalid.json +16 -0
- package/evals/fixtures/piagent-webui/handoff-history-v1.valid.json +16 -0
- package/evals/fixtures/piagent-webui/model-catalog-v1.invalid.json +31 -0
- package/evals/fixtures/piagent-webui/model-catalog-v1.valid.json +43 -0
- package/evals/fixtures/piagent-webui/queue-v1.invalid.json +29 -0
- package/evals/fixtures/piagent-webui/queue-v1.valid.json +44 -0
- package/evals/fixtures/piagent-webui/recovery-history-v1.invalid.json +17 -0
- package/evals/fixtures/piagent-webui/recovery-history-v1.valid.json +20 -0
- package/evals/fixtures/piagent-webui/release-monitor-v1.invalid.json +12 -0
- package/evals/fixtures/piagent-webui/release-monitor-v1.valid.json +29 -0
- package/evals/fixtures/piagent-webui/review-state-v1.invalid.json +25 -0
- package/evals/fixtures/piagent-webui/review-state-v1.valid.json +38 -0
- package/evals/fixtures/piagent-webui/runtime-event-v2.invalid.json +49 -0
- package/evals/fixtures/piagent-webui/runtime-event-v2.valid.json +49 -0
- package/evals/fixtures/piagent-webui/session-catalog-v1.invalid.json +17 -0
- package/evals/fixtures/piagent-webui/session-catalog-v1.valid.json +58 -0
- package/evals/fixtures/piagent-webui/session-command-v1.invalid.json +19 -0
- package/evals/fixtures/piagent-webui/session-command-v1.valid.json +19 -0
- package/evals/fixtures/piagent-webui/snapshot-v1.invalid.json +5 -0
- package/evals/fixtures/piagent-webui/snapshot-v1.valid.json +191 -0
- package/evals/fixtures/piagent-webui/source-change-v1.invalid.json +57 -0
- package/evals/fixtures/piagent-webui/source-change-v1.valid.json +98 -0
- package/evals/fixtures/piagent-webui/source-mutation-v1.invalid.json +19 -0
- package/evals/fixtures/piagent-webui/source-mutation-v1.valid.json +38 -0
- package/evals/fixtures/piagent-webui/source-revert-v1.invalid.json +20 -0
- package/evals/fixtures/piagent-webui/source-revert-v1.valid.json +62 -0
- package/evals/fixtures/piagent-webui/subagent-tree-v1.invalid.json +26 -0
- package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +39 -0
- package/evals/fixtures/piagent-webui/task-index-v1.invalid.json +15 -0
- package/evals/fixtures/piagent-webui/task-index-v1.valid.json +15 -0
- package/evals/fixtures/piagent-webui/task-timeline-v1.invalid.json +14 -0
- package/evals/fixtures/piagent-webui/task-timeline-v1.valid.json +16 -0
- package/evals/fixtures/piagent-webui/transcript-v1.invalid.json +35 -0
- package/evals/fixtures/piagent-webui/transcript-v1.valid.json +55 -0
- package/evals/fixtures/task-baseline-manifest.invalid.json +16 -0
- package/evals/fixtures/task-baseline-manifest.valid.json +41 -0
- package/evals/fixtures/verifier-file-snapshot.invalid.json +21 -0
- package/evals/fixtures/verifier-file-snapshot.valid.json +21 -0
- package/package.json +43 -4
- package/packages/piagent-core/README.md +3 -2
- package/packages/piagent-core/benchmark/benchmark-candidate.d.ts +1 -0
- package/packages/piagent-core/benchmark/benchmark-forensics.d.ts +1 -0
- package/packages/piagent-core/benchmark/benchmark-ledger.d.ts +4 -0
- package/packages/piagent-core/benchmark/benchmark-record-validation.d.ts +1 -0
- package/packages/piagent-core/benchmark/benchmark-runtime.d.ts +1 -0
- package/packages/piagent-core/capabilities/capability-core.js +2 -2
- package/packages/piagent-core/capabilities/capability-verification-cache.js +17 -7
- package/packages/piagent-core/capabilities/runtime-integrity.js +190 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +80 -272
- package/packages/piagent-core/extensions/redaction-core.d.ts +2 -0
- package/packages/piagent-core/extensions/runtime-evidence.js +12 -1
- package/packages/piagent-core/extensions/shell-reach.ts +250 -0
- package/packages/piagent-core/extensions/task-journal.js +30 -1
- package/packages/piagent-core/extensions/task-state.js +33 -36
- package/packages/piagent-core/mcp/mcp-command-actions.js +1 -1
- package/packages/piagent-core/mcp/mcp-server-catalog.js +139 -9
- package/packages/piagent-core/package.json +1 -1
- package/packages/piagent-core/runtime/hooks/session-start-hook.ts +2 -2
- package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +12 -2
- package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +20 -19
- package/packages/piagent-core/runtime/hooks/tool-result-metadata.ts +13 -0
- package/packages/piagent-core/runtime/input/chat-images.ts +2 -2
- package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +94 -0
- package/packages/piagent-core/runtime/inspection/approval-broker.ts +318 -0
- package/packages/piagent-core/runtime/inspection/commit-summary-projection.ts +59 -0
- package/packages/piagent-core/runtime/inspection/context-telemetry-inspection.ts +37 -0
- package/packages/piagent-core/runtime/inspection/criteria-links.ts +295 -0
- package/packages/piagent-core/runtime/inspection/diff-projection.ts +499 -0
- package/packages/piagent-core/runtime/inspection/git-filter-safety.ts +38 -0
- package/packages/piagent-core/runtime/inspection/git-numstat-adapter.ts +71 -0
- package/packages/piagent-core/runtime/inspection/git-status-adapter.ts +493 -0
- package/packages/piagent-core/runtime/inspection/git-tree-adapter.ts +108 -0
- package/packages/piagent-core/runtime/inspection/mcp-control.ts +10 -0
- package/packages/piagent-core/runtime/inspection/mutation-provenance-contract.ts +131 -0
- package/packages/piagent-core/runtime/inspection/mutation-provenance-recorder.ts +48 -0
- package/packages/piagent-core/runtime/inspection/mutation-provenance-store.ts +161 -0
- package/packages/piagent-core/runtime/inspection/project-runtime-inspection.ts +36 -0
- package/packages/piagent-core/runtime/inspection/review-state-contract.ts +108 -0
- package/packages/piagent-core/runtime/inspection/review-state-projection.ts +93 -0
- package/packages/piagent-core/runtime/inspection/review-state-store.ts +112 -0
- package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +262 -0
- package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +103 -0
- package/packages/piagent-core/runtime/inspection/source-change-projection.ts +471 -0
- package/packages/piagent-core/runtime/inspection/source-evidence-contract.ts +139 -0
- package/packages/piagent-core/runtime/inspection/source-evidence-store.ts +315 -0
- package/packages/piagent-core/runtime/inspection/source-handoff-store.ts +70 -0
- package/packages/piagent-core/runtime/inspection/source-inspection-plan.ts +34 -0
- package/packages/piagent-core/runtime/inspection/source-mutation-projection.ts +164 -0
- package/packages/piagent-core/runtime/inspection/source-mutation-store.ts +168 -0
- package/packages/piagent-core/runtime/inspection/source-open-target.ts +38 -0
- package/packages/piagent-core/runtime/inspection/source-revert-projection.ts +147 -0
- package/packages/piagent-core/runtime/inspection/task-baseline-start-capture.ts +22 -0
- package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +160 -0
- package/packages/piagent-core/runtime/inspection/task-control-journal.ts +131 -0
- package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +95 -0
- package/packages/piagent-core/runtime/inspection/task-provenance-projection.ts +60 -0
- package/packages/piagent-core/runtime/inspection/task-recovery-timeline.ts +88 -0
- package/packages/piagent-core/runtime/inspection/task-run-index.ts +87 -0
- package/packages/piagent-core/runtime/inspection/task-source-projection.ts +401 -0
- package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +101 -0
- package/packages/piagent-core/runtime/inspection/text-diff.ts +60 -0
- package/packages/piagent-core/runtime/inspection/verifier-snapshot-contract.ts +114 -0
- package/packages/piagent-core/runtime/inspection/verifier-snapshot-store.ts +189 -0
- package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +320 -0
- package/packages/piagent-core/runtime/inspection/workspace-file-reader.ts +132 -0
- package/packages/piagent-core/runtime/inspection/workspace-source-projection.ts +96 -0
- package/packages/piagent-core/runtime/inspection/zero-turn-conformance.ts +175 -0
- package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +93 -6
- package/packages/piagent-core/runtime/policy/block-remedy.ts +139 -0
- package/packages/piagent-core/runtime/policy/source-index-transaction.ts +173 -0
- package/packages/piagent-core/runtime/policy/source-mutation-guard-binding.ts +42 -0
- package/packages/piagent-core/runtime/policy/source-mutation-guard.ts +184 -0
- package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +105 -0
- package/packages/piagent-core/runtime/product/activity-inspector-footer.ts +5 -3
- package/packages/piagent-core/runtime/product/activity-inspector.ts +85 -343
- package/packages/piagent-core/runtime/recovery/resume-state.ts +38 -1
- package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +68 -14
- package/packages/piagent-core/runtime/registration/task-start-tool.ts +22 -27
- package/packages/piagent-core/runtime/session/model-authorship-state.ts +31 -3
- package/packages/piagent-core/runtime/session/runtime-state.ts +11 -1
- package/packages/piagent-core/runtime/session/token-economics.js +34 -0
- package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +2 -1
- package/packages/piagent-core/runtime/workflows/task-intake.ts +5 -0
- package/packages/piagent-core/security/sensitive-data.js +7 -0
- package/packages/piagent-webui/dist/client/assets/index-DwKCWbwd.css +1 -0
- package/packages/piagent-webui/dist/client/assets/index-bu7XpD9Q.js +172 -0
- package/packages/piagent-webui/dist/client/index.html +16 -0
- package/packages/piagent-webui/extension/attachment-store.ts +323 -0
- package/packages/piagent-webui/extension/held-message-queue.ts +311 -0
- package/packages/piagent-webui/extension/lifecycle-controller.ts +423 -0
- package/packages/piagent-webui/extension/lifecycle-event-adapter.ts +23 -0
- package/packages/piagent-webui/extension/piagent-webui.ts +470 -0
- package/packages/piagent-webui/extension/review-controller.ts +160 -0
- package/packages/piagent-webui/extension/same-session-bridge.ts +500 -0
- package/packages/piagent-webui/extension/session-options-controller.ts +281 -0
- package/packages/piagent-webui/extension/session-stream-adapter.ts +249 -0
- package/packages/piagent-webui/extension/source-mutation-controller.ts +215 -0
- package/packages/piagent-webui/extension/source-open-controller.ts +136 -0
- package/packages/piagent-webui/extension/source-revert-controller.ts +189 -0
- package/packages/piagent-webui/extension/terminal-session-adapter.ts +73 -0
- package/packages/piagent-webui/extension/vscode-handoff.ts +51 -0
- package/packages/piagent-webui/gateway/control-socket.ts +92 -0
- package/packages/piagent-webui/gateway/extension-authority.ts +47 -0
- package/packages/piagent-webui/gateway/gateway-events.ts +60 -0
- package/packages/piagent-webui/gateway/gateway-protocol-service.ts +64 -0
- package/packages/piagent-webui/gateway/gateway-service.ts +215 -0
- package/packages/piagent-webui/gateway/gateway-session-stream.ts +110 -0
- package/packages/piagent-webui/gateway/mcp-auth-broker.ts +158 -0
- package/packages/piagent-webui/gateway/native-project-picker.ts +29 -0
- package/packages/piagent-webui/gateway/pi-host.ts +41 -0
- package/packages/piagent-webui/gateway/profile-state.ts +1 -0
- package/packages/piagent-webui/gateway/project-registry.ts +108 -0
- package/packages/piagent-webui/gateway/provider-auth-broker.ts +172 -0
- package/packages/piagent-webui/gateway/session-catalog.ts +128 -0
- package/packages/piagent-webui/gateway/session-command-controller.ts +237 -0
- package/packages/piagent-webui/gateway/session-command-store.ts +224 -0
- package/packages/piagent-webui/gateway/session-inspection-registry.ts +239 -0
- package/packages/piagent-webui/gateway/session-lease-store.ts +1 -0
- package/packages/piagent-webui/gateway/session-metadata-store.ts +152 -0
- package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +489 -0
- package/packages/piagent-webui/ownership/gateway-runtime-context.ts +8 -0
- package/packages/piagent-webui/ownership/profile-state.ts +117 -0
- package/packages/piagent-webui/ownership/session-lease-store.ts +329 -0
- package/packages/piagent-webui/ownership/session-refs.ts +8 -0
- package/packages/piagent-webui/package.json +33 -0
- package/packages/piagent-webui/server/README.md +4 -0
- package/packages/piagent-webui/server/benchmark-release-monitor.ts +230 -0
- package/packages/piagent-webui/server/core-inspection-provider.ts +403 -0
- package/packages/piagent-webui/server/gateway-websocket.ts +143 -0
- package/packages/piagent-webui/server/http-security.ts +27 -0
- package/packages/piagent-webui/server/ipc-read-model-client.ts +89 -0
- package/packages/piagent-webui/server/loopback-server.ts +368 -0
- package/packages/piagent-webui/server/read-model-provider.ts +37 -0
- package/packages/piagent-webui/server/read-only-router.ts +105 -0
- package/packages/piagent-webui/server/session-auth.ts +88 -0
- package/packages/piagent-webui/server/sidecar-main.ts +86 -0
- package/packages/piagent-webui/server/sse-hub.ts +76 -0
- package/packages/piagent-webui/server/static-bundle.ts +40 -0
- package/packages/piagent-webui/server/transcript-projection.ts +125 -0
- package/schemas/mutation-provenance-record.schema.json +100 -0
- package/schemas/piagent-webui/approval-v1.schema.json +654 -0
- package/schemas/piagent-webui/attachment-v1.schema.json +267 -0
- package/schemas/piagent-webui/capabilities-v1.schema.json +729 -0
- package/schemas/piagent-webui/catalog-v1.json +240 -0
- package/schemas/piagent-webui/commit-summary-v1.schema.json +63 -0
- package/schemas/piagent-webui/common-v1.schema.json +479 -0
- package/schemas/piagent-webui/control-command-v1.schema.json +1780 -0
- package/schemas/piagent-webui/diff-v1.schema.json +826 -0
- package/schemas/piagent-webui/gateway-capabilities-v1.schema.json +136 -0
- package/schemas/piagent-webui/gateway-protocol-v1.schema.json +456 -0
- package/schemas/piagent-webui/handoff-history-v1.schema.json +92 -0
- package/schemas/piagent-webui/model-catalog-v1.schema.json +95 -0
- package/schemas/piagent-webui/queue-v1.schema.json +99 -0
- package/schemas/piagent-webui/recovery-history-v1.schema.json +144 -0
- package/schemas/piagent-webui/release-monitor-v1.schema.json +173 -0
- package/schemas/piagent-webui/review-state-v1.schema.json +206 -0
- package/schemas/piagent-webui/runtime-event-v2.schema.json +5206 -0
- package/schemas/piagent-webui/session-catalog-v1.schema.json +222 -0
- package/schemas/piagent-webui/session-command-v1.schema.json +390 -0
- package/schemas/piagent-webui/snapshot-v1.schema.json +2622 -0
- package/schemas/piagent-webui/source-change-v1.schema.json +763 -0
- package/schemas/piagent-webui/source-mutation-v1.schema.json +96 -0
- package/schemas/piagent-webui/source-revert-v1.schema.json +130 -0
- package/schemas/piagent-webui/subagent-tree-v1.schema.json +88 -0
- package/schemas/piagent-webui/task-index-v1.schema.json +74 -0
- package/schemas/piagent-webui/task-timeline-v1.schema.json +49 -0
- package/schemas/piagent-webui/transcript-v1.schema.json +243 -0
- package/schemas/task-baseline-manifest.schema.json +122 -0
- package/schemas/verifier-file-snapshot.schema.json +81 -0
- package/scripts/build-docs-site.mjs +21 -1
- package/scripts/check-architecture.mjs +1 -0
- package/scripts/check-doc-languages.mjs +19 -2
- package/scripts/check-third-party-neutrality.mjs +43 -0
- package/scripts/explain-command.mjs +240 -0
- package/scripts/install-global.sh +105 -4
- package/scripts/mcp-manage.mjs +17 -4
- package/scripts/pi-session-stats.sh +10 -2
- package/scripts/piagent-cli.mjs +30 -3
- package/scripts/piagent-dashboard.mjs +261 -0
- package/scripts/piagent-webui-launcher.mjs +121 -0
- package/scripts/setup.sh +69 -33
- package/scripts/traffic-snapshot.mjs +214 -0
- package/scripts/typescript-loader.mjs +42 -1
- package/scripts/uninstall-global.sh +53 -2
- package/scripts/update-global.mjs +33 -1
- package/scripts/verify-local.sh +257 -0
- package/scripts/verify-release-identity.mjs +4 -1
- package/scripts/verify-translation-pairing.mjs +121 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://piagent.io.vn/schemas/piagent-webui/handoff-history-v1.schema.json",
|
|
4
|
+
"title": "Piagent WebUI bounded handoff history and next action v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "version", "generatedAt", "identity", "runRef", "state", "historyRevision", "completeness", "current", "nextAction", "events", "page", "warnings", "health"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"version": { "const": "piagent-webui-handoff-history-v1" },
|
|
11
|
+
"generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
12
|
+
"identity": { "$ref": "common-v1.schema.json#/$defs/identity" },
|
|
13
|
+
"runRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
14
|
+
"state": { "enum": ["ready", "unavailable"] },
|
|
15
|
+
"historyRevision": { "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken" },
|
|
16
|
+
"completeness": { "enum": ["complete", "partial", "snapshot-only", "missing", "unknown"] },
|
|
17
|
+
"current": { "anyOf": [{ "$ref": "#/$defs/current" }, { "type": "null" }] },
|
|
18
|
+
"nextAction": { "$ref": "#/$defs/nextAction" },
|
|
19
|
+
"events": { "type": "array", "maxItems": 100, "items": { "$ref": "#/$defs/event" } },
|
|
20
|
+
"page": { "$ref": "#/$defs/page" },
|
|
21
|
+
"warnings": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/warning" } },
|
|
22
|
+
"health": { "$ref": "common-v1.schema.json#/$defs/health" }
|
|
23
|
+
},
|
|
24
|
+
"allOf": [
|
|
25
|
+
{ "properties": { "identity": { "type": "object", "properties": {
|
|
26
|
+
"taskId": { "$ref": "common-v1.schema.json#/$defs/publicId" }, "taskRunId": { "$ref": "common-v1.schema.json#/$defs/publicId" },
|
|
27
|
+
"agentOperationId": { "type": "null" }, "toolCallId": { "type": "null" }
|
|
28
|
+
} } } },
|
|
29
|
+
{
|
|
30
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
31
|
+
"then": { "properties": {
|
|
32
|
+
"historyRevision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
|
|
33
|
+
"completeness": { "enum": ["complete", "partial", "snapshot-only", "missing"] },
|
|
34
|
+
"nextAction": { "type": "object", "properties": {
|
|
35
|
+
"action": { "enum": ["terminal", "inspect-handoff", "wait-paused", "retry-checkpoint", "rerun-exact-verifier", "continue-plan", "request-completion"] },
|
|
36
|
+
"enforcementSafe": { "type": "boolean" }
|
|
37
|
+
} },
|
|
38
|
+
"health": { "type": "object", "properties": { "state": { "enum": ["ok", "degraded"] } } }
|
|
39
|
+
} },
|
|
40
|
+
"else": { "properties": {
|
|
41
|
+
"historyRevision": { "type": "null" }, "completeness": { "const": "unknown" }, "current": { "type": "null" },
|
|
42
|
+
"nextAction": { "type": "object", "properties": { "action": { "const": "unknown" }, "stepRef": { "type": "null" },
|
|
43
|
+
"exactCommandCount": { "const": 0 }, "dispatchable": { "const": false }, "enforcementSafe": { "const": false } } },
|
|
44
|
+
"events": { "type": "array", "maxItems": 0 },
|
|
45
|
+
"page": { "type": "object", "properties": { "total": { "const": 0 }, "returned": { "const": 0 }, "truncated": { "const": false } } },
|
|
46
|
+
"health": { "type": "object", "properties": { "state": { "enum": ["unavailable", "error"] } } }
|
|
47
|
+
} }
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"$defs": {
|
|
51
|
+
"current": {
|
|
52
|
+
"type": "object", "additionalProperties": false,
|
|
53
|
+
"required": ["handoffRef", "generatedAt", "phase", "taskOutcome", "gateDecision", "completionApproved", "requiredAuthority", "treeEvidenceCurrent", "latestVerifierMatchesCurrentTree", "changedFileCount", "missingCount", "projectedAction"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"handoffRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" }, "generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
56
|
+
"phase": { "$ref": "common-v1.schema.json#/$defs/nullableDisplayText" },
|
|
57
|
+
"taskOutcome": { "enum": ["pending", "completed", "blocked", "partial", "failed"] },
|
|
58
|
+
"gateDecision": { "enum": ["pass", "fail"] }, "completionApproved": { "type": "boolean" },
|
|
59
|
+
"requiredAuthority": { "enum": ["none", "operator", "permission", "scope", "fresh-session"] },
|
|
60
|
+
"treeEvidenceCurrent": { "type": "boolean" }, "latestVerifierMatchesCurrentTree": { "type": "boolean" },
|
|
61
|
+
"changedFileCount": { "type": "integer", "minimum": 0, "maximum": 500 }, "missingCount": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
62
|
+
"projectedAction": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"nextAction": {
|
|
66
|
+
"type": "object", "additionalProperties": false,
|
|
67
|
+
"required": ["action", "stepRef", "reason", "exactCommandCount", "dispatchable", "enforcementSafe"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"action": { "enum": ["terminal", "inspect-handoff", "wait-paused", "retry-checkpoint", "rerun-exact-verifier", "continue-plan", "request-completion", "unknown"] },
|
|
70
|
+
"stepRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" }, "reason": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
71
|
+
"exactCommandCount": { "type": "integer", "minimum": 0, "maximum": 50 }, "dispatchable": { "const": false }, "enforcementSafe": { "type": "boolean" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"event": {
|
|
75
|
+
"type": "object", "additionalProperties": false,
|
|
76
|
+
"required": ["eventRef", "evidenceRef", "sequence", "recordedAt", "phase", "completionApproved", "projectedAction"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"eventRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" }, "evidenceRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
79
|
+
"sequence": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "recordedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
80
|
+
"phase": { "$ref": "common-v1.schema.json#/$defs/nullableDisplayText" }, "completionApproved": { "type": "boolean" },
|
|
81
|
+
"projectedAction": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"page": { "type": "object", "additionalProperties": false, "required": ["total", "returned", "truncated"], "properties": {
|
|
85
|
+
"total": { "type": "integer", "minimum": 0, "maximum": 100000 }, "returned": { "type": "integer", "minimum": 0, "maximum": 100 }, "truncated": { "type": "boolean" }
|
|
86
|
+
} },
|
|
87
|
+
"warning": { "type": "object", "additionalProperties": false, "required": ["code", "count", "message"], "properties": {
|
|
88
|
+
"code": { "enum": ["telemetry-missing", "telemetry-corrupt", "telemetry-incomplete-tail", "telemetry-input-truncated", "history-truncated", "current-handoff-missing", "history-snapshot-only"] },
|
|
89
|
+
"count": { "type": "integer", "minimum": 1, "maximum": 1000000000 }, "message": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }
|
|
90
|
+
} }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://piagent.io.vn/schemas/piagent-webui/model-catalog-v1.schema.json",
|
|
4
|
+
"title": "Piagent WebUI authenticated model catalog v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "version", "generatedAt", "identity", "revision", "state", "catalogScope", "effectScope", "activeModelRef", "activeThinkingLevel", "models", "reasonCode"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"version": { "const": "piagent-webui-model-catalog-v1" },
|
|
11
|
+
"generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
12
|
+
"identity": { "$ref": "common-v1.schema.json#/$defs/identity" },
|
|
13
|
+
"revision": { "$ref": "common-v1.schema.json#/$defs/domainRevision" },
|
|
14
|
+
"state": { "enum": ["ready", "unavailable"] },
|
|
15
|
+
"catalogScope": { "enum": ["authenticated-all", "session-scoped", "unavailable"] },
|
|
16
|
+
"effectScope": { "const": "session-and-user-default" },
|
|
17
|
+
"activeModelRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
|
|
18
|
+
"activeThinkingLevel": { "$ref": "#/$defs/nullableThinkingLevel" },
|
|
19
|
+
"models": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"maxItems": 300,
|
|
22
|
+
"uniqueItems": true,
|
|
23
|
+
"items": { "$ref": "#/$defs/model" }
|
|
24
|
+
},
|
|
25
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/nullableReasonCode" }
|
|
26
|
+
},
|
|
27
|
+
"allOf": [
|
|
28
|
+
{
|
|
29
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
30
|
+
"then": {
|
|
31
|
+
"properties": {
|
|
32
|
+
"catalogScope": { "enum": ["authenticated-all", "session-scoped"] },
|
|
33
|
+
"activeModelRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
34
|
+
"activeThinkingLevel": { "$ref": "#/$defs/thinkingLevel" },
|
|
35
|
+
"models": { "type": "array", "minItems": 1 },
|
|
36
|
+
"reasonCode": { "type": "null" }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"if": { "properties": { "state": { "const": "unavailable" } }, "required": ["state"] },
|
|
42
|
+
"then": {
|
|
43
|
+
"properties": {
|
|
44
|
+
"catalogScope": { "const": "unavailable" },
|
|
45
|
+
"activeModelRef": { "type": "null" },
|
|
46
|
+
"activeThinkingLevel": { "type": "null" },
|
|
47
|
+
"models": { "type": "array", "maxItems": 0 },
|
|
48
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"$defs": {
|
|
54
|
+
"thinkingLevel": { "enum": ["off", "minimal", "low", "medium", "high", "xhigh", "max"] },
|
|
55
|
+
"nullableThinkingLevel": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{ "$ref": "#/$defs/thinkingLevel" },
|
|
58
|
+
{ "type": "null" }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"safeName": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"maxLength": 160,
|
|
65
|
+
"pattern": "^[^\\u0000-\\u001F\\u007F]*$"
|
|
66
|
+
},
|
|
67
|
+
"model": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["modelRef", "provider", "modelId", "displayName", "reasoning", "inputCapabilities", "supportedThinkingLevels", "contextWindow", "maxOutputTokens"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"modelRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
73
|
+
"provider": { "$ref": "common-v1.schema.json#/$defs/publicId" },
|
|
74
|
+
"modelId": { "$ref": "common-v1.schema.json#/$defs/publicId" },
|
|
75
|
+
"displayName": { "$ref": "#/$defs/safeName" },
|
|
76
|
+
"reasoning": { "type": "boolean" },
|
|
77
|
+
"inputCapabilities": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"maxItems": 2,
|
|
80
|
+
"uniqueItems": true,
|
|
81
|
+
"items": { "enum": ["text", "image"] }
|
|
82
|
+
},
|
|
83
|
+
"supportedThinkingLevels": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"minItems": 1,
|
|
86
|
+
"maxItems": 7,
|
|
87
|
+
"uniqueItems": true,
|
|
88
|
+
"items": { "$ref": "#/$defs/thinkingLevel" }
|
|
89
|
+
},
|
|
90
|
+
"contextWindow": { "type": "integer", "minimum": 1, "maximum": 100000000 },
|
|
91
|
+
"maxOutputTokens": { "type": "integer", "minimum": 1, "maximum": 100000000 }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://piagent.io.vn/schemas/piagent-webui/queue-v1.schema.json",
|
|
4
|
+
"title": "Piagent WebUI held message queue projection v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "version", "generatedAt", "identity", "revision", "state", "heldCount", "quarantinedCount", "items", "reasonCode"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"version": { "const": "piagent-webui-queue-v1" },
|
|
11
|
+
"generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
12
|
+
"identity": { "$ref": "#/$defs/identity" },
|
|
13
|
+
"revision": { "$ref": "common-v1.schema.json#/$defs/domainRevision" },
|
|
14
|
+
"state": { "enum": ["ready", "unavailable"] },
|
|
15
|
+
"heldCount": { "$ref": "#/$defs/count" },
|
|
16
|
+
"quarantinedCount": { "$ref": "#/$defs/count" },
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"maxItems": 100,
|
|
20
|
+
"uniqueItems": true,
|
|
21
|
+
"items": { "$ref": "#/$defs/item" }
|
|
22
|
+
},
|
|
23
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/nullableReasonCode" }
|
|
24
|
+
},
|
|
25
|
+
"allOf": [
|
|
26
|
+
{
|
|
27
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
28
|
+
"then": { "properties": { "reasonCode": { "type": "null" } } }
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"if": { "properties": { "state": { "const": "unavailable" } }, "required": ["state"] },
|
|
32
|
+
"then": {
|
|
33
|
+
"properties": {
|
|
34
|
+
"heldCount": { "const": 0 },
|
|
35
|
+
"quarantinedCount": { "const": 0 },
|
|
36
|
+
"items": { "type": "array", "maxItems": 0 },
|
|
37
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"$defs": {
|
|
43
|
+
"count": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
44
|
+
"identity": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["projectRef", "runtimeInstanceId", "sessionRef", "taskId", "taskRunId", "agentOperationId", "toolCallId"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"projectRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
50
|
+
"runtimeInstanceId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
51
|
+
"sessionRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
52
|
+
"taskId": { "$ref": "common-v1.schema.json#/$defs/nullablePublicId" },
|
|
53
|
+
"taskRunId": { "$ref": "common-v1.schema.json#/$defs/nullablePublicId" },
|
|
54
|
+
"agentOperationId": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
|
|
55
|
+
"toolCallId": { "type": "null" }
|
|
56
|
+
},
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": { "properties": { "taskRunId": { "type": "string" } }, "required": ["taskRunId"] },
|
|
60
|
+
"then": { "properties": { "taskId": { "$ref": "common-v1.schema.json#/$defs/publicId" } } }
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"previewText": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"maxLength": 4000,
|
|
67
|
+
"pattern": "^[^\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\u007F]*$"
|
|
68
|
+
},
|
|
69
|
+
"item": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["queueItemRef", "messageRequestId", "position", "state", "preview", "redacted", "truncated", "attachmentCount", "previewDigest", "createdAt", "updatedAt", "reasonCode"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"queueItemRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
75
|
+
"messageRequestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
76
|
+
"position": { "type": "integer", "minimum": 0, "maximum": 99 },
|
|
77
|
+
"state": { "enum": ["held", "quarantined"] },
|
|
78
|
+
"preview": { "$ref": "#/$defs/previewText" },
|
|
79
|
+
"redacted": { "type": "boolean" },
|
|
80
|
+
"truncated": { "type": "boolean" },
|
|
81
|
+
"attachmentCount": { "type": "integer", "minimum": 0, "maximum": 16 },
|
|
82
|
+
"previewDigest": { "$ref": "common-v1.schema.json#/$defs/digest" },
|
|
83
|
+
"createdAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
84
|
+
"updatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
85
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/nullableReasonCode" }
|
|
86
|
+
},
|
|
87
|
+
"allOf": [
|
|
88
|
+
{
|
|
89
|
+
"if": { "properties": { "state": { "const": "held" } }, "required": ["state"] },
|
|
90
|
+
"then": { "properties": { "reasonCode": { "type": "null" } } }
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"if": { "properties": { "state": { "const": "quarantined" } }, "required": ["state"] },
|
|
94
|
+
"then": { "properties": { "reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" } } }
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://piagent.io.vn/schemas/piagent-webui/recovery-history-v1.schema.json",
|
|
4
|
+
"title": "Piagent WebUI bounded compaction and recovery history v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "version", "generatedAt", "identity", "runRef", "state", "historyRevision", "completeness", "summary", "recovery", "retainedContent", "events", "page", "warnings", "health"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"version": { "const": "piagent-webui-recovery-history-v1" },
|
|
11
|
+
"generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
12
|
+
"identity": { "$ref": "common-v1.schema.json#/$defs/identity" },
|
|
13
|
+
"runRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
14
|
+
"state": { "enum": ["ready", "unavailable"] },
|
|
15
|
+
"historyRevision": { "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken" },
|
|
16
|
+
"completeness": { "enum": ["complete", "partial", "missing", "unknown"] },
|
|
17
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
18
|
+
"recovery": { "$ref": "#/$defs/recovery" },
|
|
19
|
+
"retainedContent": { "$ref": "#/$defs/retainedContent" },
|
|
20
|
+
"events": { "type": "array", "maxItems": 300, "items": { "$ref": "#/$defs/event" } },
|
|
21
|
+
"page": { "$ref": "#/$defs/page" },
|
|
22
|
+
"warnings": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/warning" } },
|
|
23
|
+
"health": { "$ref": "common-v1.schema.json#/$defs/health" }
|
|
24
|
+
},
|
|
25
|
+
"allOf": [
|
|
26
|
+
{ "properties": { "identity": { "type": "object", "properties": {
|
|
27
|
+
"taskId": { "$ref": "common-v1.schema.json#/$defs/publicId" },
|
|
28
|
+
"taskRunId": { "$ref": "common-v1.schema.json#/$defs/publicId" },
|
|
29
|
+
"agentOperationId": { "type": "null" },
|
|
30
|
+
"toolCallId": { "type": "null" }
|
|
31
|
+
} } } },
|
|
32
|
+
{
|
|
33
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"historyRevision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
|
|
37
|
+
"completeness": { "enum": ["complete", "partial", "missing"] },
|
|
38
|
+
"recovery": { "type": "object", "properties": {
|
|
39
|
+
"decision": { "enum": ["resume", "retry", "paused", "terminal", "blocked"] },
|
|
40
|
+
"enforcementSafe": { "type": "boolean" },
|
|
41
|
+
"verifierState": { "enum": ["current", "stale", "not-current"] },
|
|
42
|
+
"invalidatedFileCount": { "type": "integer", "minimum": 0, "maximum": 100000 },
|
|
43
|
+
"handoffState": { "enum": ["none", "available", "invalid"] }
|
|
44
|
+
} },
|
|
45
|
+
"health": { "type": "object", "properties": { "state": { "enum": ["ok", "degraded"] } } }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"else": {
|
|
49
|
+
"properties": {
|
|
50
|
+
"historyRevision": { "type": "null" },
|
|
51
|
+
"completeness": { "const": "unknown" },
|
|
52
|
+
"summary": { "type": "object", "properties": { "contextCompactions": { "const": 0 }, "toolResultCompactions": { "const": 0 }, "compactedToolResults": { "const": 0 } } },
|
|
53
|
+
"recovery": { "type": "object", "properties": {
|
|
54
|
+
"decision": { "const": "unknown" }, "enforcementSafe": { "type": "null" }, "latestCheckpointRef": { "type": "null" },
|
|
55
|
+
"verifierState": { "const": "unknown" }, "invalidatedFileCount": { "type": "null" }, "invalidatedFilesKnown": { "const": false },
|
|
56
|
+
"handoffState": { "const": "unknown" }
|
|
57
|
+
} },
|
|
58
|
+
"events": { "type": "array", "maxItems": 0 },
|
|
59
|
+
"page": { "type": "object", "properties": { "total": { "const": 0 }, "returned": { "const": 0 }, "truncated": { "const": false } } },
|
|
60
|
+
"health": { "type": "object", "properties": { "state": { "enum": ["unavailable", "error"] } } }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"$defs": {
|
|
66
|
+
"nullableCount": { "anyOf": [{ "type": "integer", "minimum": 0, "maximum": 1000000000 }, { "type": "null" }] },
|
|
67
|
+
"summary": {
|
|
68
|
+
"type": "object", "additionalProperties": false,
|
|
69
|
+
"required": ["contextCompactions", "toolResultCompactions", "compactedToolResults"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"contextCompactions": { "type": "integer", "minimum": 0, "maximum": 100000 },
|
|
72
|
+
"toolResultCompactions": { "type": "integer", "minimum": 0, "maximum": 100000 },
|
|
73
|
+
"compactedToolResults": { "type": "integer", "minimum": 0, "maximum": 1000000000 }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"recovery": {
|
|
77
|
+
"type": "object", "additionalProperties": false,
|
|
78
|
+
"required": ["decision", "enforcementSafe", "latestCheckpointRef", "verifierState", "invalidatedFileCount", "invalidatedFilesKnown", "handoffState", "reasonCode"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"decision": { "enum": ["resume", "retry", "paused", "terminal", "blocked", "unknown"] },
|
|
81
|
+
"enforcementSafe": { "anyOf": [{ "type": "boolean" }, { "type": "null" }] },
|
|
82
|
+
"latestCheckpointRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
|
|
83
|
+
"verifierState": { "enum": ["current", "stale", "not-current", "unknown"] },
|
|
84
|
+
"invalidatedFileCount": { "anyOf": [{ "type": "integer", "minimum": 0, "maximum": 100000 }, { "type": "null" }] },
|
|
85
|
+
"invalidatedFilesKnown": { "type": "boolean" },
|
|
86
|
+
"handoffState": { "enum": ["none", "available", "invalid", "unknown"] },
|
|
87
|
+
"reasonCode": { "$ref": "common-v1.schema.json#/$defs/reasonCode" }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"retainedContent": {
|
|
91
|
+
"type": "object", "additionalProperties": false,
|
|
92
|
+
"required": ["access", "exposed", "reasonCode"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"access": { "const": "omitted" }, "exposed": { "const": false },
|
|
95
|
+
"reasonCode": { "const": "protected-runtime-evidence" }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"event": {
|
|
99
|
+
"type": "object", "additionalProperties": false,
|
|
100
|
+
"required": ["eventRef", "evidenceRef", "sequence", "recordedAt", "kind", "title", "detail", "toolName", "originalChars", "originalLines", "captureCount", "willRetry", "fromExtension"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"eventRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
103
|
+
"evidenceRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
104
|
+
"sequence": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
|
|
105
|
+
"recordedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
106
|
+
"kind": { "enum": ["context-compaction", "tool-result-compaction"] },
|
|
107
|
+
"title": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
108
|
+
"detail": { "$ref": "common-v1.schema.json#/$defs/nullableDisplayText" },
|
|
109
|
+
"toolName": { "$ref": "common-v1.schema.json#/$defs/nullableDisplayText" },
|
|
110
|
+
"originalChars": { "$ref": "#/$defs/nullableCount" },
|
|
111
|
+
"originalLines": { "$ref": "#/$defs/nullableCount" },
|
|
112
|
+
"captureCount": { "$ref": "#/$defs/nullableCount" },
|
|
113
|
+
"willRetry": { "anyOf": [{ "type": "boolean" }, { "type": "null" }] },
|
|
114
|
+
"fromExtension": { "anyOf": [{ "type": "boolean" }, { "type": "null" }] }
|
|
115
|
+
},
|
|
116
|
+
"allOf": [
|
|
117
|
+
{ "if": { "properties": { "kind": { "const": "context-compaction" } }, "required": ["kind"] }, "then": { "properties": {
|
|
118
|
+
"toolName": { "type": "null" }, "originalChars": { "type": "null" }, "originalLines": { "type": "null" }, "captureCount": { "type": "null" },
|
|
119
|
+
"willRetry": { "type": "boolean" }, "fromExtension": { "type": "boolean" }
|
|
120
|
+
} } },
|
|
121
|
+
{ "if": { "properties": { "kind": { "const": "tool-result-compaction" } }, "required": ["kind"] }, "then": { "properties": {
|
|
122
|
+
"toolName": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }, "captureCount": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
123
|
+
"willRetry": { "type": "null" }, "fromExtension": { "type": "null" }
|
|
124
|
+
} } }
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"page": {
|
|
128
|
+
"type": "object", "additionalProperties": false, "required": ["total", "returned", "truncated"],
|
|
129
|
+
"properties": {
|
|
130
|
+
"total": { "type": "integer", "minimum": 0, "maximum": 100000 },
|
|
131
|
+
"returned": { "type": "integer", "minimum": 0, "maximum": 300 },
|
|
132
|
+
"truncated": { "type": "boolean" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"warning": {
|
|
136
|
+
"type": "object", "additionalProperties": false, "required": ["code", "count", "message"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"code": { "enum": ["telemetry-missing", "telemetry-corrupt", "telemetry-incomplete-tail", "telemetry-input-truncated", "history-truncated"] },
|
|
139
|
+
"count": { "type": "integer", "minimum": 1, "maximum": 1000000000 },
|
|
140
|
+
"message": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://piagent.io.vn/schemas/piagent-webui/release-monitor-v1.schema.json",
|
|
4
|
+
"title": "Piagent WebUI bounded benchmark and release monitor v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "version", "generatedAt", "identity", "state", "monitorRevision", "benchmark", "release", "actions", "health"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"version": { "const": "piagent-webui-release-monitor-v1" },
|
|
11
|
+
"generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
12
|
+
"identity": { "$ref": "common-v1.schema.json#/$defs/identity" },
|
|
13
|
+
"state": { "enum": ["ready", "unavailable"] },
|
|
14
|
+
"monitorRevision": { "$ref": "common-v1.schema.json#/$defs/nullableRevisionToken" },
|
|
15
|
+
"benchmark": { "$ref": "#/$defs/benchmark" },
|
|
16
|
+
"release": { "$ref": "#/$defs/release" },
|
|
17
|
+
"actions": { "$ref": "#/$defs/actions" },
|
|
18
|
+
"health": { "$ref": "common-v1.schema.json#/$defs/health" }
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"properties": {
|
|
23
|
+
"identity": { "type": "object", "properties": { "agentOperationId": { "type": "null" }, "toolCallId": { "type": "null" } } }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
28
|
+
"then": {
|
|
29
|
+
"properties": {
|
|
30
|
+
"monitorRevision": { "$ref": "common-v1.schema.json#/$defs/revisionToken" },
|
|
31
|
+
"health": { "type": "object", "properties": { "state": { "enum": ["ok", "degraded"] } } }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"else": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"monitorRevision": { "type": "null" },
|
|
37
|
+
"benchmark": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"state": { "const": "unavailable" },
|
|
41
|
+
"runs": { "type": "array", "maxItems": 0 },
|
|
42
|
+
"warnings": { "type": "array", "maxItems": 0 },
|
|
43
|
+
"page": { "type": "object", "properties": { "total": { "const": 0 }, "returned": { "const": 0 }, "truncated": { "const": false } } }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"release": { "type": "object", "properties": { "state": { "const": "unavailable" } } },
|
|
47
|
+
"health": { "type": "object", "properties": { "state": { "const": "error" } } }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"$defs": {
|
|
53
|
+
"benchmark": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["state", "runs", "warnings", "page"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"state": { "enum": ["ready", "missing", "unavailable"] },
|
|
59
|
+
"runs": { "type": "array", "maxItems": 20, "items": { "$ref": "#/$defs/run" } },
|
|
60
|
+
"warnings": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/warning" } },
|
|
61
|
+
"page": { "$ref": "#/$defs/page" }
|
|
62
|
+
},
|
|
63
|
+
"allOf": [
|
|
64
|
+
{
|
|
65
|
+
"if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] },
|
|
66
|
+
"then": { "properties": { "runs": { "type": "array", "minItems": 1 } } },
|
|
67
|
+
"else": { "properties": { "runs": { "type": "array", "maxItems": 0 } } }
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"run": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["runRef", "suiteId", "lifecycle", "evidenceState", "sourceState", "startedAt", "updatedAt", "completedRuns", "expectedRuns", "verdict", "releaseGate", "tokenClaimAllowed", "claimTier", "scores"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"runRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },
|
|
77
|
+
"suiteId": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
78
|
+
"lifecycle": { "enum": ["completed", "paused", "interrupted", "stopped", "aborted", "in-progress", "incomplete"] },
|
|
79
|
+
"evidenceState": { "enum": ["complete", "partial"] },
|
|
80
|
+
"sourceState": { "enum": ["current", "stale"] },
|
|
81
|
+
"startedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
82
|
+
"updatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" },
|
|
83
|
+
"completedRuns": { "type": "integer", "minimum": 0, "maximum": 1000 },
|
|
84
|
+
"expectedRuns": { "type": "integer", "minimum": 0, "maximum": 1000 },
|
|
85
|
+
"verdict": { "$ref": "common-v1.schema.json#/$defs/nullableDisplayText" },
|
|
86
|
+
"releaseGate": { "enum": ["passed", "failed", "not-applicable", "unknown"] },
|
|
87
|
+
"tokenClaimAllowed": { "type": ["boolean", "null"] },
|
|
88
|
+
"claimTier": { "enum": ["smoke", "public-regression", "capability", "private-holdout", "production-shadow", "unknown"] },
|
|
89
|
+
"scores": { "$ref": "#/$defs/scores" }
|
|
90
|
+
},
|
|
91
|
+
"allOf": [
|
|
92
|
+
{
|
|
93
|
+
"if": { "properties": { "lifecycle": { "const": "completed" } }, "required": ["lifecycle"] },
|
|
94
|
+
"then": { "properties": { "evidenceState": { "const": "complete" }, "releaseGate": { "enum": ["passed", "failed", "not-applicable"] } } },
|
|
95
|
+
"else": { "properties": { "evidenceState": { "const": "partial" }, "verdict": { "type": "null" }, "releaseGate": { "const": "unknown" }, "tokenClaimAllowed": { "type": "null" }, "claimTier": { "const": "unknown" } } }
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"scores": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["quality", "safety", "reliability", "workflow", "efficiency", "overall"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"quality": { "$ref": "#/$defs/nullableScore" },
|
|
105
|
+
"safety": { "$ref": "#/$defs/nullableScore" },
|
|
106
|
+
"reliability": { "$ref": "#/$defs/nullableScore" },
|
|
107
|
+
"workflow": { "$ref": "#/$defs/nullableScore" },
|
|
108
|
+
"efficiency": { "$ref": "#/$defs/nullableScore" },
|
|
109
|
+
"overall": { "$ref": "#/$defs/nullableScore" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"nullableScore": { "type": ["number", "null"], "minimum": 0, "maximum": 10 },
|
|
113
|
+
"warning": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["code", "count", "message"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"code": { "enum": ["benchmark-evidence-corrupt", "benchmark-directory-truncated"] },
|
|
119
|
+
"count": { "type": "integer", "minimum": 1, "maximum": 1000000 },
|
|
120
|
+
"message": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"page": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["total", "returned", "truncated"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"total": { "type": "integer", "minimum": 0, "maximum": 1000000 },
|
|
129
|
+
"returned": { "type": "integer", "minimum": 0, "maximum": 20 },
|
|
130
|
+
"truncated": { "type": "boolean" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"release": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": ["state", "reportRef", "generatedAt", "sourceState", "localSafeGate", "rcAssembly", "beta", "gaRelease", "blockerCount", "blockers", "authorization"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"state": { "enum": ["ready", "stale", "missing", "unavailable"] },
|
|
139
|
+
"reportRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
|
|
140
|
+
"generatedAt": { "anyOf": [{ "$ref": "common-v1.schema.json#/$defs/timestamp" }, { "type": "null" }] },
|
|
141
|
+
"sourceState": { "enum": ["current", "stale", "unknown"] },
|
|
142
|
+
"localSafeGate": { "enum": ["passed", "failed", "unknown"] },
|
|
143
|
+
"rcAssembly": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
144
|
+
"beta": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
145
|
+
"gaRelease": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" },
|
|
146
|
+
"blockerCount": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
147
|
+
"blockers": { "type": "array", "maxItems": 8, "items": { "$ref": "common-v1.schema.json#/$defs/nonEmptyDisplayText" } },
|
|
148
|
+
"authorization": { "$ref": "#/$defs/releaseAuthorization" }
|
|
149
|
+
},
|
|
150
|
+
"allOf": [
|
|
151
|
+
{
|
|
152
|
+
"if": { "properties": { "state": { "enum": ["ready", "stale"] } }, "required": ["state"] },
|
|
153
|
+
"then": { "properties": { "reportRef": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" }, "generatedAt": { "$ref": "common-v1.schema.json#/$defs/timestamp" }, "sourceState": { "enum": ["current", "stale"] } } },
|
|
154
|
+
"else": { "properties": { "reportRef": { "type": "null" }, "generatedAt": { "type": "null" }, "sourceState": { "const": "unknown" }, "localSafeGate": { "const": "unknown" }, "rcAssembly": { "const": "unknown" }, "beta": { "const": "unknown" }, "gaRelease": { "const": "unknown" }, "blockerCount": { "const": 0 }, "blockers": { "type": "array", "maxItems": 0 } } }
|
|
155
|
+
},
|
|
156
|
+
{ "if": { "properties": { "state": { "const": "ready" } }, "required": ["state"] }, "then": { "properties": { "sourceState": { "const": "current" } } } },
|
|
157
|
+
{ "if": { "properties": { "state": { "const": "stale" } }, "required": ["state"] }, "then": { "properties": { "sourceState": { "const": "stale" } } } }
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"releaseAuthorization": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"required": ["releaseCommit", "tag", "publish", "push"],
|
|
164
|
+
"properties": { "releaseCommit": { "const": false }, "tag": { "const": false }, "publish": { "const": false }, "push": { "const": false } }
|
|
165
|
+
},
|
|
166
|
+
"actions": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": ["runBenchmark", "resumeBenchmark", "releaseCommit", "tag", "publish", "push"],
|
|
170
|
+
"properties": { "runBenchmark": { "const": false }, "resumeBenchmark": { "const": false }, "releaseCommit": { "const": false }, "tag": { "const": false }, "publish": { "const": false }, "push": { "const": false } }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|