Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
adbbba7
Project import generated by Copybara.
Sep 20, 2026
8e6c168
Project import generated by Copybara.
Sep 20, 2026
4a8564c
Project import generated by Copybara.
Sep 20, 2026
f13d229
Project import generated by Copybara.
Sep 20, 2026
e319040
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 20, 2026
7a0053f
Project import generated by Copybara.
Sep 20, 2026
f7a9454
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 20, 2026
3e61255
chore: project examples from Mono a2e8b231b208
Sep 20, 2026
12478d6
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 20, 2026
19b801a
chore: project examples from Mono cc1e1c0a4251
Sep 20, 2026
2b5ae00
chore: project examples from Mono 9b559bc70e7d
Sep 21, 2026
f4f6c7e
chore: project examples from Mono 78799bd5ae75
Sep 21, 2026
12ab5fd
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 21, 2026
a671a32
chore: project examples from Mono 9a003786d767
Sep 21, 2026
8e56b55
chore: project examples from Mono 511bd2305f5a
Sep 21, 2026
4ee0c32
chore: project examples from Mono ad7b9df0b712
Sep 21, 2026
2cfc1c7
chore: project examples from Mono 3a95acea6719
Sep 21, 2026
13dbab9
chore: project examples from Mono c16f3515c56a
Sep 21, 2026
0a7cac7
chore: project examples from Mono 4ab4845398fd
Sep 21, 2026
763d417
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 22, 2026
a996422
chore: project examples from Mono 43ad52f7bcc9
Sep 22, 2026
28ce2c4
chore: project examples from Mono 2df44a8283c0
Sep 22, 2026
cb366a5
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 22, 2026
2626ff1
chore: project examples from Mono f6e0aa99e756
Sep 22, 2026
5713048
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 22, 2026
9f5b41d
chore: project examples from Mono 3457dcec675e
Sep 22, 2026
166063d
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 22, 2026
57da914
chore: project examples from Mono 2102d45bdf4c
Sep 22, 2026
676d5ec
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 23, 2026
a8bdc07
chore: project examples from Mono 0135ea0655c8
Sep 23, 2026
ae41e36
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 23, 2026
e6ce56a
chore: project examples from Mono 7f322bbd03a5
Sep 23, 2026
8a925fc
chore: project examples from Mono c3fe404d7c05
Sep 23, 2026
6f13ace
chore: project examples from Mono 53a87ef3a96f
Sep 23, 2026
50318ef
chore: project examples from Mono 0405bd95fc12
Sep 24, 2026
70b67eb
Merge remote-tracking branch 'origin/main' into sync/mono-projection
github-actions[bot] Sep 24, 2026
6c6d7ad
chore: project examples from Mono 916d407917e8
Sep 24, 2026
5773ee7
chore: project examples from Mono c27319825e1c
Sep 24, 2026
ae55ce2
chore: project examples from Mono 274db22a3ad9
Sep 24, 2026
9234da8
chore: project examples from Mono a971433d12b4
Sep 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
8 changes: 4 additions & 4 deletions .repository-projection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"projection": "examples",
"projectionSchemaVersion": 1,
"sourceRepository": "dx-corp/mono",
"sourceSha": "0405bd95fc12ed2ca79294c8a91340aec60f7f17",
"sourceSha": "a971433d12b40d9042b3a64c2c074fa8fc398e69",
"destinationRepository": "dx-corp/examples",
"priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143",
"priorProjectedBase": "c4df6306c20a8670d6b0046a960f0c5aa020f8bb",
"definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5",
"toolDigest": "898e8657d9153a2a51d7c283bf83bb3350b5d1e6",
"contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32",
"toolDigest": "ff02edcbb40b0028af10ab01a101e918341f157a",
"contentDigest": "dd893c827fbf83693aa832b8932dd452e30876e77e70477fe8ebae40ed92d678",
"publicationEligible": true
}
16 changes: 8 additions & 8 deletions examples/account-brief.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function main() {
writeAccess: check.writeAccess, nextAction: check.nextAction,
requirements: check.capabilities.map(item => ({ service: item.service,
missingRequirements: item.missingRequirements,
reasonCodes: item.missingRequirementStates.map(reason => reason.reasonCode) })),
accessible: item.accessible })),
modelReady: check.selectedModel?.ready ?? null, errorKind: check.error?.kind,
requestId: check.error?.requestId,
}));
Expand All @@ -86,13 +86,13 @@ async function main() {
else if (["approve", "deny"].includes(action)) {
const result = await task.result();
const event = result.event;
if (result.status !== "waiting" || !event || event.requestType !== OperatingThreadRequestType.APPROVAL
if (result.status !== "waiting" || !event || event.requestKind !== OperatingThreadRequestType.APPROVAL
|| event.requestId !== values.request) {
console.log(JSON.stringify({ status: "needs_attention", reason: "approval_request_not_current" }));
return 2;
}
await client.controls.respond({ channelId: task.checkpoint().channelId, turnId: result.turnId,
response: { requestId: event.requestId, callId: event.requestCallId, requestType: event.requestType,
response: { requestId: event.requestId, callId: event.callId, requestKind: event.requestKind,
action: action === "approve" ? OperatingThreadResponseAction.APPROVE : OperatingThreadResponseAction.DENY },
idempotencyKey: values["decision-key"],
});
Expand Down Expand Up @@ -121,15 +121,15 @@ async function main() {
}
}
const receipts = result.status === "completed" ? result.receipts : [];
const actions = receipts.map(item => ({ id: item.id, ownerService: item.ownerService,
objectId: item.objectId, kind: item.kind, lifecycleState: item.lifecycleState,
evidenceRefs: item.evidenceRefs.map(ref => ({ resourceType: ref.resourceType, id: ref.id })) }));
const attention = receipts.some(item => ![ReceiptLifecycleState.SUCCEEDED, ReceiptLifecycleState.VERIFIED].includes(item.lifecycleState));
const actions = receipts.map(item => ({ id: item.id, ownerService: undefined,
objectId: undefined, kind: item.kind, lifecycleState: item.state,
evidenceRefs: item.evidence.map(ref => ({ resourceType: ref.kind, id: ref.id })) }));
const attention = receipts.some(item => ![ReceiptLifecycleState.SUCCEEDED, ReceiptLifecycleState.VERIFIED].includes(item.state));
console.log(JSON.stringify({ status: result.status, turnId: result.turnId,
reason: result.reason, body: result.status === "completed" && !structured ? result.body : undefined,
brief, receiptIds: receipts.map(item => item.id), actions,
actionStatus: !actions.length ? "not_reported" : attention ? "requires_attention" : "owner_reported_success",
requestId: result.event?.requestId, requestType: result.event?.requestType, errorCode: result.turn?.errorCode,
requestId: result.event?.requestId, requestKind: result.event?.requestKind, errorCode: result.turn?.terminalError?.code,
}));
return result.status === "completed" && !attention ? 0 : 2;
}
Expand Down
39 changes: 16 additions & 23 deletions python/deixic_examples/account_brief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
from pathlib import Path

from console.v1 import console_pb2 as pb
from deixic import protocol as pb
from deixic import Deixic, DeixicError

from .task_result import save
Expand Down Expand Up @@ -85,12 +85,7 @@ def main() -> int:
next_action=check.next_action,
requirements=[
dict(
service=item.service,
missing_requirements=list(item.missing_requirements),
reason_codes=[
reason.reason_code
for reason in item.missing_requirement_states
],
)
for item in check.capabilities
],
Expand Down Expand Up @@ -137,7 +132,7 @@ def persist(state):
if (
outcome.status != "waiting"
or event is None
or event.request_type != pb.OPERATING_THREAD_REQUEST_TYPE_APPROVAL
or event.request_kind != pb.REQUEST_KIND_APPROVAL
or event.request_id != args.request
):
print(
Expand All @@ -152,13 +147,13 @@ def persist(state):
client.controls.respond(
channel_id=task.checkpoint()["channelId"],
turn_id=outcome.turn_id,
response=pb.OperatingThreadResponse(
response=pb.RespondToRequestRequest(
request_id=event.request_id,
call_id=event.request_call_id,
request_type=event.request_type,
action=pb.OPERATING_THREAD_RESPONSE_ACTION_APPROVE
call_id=event.call_id,
request_kind=event.request_kind,
action=pb.RESPONSE_ACTION_APPROVE
if args.action == "approve"
else pb.OPERATING_THREAD_RESPONSE_ACTION_DENY,
else pb.RESPONSE_ACTION_DENY,
),
idempotency_key=args.decision_key,
)
Expand All @@ -179,7 +174,7 @@ def progress(event):
print(
json.dumps(
dict(
event_id=event.event_id,
id=event.id,
turn_id=event.turn_id,
kind=event.kind,
)
Expand Down Expand Up @@ -218,22 +213,20 @@ def progress(event):
actions = [
dict(
id=item.id,
owner_service=item.owner_service,
object_id=item.object_id,
kind=item.kind,
lifecycle_state=item.lifecycle_state,
lifecycle_state=item.state,
evidence_refs=[
dict(resource_type=ref.resource_type, id=ref.id)
for ref in item.evidence_refs
dict(resource_type=ref.kind, id=ref.id)
for ref in item.evidence
],
)
for item in outcome.receipts
]
attention = any(
item.lifecycle_state
item.state
not in (
pb.RECEIPT_LIFECYCLE_STATE_SUCCEEDED,
pb.RECEIPT_LIFECYCLE_STATE_VERIFIED,
pb.RECEIPT_STATE_SUCCEEDED,
pb.RECEIPT_STATE_VERIFIED,
)
for item in outcome.receipts
)
Expand All @@ -255,10 +248,10 @@ def progress(event):
request_id=outcome.event.request_id
if outcome.event
else None,
request_type=outcome.event.request_type
request_kind=outcome.event.request_kind
if outcome.event
else None,
error_code=outcome.turn.error_code
error_code=outcome.turn.terminal_error.code
if outcome.turn
else None,
)
Expand Down
Loading