Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
623 changes: 530 additions & 93 deletions dotnet/src/Generated/Rpc.cs

Large diffs are not rendered by default.

479 changes: 412 additions & 67 deletions dotnet/src/Generated/SessionEvents.cs

Large diffs are not rendered by default.

444 changes: 409 additions & 35 deletions go/rpc/zrpc.go

Large diffs are not rendered by default.

387 changes: 381 additions & 6 deletions go/rpc/zrpc_encoding.go

Large diffs are not rendered by default.

32 changes: 29 additions & 3 deletions go/rpc/zsession_encoding.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 137 additions & 6 deletions go/rpc/zsession_events.go

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions go/zsession_events.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Session event "permission.carriedForward". Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionCarriedForwardEvent extends SessionEvent {

@Override
public String getType() { return "permission.carriedForward"; }

@JsonProperty("data")
private PermissionCarriedForwardEventData data;

public PermissionCarriedForwardEventData getData() { return data; }
public void setData(PermissionCarriedForwardEventData data) { this.data = data; }

/** Data payload for {@link PermissionCarriedForwardEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public record PermissionCarriedForwardEventData(
/** Authorization edge minted for this admission. Not a prompt id: no prompt was raised, so no client should expect a request with this id. */
@JsonProperty("requestId") String requestId,
/** Tool call this admission authorizes. Its execution receipts the prior grant, which is how a single-effect approval is spent rather than carried forward again. */
@JsonProperty("toolCallId") String toolCallId,
/** Identity of the prior authorization record that contained the proposal. */
@JsonProperty("recordId") String recordId,
/** Always `authorization_carry_forward`. Stated explicitly so a consumer reading this event cannot mistake it for a human, host-policy, or assisted-approval decision. */
@JsonProperty("decisionSource") PermissionDecisionSource decisionSource
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public record PermissionCompletedEventData(
/** Optional tool call ID associated with this permission prompt; clients may use it to correlate UI created from tool-scoped prompts */
@JsonProperty("toolCallId") String toolCallId,
/** The result of the permission request */
@JsonProperty("result") Object result
@JsonProperty("result") Object result,
/** Who decided this permission request. Absent on completions recorded before this field existed, which consumers must treat as "not a human decision" rather than assuming one. Authorization records are minted only for `human_response`; an assisted-approval verdict, a host policy, an unattended fallback, and a hook resolution all produce the same `result` a person does, so this is the only field that distinguishes them. */
@JsonProperty("decisionSource") PermissionDecisionSource decisionSource
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import javax.annotation.processing.Generated;

/**
* Controlled reason or actor responsible for a permission response.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public enum PermissionDecisionSource {
/** The {@code assisted_approval} variant. */
ASSISTED_APPROVAL("assisted_approval"),
/** The {@code human_response} variant. */
HUMAN_RESPONSE("human_response"),
/** The {@code host_policy} variant. */
HOST_POLICY("host_policy"),
/** The {@code unattended_fallback} variant. */
UNATTENDED_FALLBACK("unattended_fallback"),
/** The {@code authorization_carry_forward} variant. */
AUTHORIZATION_CARRY_FORWARD("authorization_carry_forward");

private final String value;
PermissionDecisionSource(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
public static PermissionDecisionSource fromValue(String value) {
for (PermissionDecisionSource v : values()) {
if (v.value.equals(value)) return v;
}
throw new IllegalArgumentException("Unknown PermissionDecisionSource value: " + value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Session event "permission.messageAuthorizationDegraded". Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionMessageAuthorizationDegradedEvent extends SessionEvent {

@Override
public String getType() { return "permission.messageAuthorizationDegraded"; }

@JsonProperty("data")
private PermissionMessageAuthorizationDegradedEventData data;

public PermissionMessageAuthorizationDegradedEventData getData() { return data; }
public void setData(PermissionMessageAuthorizationDegradedEventData data) { this.data = data; }

/** Data payload for {@link PermissionMessageAuthorizationDegradedEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public record PermissionMessageAuthorizationDegradedEventData(
/** The human turn that could not be represented safely. */
@JsonProperty("turnIndex") Long turnIndex
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.processing.Generated;

/**
* Session event "permission.messageAuthorization". Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionMessageAuthorizationEvent extends SessionEvent {

@Override
public String getType() { return "permission.messageAuthorization"; }

@JsonProperty("data")
private PermissionMessageAuthorizationEventData data;

public PermissionMessageAuthorizationEventData getData() { return data; }
public void setData(PermissionMessageAuthorizationEventData data) { this.data = data; }

/** Data payload for {@link PermissionMessageAuthorizationEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public record PermissionMessageAuthorizationEventData(
/** Deterministic identity of the record, derived from the turn and span offsets so re-extracting the same span mints nothing new. */
@JsonProperty("recordId") String recordId,
/** The human turn the quoted span was read from. */
@JsonProperty("turnIndex") Long turnIndex,
/** Whether the claim granted or denied authority. */
@JsonProperty("polarity") PermissionMessageAuthorizationPolarity polarity,
/** The kind of effect authorized, as an action-class identifier. */
@JsonProperty("actionClass") String actionClass,
/** Start byte offset of the authorizing span within the turn. */
@JsonProperty("spanStart") Long spanStart,
/** End byte offset of the authorizing span within the turn. */
@JsonProperty("spanEnd") Long spanEnd,
/** Concrete named targets that appear verbatim inside the span. */
@JsonProperty("targetMembers") List<String> targetMembers,
/** The task the permission is scoped to, when the human named one. */
@JsonProperty("task") String task,
/** The trusted version discriminator, when one exists. Exact shell-command grants carry the byte-identical commands grounded in the human span; world-derived classes carry a file object, remote tip, or runner only when that state was captured safely. An opaque object mirroring the runtime's adjacently-tagged resolution. */
@JsonProperty("world") Object world
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import javax.annotation.processing.Generated;

/**
* Which direction a message-backed authorization claim moves authority in.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public enum PermissionMessageAuthorizationPolarity {
/** The {@code grant} variant. */
GRANT("grant"),
/** The {@code denial} variant. */
DENIAL("denial");

private final String value;
PermissionMessageAuthorizationPolarity(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
public static PermissionMessageAuthorizationPolarity fromValue(String value) {
for (PermissionMessageAuthorizationPolarity v : values()) {
if (v.value.equals(value)) return v;
}
throw new IllegalArgumentException("Unknown PermissionMessageAuthorizationPolarity value: " + value);
}
}
Loading
Loading