@clagentic/console 1.10.0-beta.3 → 1.10.0-beta.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 (38) hide show
  1. package/lib/build-sha.json +2 -2
  2. package/lib/build-update-offer.js +29 -0
  3. package/lib/daemon.js +5 -9
  4. package/lib/grant-keys.js +24 -137
  5. package/lib/identity/config.js +118 -0
  6. package/lib/identity/contract.js +61 -0
  7. package/lib/identity/delivery.js +224 -0
  8. package/lib/identity/holder.js +87 -0
  9. package/lib/identity/index.js +229 -0
  10. package/lib/identity/jose.js +13 -0
  11. package/lib/identity/origin.js +28 -0
  12. package/lib/identity/owner.js +30 -0
  13. package/lib/identity/providers/gatekeeper.js +91 -0
  14. package/lib/identity/providers/jwks-self.js +85 -0
  15. package/lib/identity/providers/module.js +98 -0
  16. package/lib/identity/providers/signing-key.js +118 -0
  17. package/lib/identity/record.js +23 -0
  18. package/lib/identity/unavailable.js +29 -0
  19. package/lib/project-notifications.js +2 -3
  20. package/lib/prompt-kinds/permission.js +0 -18
  21. package/lib/prompt-registry.js +5 -13
  22. package/lib/public/css/notifications-center.css +2 -8
  23. package/lib/public/css/rewind.css +0 -1
  24. package/lib/public/modules/app-notifications.js +4 -7
  25. package/lib/public/modules/build-notice-gate.js +73 -0
  26. package/lib/public/modules/diagnostics.js +43 -1
  27. package/lib/public/modules/prompt-banner.js +0 -12
  28. package/lib/public/modules/prompt-kinds/permission-choices.js +1 -6
  29. package/lib/public/modules/prompt-kinds/permission.js +0 -15
  30. package/lib/sdk-bridge.js +82 -3
  31. package/lib/sessions.js +7 -0
  32. package/lib/turn-initiator.js +29 -14
  33. package/lib/utils.js +4 -7
  34. package/lib/ws-schema.js +3 -3
  35. package/lib/yoke/adapters/claude-worker.js +5 -5
  36. package/lib/yoke/adapters/claude.js +5 -5
  37. package/package.json +3 -1
  38. package/scripts/vendor-identity-vectors.js +52 -0
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ // Copies the Identity Assertion conformance vectors into test/fixtures and
3
+ // records a pin (contract version, source ref, sha256 of each file) so a test
4
+ // can prove the vendored set is the one that was pinned.
5
+ //
6
+ // Usage: node scripts/vendor-identity-vectors.js <vectors/v1 dir> [--ref <source ref>]
7
+ //
8
+ // Only the published contract artifacts are copied (manifest.json, jwks.json).
9
+ // No code from the contract's home repository is read or imported.
10
+
11
+ var fs = require("fs");
12
+ var path = require("path");
13
+ var crypto = require("crypto");
14
+
15
+ var FILES = ["manifest.json", "jwks.json"];
16
+ var DEST = path.join(__dirname, "..", "test", "fixtures", "identity-contract", "v1");
17
+
18
+ function sha256(buf) {
19
+ return crypto.createHash("sha256").update(buf).digest("hex");
20
+ }
21
+
22
+ function parseArgs(argv) {
23
+ var out = { source: null, ref: null };
24
+ for (var i = 0; i < argv.length; i++) {
25
+ if (argv[i] === "--ref") out.ref = argv[++i];
26
+ else if (!out.source) out.source = argv[i];
27
+ }
28
+ return out;
29
+ }
30
+
31
+ function main() {
32
+ var args = parseArgs(process.argv.slice(2));
33
+ if (!args.source) {
34
+ console.error("usage: vendor-identity-vectors.js <vectors/v1 dir> [--ref <source ref>]");
35
+ process.exit(2);
36
+ }
37
+ fs.mkdirSync(DEST, { recursive: true });
38
+ var pin = { files: {} };
39
+ FILES.forEach(function (name) {
40
+ var buf = fs.readFileSync(path.join(args.source, name));
41
+ fs.writeFileSync(path.join(DEST, name), buf);
42
+ pin.files[name] = sha256(buf);
43
+ });
44
+ var manifest = JSON.parse(fs.readFileSync(path.join(DEST, "manifest.json"), "utf8"));
45
+ pin.contract_version = manifest.contract_version;
46
+ pin.cia = manifest.cia;
47
+ pin.source_ref = args.ref || null;
48
+ fs.writeFileSync(path.join(DEST, "PIN.json"), JSON.stringify(pin, null, 2) + "\n");
49
+ console.log("vendored contract " + pin.contract_version + " (cia " + pin.cia + ") into " + DEST);
50
+ }
51
+
52
+ main();