Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0320ae0
feat(core): persist network approvals in execpolicy
viyatb-oai Feb 20, 2026
bbe3c22
chore(schema): trim generated whitespace
viyatb-oai Feb 20, 2026
66af14c
chore(schema): sync generated approval fixture
viyatb-oai Feb 20, 2026
1d94125
Merge remote-tracking branch 'origin/main' into codex/viyatb/network-…
viyatb-oai Feb 20, 2026
fcdea09
style(core): format merged network approval conflict resolution
viyatb-oai Feb 20, 2026
9670584
fix(tui): handle network policy approval decisions
viyatb-oai Feb 20, 2026
c4a22f1
refactor(core): keep exec policy warning loader private
viyatb-oai Feb 20, 2026
4884bad
refactor(core): trim network approval convenience APIs
viyatb-oai Feb 20, 2026
7c57d2b
fix(core): validate network approval amendment host
viyatb-oai Feb 20, 2026
4ec68af
Merge remote-tracking branch 'origin/main' into codex/viyatb/network-…
viyatb-oai Feb 21, 2026
7eb7fbe
refactor(core): extract network execpolicy amendment mapping
viyatb-oai Feb 22, 2026
c25a1bc
fix(tui): use public network policy enum path
viyatb-oai Feb 22, 2026
4e6f42c
refactor(core): address review nits on policy updates
viyatb-oai Feb 23, 2026
7220722
test(core): add network policy amendment persistence integration test
viyatb-oai Feb 23, 2026
6d57ede
Merge remote-tracking branch 'origin/main' into codex/viyatb/network-…
viyatb-oai Feb 23, 2026
f0740e1
fix(core-tests): preload network config for approvals test
viyatb-oai Feb 23, 2026
e07f510
fix(core-tests): force limited network mode in approval test
viyatb-oai Feb 24, 2026
71b527f
fix(core-tests): avoid completion race in network approval test
viyatb-oai Feb 24, 2026
9973ef7
fix(core-tests): use resolved proxy addr in network approval test
viyatb-oai Feb 24, 2026
592d64a
fix(core-tests): stabilize network approval integration test
viyatb-oai Feb 24, 2026
356923d
fix(core-tests): use runtime proxy addr in network approval test
viyatb-oai Feb 24, 2026
c0ea5f5
test(core): stabilize network policy approval integration test
viyatb-oai Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": [
"action",
"host"
],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": [
"allow",
"deny"
],
"type": "string"
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
Expand Down Expand Up @@ -43,6 +65,28 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": [
"network_policy_amendment"
],
"type": "object"
}
},
"required": [
"network_policy_amendment"
],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": [
Expand Down
42 changes: 42 additions & 0 deletions codex-rs/app-server-protocol/schema/json/EventMsg.json
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,16 @@
"null"
]
},
"proposed_network_policy_amendments": {
"description": "Proposed network policy amendments (for example allow/deny this host in future).",
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
},
"type": [
"array",
"null"
]
},
"reason": {
"description": "Optional human-readable reason for the approval (e.g. retry without sandbox).",
"type": [
Expand Down Expand Up @@ -3637,6 +3647,28 @@
],
"type": "string"
},
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": [
"action",
"host"
],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": [
"allow",
"deny"
],
"type": "string"
},
"ParsedCommand": {
"oneOf": [
{
Expand Down Expand Up @@ -6907,6 +6939,16 @@
"null"
]
},
"proposed_network_policy_amendments": {
"description": "Proposed network policy amendments (for example allow/deny this host in future).",
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
},
"type": [
"array",
"null"
]
},
"reason": {
"description": "Optional human-readable reason for the approval (e.g. retry without sandbox).",
"type": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": [
"action",
"host"
],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": [
"allow",
"deny"
],
"type": "string"
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
Expand Down Expand Up @@ -43,6 +65,28 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": [
"network_policy_amendment"
],
"type": "object"
}
},
"required": [
"network_policy_amendment"
],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,16 @@
"null"
]
},
"proposed_network_policy_amendments": {
"description": "Proposed network policy amendments (for example allow/deny this host in future).",
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
},
"type": [
"array",
"null"
]
},
"reason": {
"description": "Optional human-readable reason for the approval (e.g. retry without sandbox).",
"type": [
Expand Down Expand Up @@ -4898,6 +4908,28 @@
],
"type": "string"
},
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": [
"action",
"host"
],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": [
"allow",
"deny"
],
"type": "string"
},
"ParsedCommand": {
"oneOf": [
{
Expand Down Expand Up @@ -5310,6 +5342,28 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": [
"network_policy_amendment"
],
"type": "object"
}
},
"required": [
"network_policy_amendment"
],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ExecPolicyAmendment } from "./ExecPolicyAmendment";
import type { NetworkApprovalContext } from "./NetworkApprovalContext";
import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";
import type { ParsedCommand } from "./ParsedCommand";

export type ExecApprovalRequestEvent = {
Expand Down Expand Up @@ -41,4 +42,8 @@ network_approval_context?: NetworkApprovalContext,
/**
* Proposed execpolicy amendment that can be applied to allow future runs.
*/
proposed_execpolicy_amendment?: ExecPolicyAmendment, parsed_cmd: Array<ParsedCommand>, };
proposed_execpolicy_amendment?: ExecPolicyAmendment,
/**
* Proposed network policy amendments (for example allow/deny this host in future).
*/
proposed_network_policy_amendments?: Array<NetworkPolicyAmendment>, parsed_cmd: Array<ParsedCommand>, };
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction";

export type NetworkPolicyAmendment = { host: string, action: NetworkPolicyRuleAction, };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type NetworkPolicyRuleAction = "allow" | "deny";
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ExecPolicyAmendment } from "./ExecPolicyAmendment";
import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";

/**
* User's decision in response to an ExecApprovalRequest.
*/
export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | "denied" | "abort";
export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "abort";
2 changes: 2 additions & 0 deletions codex-rs/app-server-protocol/schema/typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ export type { ModelRerouteReason } from "./ModelRerouteReason";
export type { NetworkAccess } from "./NetworkAccess";
export type { NetworkApprovalContext } from "./NetworkApprovalContext";
export type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol";
export type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";
export type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction";
export type { NewConversationParams } from "./NewConversationParams";
export type { NewConversationResponse } from "./NewConversationResponse";
export type { ParsedCommand } from "./ParsedCommand";
Expand Down
Loading
Loading