@bivy/bivy 0.10.1-staging.262 → 0.10.1-staging.263

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.
@@ -32,3 +32,31 @@ export function receiptEvidenceFromAudit(events, storageReadable) {
32
32
  },
33
33
  };
34
34
  }
35
+ /** Add only node-observed execution facts to the already bounded audit summary. */
36
+ export function receiptEvidenceForRun(events, storageReadable, context) {
37
+ const audit = receiptEvidenceFromAudit(events, storageReadable);
38
+ const enforcement = context.runtimeEnforcement || "unavailable";
39
+ const sandboxClass = enforcement === "native-sandbox" ? "enforced"
40
+ : enforcement === "tool-controls" ? "observed" : "unavailable";
41
+ return {
42
+ ...audit,
43
+ execution: {
44
+ profile: context.profile,
45
+ controller: context.controller,
46
+ ...(context.agentVersion ? { agentVersion: context.agentVersion } : {}),
47
+ modelVersionStatus: "unknown",
48
+ },
49
+ protection: {
50
+ effective: {
51
+ executionProfile: context.profile,
52
+ ...(context.sandboxTier ? { sandboxTier: context.sandboxTier } : {}),
53
+ ...(context.approvalMode ? { approvalMode: context.approvalMode } : {}),
54
+ runtimeEnforcement: enforcement,
55
+ },
56
+ capabilities: [
57
+ { capability: "sandbox", evidenceClass: sandboxClass, mechanism: enforcement },
58
+ { capability: "approval", evidenceClass: context.toolInterception ? "enforced" : "unavailable", mechanism: context.toolInterception ? "runtime tool interception" : "not observed" },
59
+ ],
60
+ },
61
+ };
62
+ }
package/dist/server.js CHANGED
@@ -16,7 +16,7 @@ import { SessionRerouteController } from "./policy/session-reroute.js";
16
16
  import { activeRulesetFor } from "./runtime/ruleset-store.js";
17
17
  import { createRulesetController } from "./controllers/rulesets.js";
18
18
  import { createAuditLog, readAuditEvents } from "./audit/index.js";
19
- import { receiptEvidenceFromAudit } from "./audit/receipt-evidence.js";
19
+ import { receiptEvidenceForRun } from "./audit/receipt-evidence.js";
20
20
  import { createWorkspaceController } from "./controllers/workspaces.js";
21
21
  import { createModelController } from "./controllers/models.js";
22
22
  import { Type } from "typebox";
@@ -3979,6 +3979,7 @@ async function runIssueTaskInner(cfg, issue, source, overrides = {}) {
3979
3979
  if (kind) {
3980
3980
  const terminal = stage === "failed" || stage === "checks_failed" || stage === "no_changes" || stage === "pr_opened";
3981
3981
  const auditEvents = terminal ? readAuditEvents(auditLog.file, { session: record.id }) : [];
3982
+ const runtimeInfo = runtimeList(record.runtimeId).find((runtime) => runtime.id === record.runtimeId);
3982
3983
  const summary = stage === "pr_opened" ? "Pull request opened."
3983
3984
  : stage === "started" ? "Working branch and session created."
3984
3985
  : stage === "pushed" ? "Changes pushed; no pull request is open."
@@ -3995,7 +3996,14 @@ async function runIssueTaskInner(cfg, issue, source, overrides = {}) {
3995
3996
  url: typeof extra.prUrl === "string" ? extra.prUrl : undefined,
3996
3997
  ...(stage === "checks_failed" || stage === "failed" ? { status: "failed" } : {}),
3997
3998
  }],
3998
- ...(terminal ? { receiptEvidence: receiptEvidenceFromAudit(auditEvents, fs.existsSync(auditLog.file)) } : {}),
3999
+ ...(terminal ? { receiptEvidence: receiptEvidenceForRun(auditEvents, fs.existsSync(auditLog.file), {
4000
+ profile: record.ephemeral ? "isolated_customer_cloud" : "trusted_workstation",
4001
+ controller: record.ephemeral ? "bivy_hosted_provisioning" : "customer",
4002
+ sandboxTier: record.sandbox,
4003
+ approvalMode: record.approvalMode,
4004
+ runtimeEnforcement: runtimeInfo?.protectionLevel,
4005
+ toolInterception: runtimeInfo?.capabilities?.toolInterception === true,
4006
+ }) } : {}),
3999
4007
  });
4000
4008
  }
4001
4009
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.10.1-staging.262",
3
+ "version": "0.10.1-staging.263",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "Run coding agents on machines you own. Open-source, self-hostable agent workspace.",