{"version":3,"term":{"cols":80,"rows":24},"timestamp":1777671502,"command":"npm run demo:record","env":{"SHELL":"/bin/zsh"}}
[0.228, "o", "\r\n> zt-adapter-hello-world@0.1.0 demo:record\r\n> bash scripts/record-demo.sh\r\n\r\n"]
[0.016, "o", "Zero Trust Hello World Adapter demo\r\n===================================\r\nGoal: block an unsafe agent action, then authorize and run a safe Hello World action.\r\n"]
[0.000, "o", "\r\n$ npm run zt:mock\r\n"]
[0.397, "o", "mock control plane is listening at http://127.0.0.1:3000\r\n\r\n$ npm test\r\n"]
[0.225, "o", "\r\n> zt-adapter-hello-world@0.1.0 test\r\n> node --test\r\n\r\n"]
[0.189, "o", "✔ checkAction posts to the Zero Trust control plane (1.829585ms)\r\n"]
[0.015, "o", "✔ root endpoint returns hello message (1.771434ms)\r\n✔ health endpoint returns service status (1.637799ms)\r\n"]
[0.009, "o", "✔ mock control plane supports register, deny, allow, and execute flow (2.597394ms)\r\n"]
[0.010, "o", "✔ ZeroTrustClient.decide calls the current MVP /actions endpoint (1.83944ms)\r\n✔ guardedCall skips execution on deny (0.325975ms)\r\n✔ guardedCall executes on allow (0.229244ms)\r\n✔ helper methods preserve draft SDK ergonomics while targeting /actions (1.722527ms)\r\nℹ tests 8\r\nℹ suites 0\r\nℹ pass 8\r\nℹ fail 0\r\nℹ cancelled 0\r\nℹ skipped 0\r\nℹ todo 0\r\nℹ duration_ms 140.267189\r\n"]
[0.013, "o", "\r\n$ curl -sS -X POST http://127.0.0.1:3000/agents -H 'content-type: application/json' -d '{\"actor\":\"hello-world-agent\"}'\r\n"]
[0.018, "o", "{\r\n  \"ok\": true,\r\n  \"actor\": \"hello-world-agent\",\r\n  \"registered\": true\r\n}\r\n"]
[0.001, "o", "\r\n\r\nAttempt unauthorized execution. This must be blocked.\r\n"]
[0.001, "o", "\r\n$ npm run demo:deny\r\n"]
[0.254, "o", "\r\n> zt-adapter-hello-world@0.1.0 demo:deny\r\n> node src/demo-deny.js\r\n\r\n"]
[0.129, "o", "{\r\n  \"ok\": false,\r\n  \"status\": 403,\r\n  \"actor\": \"hello-world-agent\",\r\n  \"action\": \"aws.ec2.terminate_instances\",\r\n  \"resource\": \"i-demo\",\r\n  \"decision\": \"deny\",\r\n  \"reason\": \"Mock policy blocks infrastructure termination.\",\r\n  \"audit\": {\r\n    \"timestamp\": \"2026-05-01T21:38:24.231Z\",\r\n    \"previous_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\r\n    \"current_hash\": \"f92e7e112ca04521ba4dbb260efc05edbe7dee10cb1659cc3a5130f7286f1032\",\r\n    \"kms_signature\": {\r\n      \"algorithm\": \"MOCK_ECDSA_SHA_256\",\r\n      \"key_id\": \"mock-key\",\r\n      \"signature\": \"mock-signature\"\r\n    }\r\n  },\r\n  \"raw\": {\r\n    \"ok\": false,\r\n    \"actor\": \"hello-world-agent\",\r\n    \"action\": \"aws.ec2.terminate_instances\",\r\n    \"resource\": \"i-demo\",\r\n    \"decision\": \"deny\",\r\n    \"reason\": \"Mock policy blocks infrastructure termination.\",\r\n    \"audit\": {\r\n      \"timestamp\": \"2026-05-01T21:38:24.231Z\",\r\n      \"previous_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\r\n      \"current_hash\": \"f92e7e11"]
[0.000, "o", "2ca04521ba4dbb260efc05edbe7dee10cb1659cc3a5130f7286f1032\",\r\n      \"kms_signature\": {\r\n        \"algorithm\": \"MOCK_ECDSA_SHA_256\",\r\n        \"key_id\": \"mock-key\",\r\n        \"signature\": \"mock-signature\"\r\n      }\r\n    }\r\n  }\r\n}\r\n"]
[0.011, "o", "\r\nApply policy for the safe Hello World action.\r\n"]
[0.001, "o", "\r\n$ curl -sS -X POST http://127.0.0.1:3000/policies/allow -H 'content-type: application/json' -d '{\"action\":\"hello-world.say_hello\",\"reason\":\"Quickstart policy allows hello world.\"}'\r\n"]
[0.017, "o", "{\r\n  \"ok\": true,\r\n  \"action\": \"hello-world.say_hello\",\r\n  \"decision\": \"allow\"\r\n}\r\n"]
[0.001, "o", "\r\n\r\nExecute authorized Hello World action.\r\n"]
[0.000, "o", "\r\n$ npm run demo:allow\r\n"]
[0.232, "o", "\r\n> zt-adapter-hello-world@0.1.0 demo:allow\r\n> node src/demo-allow.js\r\n\r\n"]
[0.127, "o", "{\r\n  \"ok\": true,\r\n  \"status\": 200,\r\n  \"actor\": \"hello-world-agent\",\r\n  \"action\": \"hello-world.say_hello\",\r\n  \"resource\": \"local-demo\",\r\n  \"decision\": \"allow\",\r\n  \"reason\": \"Quickstart policy allows hello world.\",\r\n  \"audit\": {\r\n    \"timestamp\": \"2026-05-01T21:38:24.619Z\",\r\n    \"previous_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\r\n    \"current_hash\": \"39908f59f14212197ea3ac7227d78a0bc12d7c99fb883a7e507822b5adbff746\",\r\n    \"kms_signature\": {\r\n      \"algorithm\": \"MOCK_ECDSA_SHA_256\",\r\n      \"key_id\": \"mock-key\",\r\n      \"signature\": \"mock-signature\"\r\n    }\r\n  },\r\n  \"raw\": {\r\n    \"ok\": true,\r\n    \"actor\": \"hello-world-agent\",\r\n    \"action\": \"hello-world.say_hello\",\r\n    \"resource\": \"local-demo\",\r\n    \"decision\": \"allow\",\r\n    \"reason\": \"Quickstart policy allows hello world.\",\r\n    \"audit\": {\r\n      \"timestamp\": \"2026-05-01T21:38:24.619Z\",\r\n      \"previous_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\r\n      \"current_hash\": \"39908f59f14212197ea3ac7227d78a"]
[0.000, "o", "0bc12d7c99fb883a7e507822b5adbff746\",\r\n      \"kms_signature\": {\r\n        \"algorithm\": \"MOCK_ECDSA_SHA_256\",\r\n        \"key_id\": \"mock-key\",\r\n        \"signature\": \"mock-signature\"\r\n      }\r\n    }\r\n  },\r\n  \"executionSkipped\": false,\r\n  \"result\": {\r\n    \"message\": \"Hello from a policy-approved adapter action.\"\r\n  }\r\n}\r\n"]
[0.012, "o", "\r\nDemo complete: unsafe action was denied; safe action was authorized and executed.\r\n"]
[0.016, "x", "0"]
