@dsh-enhanced/assistant-actions 0.1.31 → 0.1.34
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.
- package/README.md +8 -2
- package/lib/broker-ledger.d.ts +1 -1
- package/lib/broker-ledger.d.ts.map +1 -1
- package/lib/broker-protocol.d.ts +10 -2
- package/lib/broker-protocol.d.ts.map +1 -1
- package/lib/broker-protocol.js +19 -4
- package/lib/broker-protocol.js.map +1 -1
- package/lib/broker-server.d.ts.map +1 -1
- package/lib/broker-server.js +9 -2
- package/lib/broker-server.js.map +1 -1
- package/lib/config.js +1 -1
- package/lib/config.js.map +1 -1
- package/lib/github.d.ts +2 -1
- package/lib/github.d.ts.map +1 -1
- package/lib/github.js +10 -1
- package/lib/github.js.map +1 -1
- package/lib/ledger.d.ts.map +1 -1
- package/lib/ledger.js +6 -4
- package/lib/ledger.js.map +1 -1
- package/lib/repository-event-observation.d.ts +42 -0
- package/lib/repository-event-observation.d.ts.map +1 -0
- package/lib/repository-event-observation.js +139 -0
- package/lib/repository-event-observation.js.map +1 -0
- package/lib/repository-readback.d.ts +16 -0
- package/lib/repository-readback.d.ts.map +1 -1
- package/lib/repository-readback.js +53 -0
- package/lib/repository-readback.js.map +1 -1
- package/lib/service.d.ts +14 -3
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +197 -23
- package/lib/service.js.map +1 -1
- package/lib/types.d.ts +2 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-readback.js","sourceRoot":"","sources":["../src/repository-readback.ts"],"names":[],"mappings":"AAcA,MAAM,aAAa,GAAG,EAAE,CAAA;AACxB,MAAM,cAAc,GAAG,EAAE,CAAA;AACzB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,cAAc,GAAG,yDAAyD,CAAA;AAChF,MAAM,GAAG,GA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
2
|
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
3
3
|
import { type KeyObject } from 'node:crypto';
|
|
4
4
|
import { Config } from './config.js';
|
|
5
|
-
import { type RepositoryReadback } from './repository-readback.js';
|
|
5
|
+
import { type RepositoryCommitReadback, type RepositoryReadback } from './repository-readback.js';
|
|
6
6
|
import { commitOnGitHub, createBranchOnGitHub, createCompensatingCommitOnGitHub, createPullRequestOnGitHub, inspectGitHub, readGitHubPreimage } from './github.js';
|
|
7
7
|
import { type GitHubBrokerClientOptions } from './broker-client.js';
|
|
8
8
|
import { type BrokerOperation, type BrokerRequestIntent, type BrokerServerResponse } from './broker-protocol.js';
|
|
9
9
|
import type { ActionResult, BranchRequest, CommitRequest, CompensationRecord, CompensationRequest, InspectRequest, PullRequestRequest, VerifiedDeliveryRequest } from './types.js';
|
|
10
|
+
import { type RepositoryEventObservationInput } from './repository-event-observation.js';
|
|
10
11
|
export { Config };
|
|
11
12
|
type ExternalDispatch = (options: GitHubBrokerClientOptions, intent: BrokerRequestIntent, signal?: AbortSignal) => Promise<BrokerServerResponse>;
|
|
12
13
|
type CompensationStatus = Readonly<{
|
|
@@ -52,6 +53,16 @@ export declare class AssistantActionsService extends Service {
|
|
|
52
53
|
projectedGrants: number;
|
|
53
54
|
supportedOperations: readonly BrokerOperation[] | readonly ("commit" | "branch" | "pull-request" | "inspect" | "compensate" | "verified-delivery" | "repository-readback")[];
|
|
54
55
|
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Host-only repository observation for EventTriggers. The caller receives
|
|
58
|
+
* no remote content: only a deterministic semantic fingerprint after every
|
|
59
|
+
* authority, lifecycle, receipt, and signed-response boundary has held.
|
|
60
|
+
*/
|
|
61
|
+
readRepositoryEventObservation: (raw: RepositoryEventObservationInput, signal: AbortSignal) => Promise<{
|
|
62
|
+
protocol: "assistant-actions/repository-event/v1";
|
|
63
|
+
fingerprint: string;
|
|
64
|
+
truthy: true;
|
|
65
|
+
}>;
|
|
55
66
|
prepareVerifiedDelivery: (agent: Agent | undefined, input: VerifiedDeliveryRequest) => {
|
|
56
67
|
result?: {
|
|
57
68
|
[x: string]: unknown;
|
|
@@ -65,9 +76,9 @@ export declare class AssistantActionsService extends Service {
|
|
|
65
76
|
contractId: string;
|
|
66
77
|
authorityId: string;
|
|
67
78
|
authorityDigest: string;
|
|
68
|
-
}, signal: AbortSignal) => Promise<RepositoryReadback & {
|
|
79
|
+
}, signal: AbortSignal) => Promise<(RepositoryReadback & {
|
|
69
80
|
ready: boolean;
|
|
70
|
-
}>;
|
|
81
|
+
}) | RepositoryCommitReadback>;
|
|
71
82
|
run: (agent: Agent | undefined, input: CommitRequest, signal: AbortSignal) => Promise<ActionResult>;
|
|
72
83
|
runCompensation: (agent: Agent | undefined, input: CompensationRequest, signal: AbortSignal) => Promise<CompensationStatus>;
|
|
73
84
|
compensationStatus: (agent: Agent | undefined, input: {
|
package/lib/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAQnD,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvG,OAAO,EAAE,MAAM,EAAkG,MAAM,aAAa,CAAA;AAEpI,OAAO,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAQnD,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvG,OAAO,EAAE,MAAM,EAAkG,MAAM,aAAa,CAAA;AAEpI,OAAO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odSync, closeSync, constants, fstatSync, lstatSync, mkdirSync, openS
|
|
|
6
6
|
import { dirname, join } from 'node:path';
|
|
7
7
|
import { Config, commitBytes, normalizeCommit, normalizeCompensation, normalizeVerifiedDelivery, validateConfig } from './config.js';
|
|
8
8
|
import { VerifiedDeliveryRuntime } from './verified-delivery.js';
|
|
9
|
-
import { normalizeRepositoryReadback, validateRepositoryReadbackRequirements } from './repository-readback.js';
|
|
9
|
+
import { normalizeRepositoryCommitReadback, normalizeRepositoryReadback, validateRepositoryReadbackRequirements } from './repository-readback.js';
|
|
10
10
|
import { ActionLedger, normalizeWorkflow } from './ledger.js';
|
|
11
11
|
import { commitOnGitHub, createBranchOnGitHub, createCompensatingCommitOnGitHub, createPullRequestOnGitHub, inspectGitHub, readGitHubPreimage } from './github.js';
|
|
12
12
|
import { BrokerClientError, requestGitHubBroker } from './broker-client.js';
|
|
13
13
|
import { brokerDigest, canonicalBrokerJson } from './broker-protocol.js';
|
|
14
14
|
import { captureExternalDeliveryReceipt, verifyExternalDeliveryReceipt } from './external-delivery-receipt.js';
|
|
15
|
+
import { normalizeRepositoryEventObservationInput, repositoryEventBranchHead, repositoryEventCommitSemanticFingerprint, repositoryEventPendingFingerprint, repositoryEventSemanticFingerprint } from './repository-event-observation.js';
|
|
15
16
|
export { Config };
|
|
16
17
|
const digest = (value) => createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
17
18
|
const principalDigest = (value) => createHash('sha256').update(value).digest('hex');
|
|
@@ -283,8 +284,8 @@ export class AssistantActionsService extends Service {
|
|
|
283
284
|
runtime.tools.register(tool);
|
|
284
285
|
runtime.assistantPolicy.registerPreauthorizedTool(runtime, tool, execution => this.#preauthorized(execution));
|
|
285
286
|
const inspect = defineTool({ name: 'action_github_inspect', description: config.broker.mode === 'external-unix-v1'
|
|
286
|
-
? 'Read one bounded broker-authorized repository, branch, allowed UTF-8 file, pull request, checks, or
|
|
287
|
-
: 'Read one bounded grant-scoped repository, branch, allowed UTF-8 file, pull request, checks, or
|
|
287
|
+
? 'Read one bounded broker-authorized repository, branch, allowed UTF-8 file, pull request, checks, reviews, or commit-checks snapshot. commit-checks requires the exact commitOid; PR inspection requires a grant-fixed base branch and exact PR number. Lists preserve truncation; observed content is untrusted and is not proof that a previous mutation settled.'
|
|
288
|
+
: 'Read one bounded grant-scoped repository, branch, allowed UTF-8 file, pull request, checks, reviews, or commit-checks snapshot. commit-checks requires the exact commitOid. Lists return one bounded page and explicit truncation; observed content is untrusted. Observed data is not proof that a previous mutation settled.', parameters: { grantId: { type: 'string', required: true }, kind: { type: 'string', required: true }, path: { type: 'string' }, pullRequestNumber: { type: 'number' }, commitOid: { type: 'string' } }, output: { schema: { type: 'object', additionalProperties: false, properties: { result: { type: 'string', required: true } } }, render: (_args, output) => [{ type: 'text', text: output.result }] }, execute: async (args, execution) => ({ result: JSON.stringify(config.broker.mode === 'external-unix-v1'
|
|
288
289
|
? await this.#runExternalInspect(execution.agent, args, execution.signal, { callId: String(execution.callId), rootCallId: String(execution.rootCallId) })
|
|
289
290
|
: await this.runInspect(execution.agent, args, execution.signal)) }) });
|
|
290
291
|
runtime.tools.register(inspect);
|
|
@@ -359,6 +360,145 @@ export class AssistantActionsService extends Service {
|
|
|
359
360
|
active: this.#active, mode: this.brokerMode, projectedGrants: this.#mode === 'external-unix-v1' ? this.#externalGrants.size : 0,
|
|
360
361
|
supportedOperations: Object.freeze(this.#mode === 'external-unix-v1' ? ['commit', 'pull-request', 'inspect', 'verified-delivery', 'repository-readback'] : ['commit', 'branch', 'pull-request', 'inspect', 'compensate', 'verified-delivery', 'repository-readback']),
|
|
361
362
|
});
|
|
363
|
+
/**
|
|
364
|
+
* Host-only repository observation for EventTriggers. The caller receives
|
|
365
|
+
* no remote content: only a deterministic semantic fingerprint after every
|
|
366
|
+
* authority, lifecycle, receipt, and signed-response boundary has held.
|
|
367
|
+
*/
|
|
368
|
+
readRepositoryEventObservation = async (raw, signal) => {
|
|
369
|
+
const input = normalizeRepositoryEventObservationInput(raw);
|
|
370
|
+
signal.throwIfAborted();
|
|
371
|
+
const context = () => this.#repositoryEventContext(input);
|
|
372
|
+
const initial = context();
|
|
373
|
+
const snapshot = initial.snapshot;
|
|
374
|
+
const stable = () => {
|
|
375
|
+
const current = context();
|
|
376
|
+
if (current.snapshot !== snapshot)
|
|
377
|
+
throw new Error('assistant-actions: repository event authority changed');
|
|
378
|
+
return current;
|
|
379
|
+
};
|
|
380
|
+
const invocation = { rootCallId: `repository-event:${randomUUID()}`, callId: `repository-event:${randomUUID()}` };
|
|
381
|
+
const inspect = async (kind, pullRequestNumber, commitOid) => {
|
|
382
|
+
const current = stable();
|
|
383
|
+
const response = await this.#externalRequest(undefined, current.grant, current.grant.owner, 'inspect', {
|
|
384
|
+
kind, ...(pullRequestNumber === undefined ? {} : { pullRequestNumber }), ...(commitOid === undefined ? {} : { commitOid }),
|
|
385
|
+
}, signal, { rootCallId: invocation.rootCallId, callId: `${invocation.callId}:${kind}` }, `${invocation.callId}:${kind}:${randomUUID()}`, current.authorization);
|
|
386
|
+
if (response.result.status !== 'succeeded' || response.observed === undefined || response.generation === undefined || response.epochs === undefined)
|
|
387
|
+
throw new Error('assistant-actions: repository event inspection unavailable');
|
|
388
|
+
stable();
|
|
389
|
+
return { observed: response.observed, generation: response.generation, epochs: response.epochs };
|
|
390
|
+
};
|
|
391
|
+
// This is deliberately first even before any source is goal-bound: an
|
|
392
|
+
// external source must establish a real branch baseline, never a synthetic
|
|
393
|
+
// "no goal" marker.
|
|
394
|
+
const branch = await inspect('branch');
|
|
395
|
+
const headOid = repositoryEventBranchHead(branch.observed, input.branch);
|
|
396
|
+
if (!headOid)
|
|
397
|
+
throw new Error('assistant-actions: repository event branch observation malformed');
|
|
398
|
+
if (!input.goal)
|
|
399
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1', fingerprint: repositoryEventPendingFingerprint(input, headOid), truthy: true });
|
|
400
|
+
const settled = initial.delivery;
|
|
401
|
+
if (!settled)
|
|
402
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1', fingerprint: repositoryEventPendingFingerprint(input, headOid), truthy: true });
|
|
403
|
+
const { outcome, intent } = settled;
|
|
404
|
+
// Reverify the signed historical receipts and accepted artifacts before
|
|
405
|
+
// using the delivery-selected PR number. Caller-supplied PR numbers never
|
|
406
|
+
// cross this boundary.
|
|
407
|
+
this.#verifyExternalDelivery(intent, outcome);
|
|
408
|
+
if (input.deliveryMode === 'commit') {
|
|
409
|
+
const commitOid = outcome.commit.commitOid;
|
|
410
|
+
if (intent.request.pullRequest || !commitOid || headOid !== commitOid)
|
|
411
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1', fingerprint: repositoryEventPendingFingerprint(input, headOid), truthy: true });
|
|
412
|
+
const checks = await inspect('commit-checks', undefined, commitOid);
|
|
413
|
+
if (checks.generation !== branch.generation || checks.epochs !== branch.epochs)
|
|
414
|
+
throw new Error('assistant-actions: repository event broker generation changed');
|
|
415
|
+
stable();
|
|
416
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1', fingerprint: repositoryEventCommitSemanticFingerprint(input, headOid, checks.observed), truthy: true });
|
|
417
|
+
}
|
|
418
|
+
const pullRequestNumber = outcome.pullRequest?.pullRequestNumber;
|
|
419
|
+
const commitOid = outcome.commit.commitOid;
|
|
420
|
+
if (!Number.isSafeInteger(pullRequestNumber) || !commitOid || headOid !== commitOid)
|
|
421
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1', fingerprint: repositoryEventPendingFingerprint(input, headOid), truthy: true });
|
|
422
|
+
const verifiedPullRequestNumber = pullRequestNumber;
|
|
423
|
+
const pullRequest = await inspect('pull-request', verifiedPullRequestNumber);
|
|
424
|
+
const checks = await inspect('checks', verifiedPullRequestNumber);
|
|
425
|
+
const reviews = await inspect('reviews', verifiedPullRequestNumber);
|
|
426
|
+
if ([pullRequest, checks, reviews].some(value => value.generation !== branch.generation || value.epochs !== branch.epochs))
|
|
427
|
+
throw new Error('assistant-actions: repository event broker generation changed');
|
|
428
|
+
stable();
|
|
429
|
+
return Object.freeze({ protocol: 'assistant-actions/repository-event/v1',
|
|
430
|
+
fingerprint: repositoryEventSemanticFingerprint(input, headOid, verifiedPullRequestNumber, pullRequest.observed, checks.observed, reviews.observed), truthy: true });
|
|
431
|
+
};
|
|
432
|
+
#repositoryEventContext(input) {
|
|
433
|
+
if (this.#mode !== 'external-unix-v1' || !this.#active)
|
|
434
|
+
throw new Error('assistant-actions: repository event broker unavailable');
|
|
435
|
+
const grant = this.#externalGrants.get(input.grantId);
|
|
436
|
+
if (!grant || grant.revision !== input.grantRevision || grant.grantDigest !== input.grantDigest || grant.expiresAt <= Date.now()
|
|
437
|
+
|| grant.destination.repository !== input.repository || grant.destination.branch !== input.branch || grant.destination.baseBranch !== input.baseBranch
|
|
438
|
+
|| !grant.allowedOperations.includes('inspect') || (input.deliveryMode === 'commit'
|
|
439
|
+
? grant.allowedOperations.includes('pull-request') || !['branch', 'commit-checks'].every(kind => grant.allowedInspectKinds.includes(kind))
|
|
440
|
+
: !['branch', 'pull-request', 'checks', 'reviews'].every(kind => grant.allowedInspectKinds.includes(kind)))
|
|
441
|
+
|| grant.owner.principalDigest !== principalDigest(input.owner.principalId) || grant.owner.principalRecordId !== input.owner.principalRecordId
|
|
442
|
+
|| grant.owner.principalVersion !== input.owner.principalVersion || grant.owner.workspace !== input.owner.workspace || grant.owner.preset !== input.owner.preset
|
|
443
|
+
|| grant.expiresAt !== input.owner.expiresAt || grant.verifiedDelivery?.ownerRouteId !== input.owner.ownerRouteId)
|
|
444
|
+
throw new Error('assistant-actions: repository event grant changed');
|
|
445
|
+
const delivery = this.ctx.get('assistantDelivery');
|
|
446
|
+
if (!delivery)
|
|
447
|
+
throw new Error('assistant-actions: repository event delivery unavailable');
|
|
448
|
+
const route = delivery.validateOwnerRoute({ authorityId: input.owner.ownerRouteId, principalId: input.owner.principalId, workspace: input.owner.workspace, agentPreset: input.owner.preset });
|
|
449
|
+
const resolved = delivery.resolveOwnerRoute(input.owner.ownerRouteId);
|
|
450
|
+
if (!route || route.principalRecordId !== input.owner.principalRecordId || route.principalVersion !== input.owner.principalVersion
|
|
451
|
+
|| route.bindingVersion !== grant.owner.bindingVersion || route.generation !== grant.owner.bindingGeneration
|
|
452
|
+
|| grant.owner.bindingId !== resolved?.binding.id || resolved.binding.sessionId !== grant.sessionId)
|
|
453
|
+
throw new Error('assistant-actions: repository event owner changed');
|
|
454
|
+
const policy = this.ctx.get('assistantPolicy');
|
|
455
|
+
if (!policy)
|
|
456
|
+
throw new Error('assistant-actions: repository event policy unavailable');
|
|
457
|
+
const eventPolicy = () => policy.evaluate({ subject: { kind: 'background', id: `event-triggers:${input.triggerId}`, workspace: input.owner.workspace, principal: input.owner.principalId },
|
|
458
|
+
action: 'observe', resource: { kind: 'network', id: `https://api.github.com/repos/${input.repository}` }, context: { initiator: 'background' } }).effect === 'allow';
|
|
459
|
+
const actionPolicy = () => policy.evaluate({ subject: { kind: 'background', id: 'dsh-enhanced-assistant-actions', workspace: input.owner.workspace, principal: input.owner.principalId },
|
|
460
|
+
action: 'execute', resource: { kind: 'tool', id: `action:github:${grant.id}` }, context: { initiator: 'background' } }).effect === 'allow';
|
|
461
|
+
if (!eventPolicy() || !actionPolicy())
|
|
462
|
+
throw new Error('assistant-actions: repository event policy denied');
|
|
463
|
+
let selected;
|
|
464
|
+
if (input.goal) {
|
|
465
|
+
const goals = this.ctx.get('assistantGoals');
|
|
466
|
+
const lifecycle = goals?.inspectGoalLifecycle?.({ scope: { principalId: input.owner.principalId, principalRecordId: input.owner.principalRecordId, principalVersion: input.owner.principalVersion, workspace: input.owner.workspace, preset: input.owner.preset }, goalId: input.goal.id });
|
|
467
|
+
if (!lifecycle || lifecycle.definition.version !== input.goal.definitionVersion || lifecycle.definition.digest !== input.goal.definitionDigest
|
|
468
|
+
|| lifecycle.native.sessionId !== input.goal.sessionId || lifecycle.native.goalId !== input.goal.nativeGoalId || ['complete', 'cleared'].includes(lifecycle.native.phase)
|
|
469
|
+
|| grant.sessionId !== input.goal.sessionId || !this.#verified)
|
|
470
|
+
throw new Error('assistant-actions: repository event goal changed');
|
|
471
|
+
const latest = this.#verified.latestForGoal(input.goal, grant.id, { principalRecordId: input.owner.principalRecordId, principalVersion: input.owner.principalVersion }, { workspace: input.owner.workspace, preset: input.owner.preset });
|
|
472
|
+
if (latest?.state === 'succeeded' && latest.outcome?.commit.status === 'succeeded' && (input.deliveryMode === 'commit' ? !latest.intent.request.pullRequest && !latest.outcome.pullRequest : latest.outcome.pullRequest?.status === 'succeeded'))
|
|
473
|
+
selected = { intent: latest.intent, outcome: latest.outcome };
|
|
474
|
+
}
|
|
475
|
+
const snapshot = digest({ grant: { id: grant.id, revision: grant.revision, digest: grant.grantDigest, expiresAt: grant.expiresAt, owner: grant.owner, destination: grant.destination }, route,
|
|
476
|
+
goal: input.goal, delivery: selected && { id: selected.intent.id, security: selected.intent.security, outcome: selected.outcome } });
|
|
477
|
+
const authorization = {
|
|
478
|
+
sessionId: input.goal?.sessionId ?? grant.sessionId, agentId: `event-triggers:${input.triggerId}`,
|
|
479
|
+
current: () => { if (this.#repositoryEventContext(input).snapshot !== snapshot)
|
|
480
|
+
throw new Error('assistant-actions: repository event authority changed'); },
|
|
481
|
+
// Do not retain a Policy proxy across an await; provider replacement is
|
|
482
|
+
// an authorization boundary, so resolve and validate the complete live
|
|
483
|
+
// capability again at the broker dispatch gate.
|
|
484
|
+
authorize: (actionId) => {
|
|
485
|
+
try {
|
|
486
|
+
const current = this.#repositoryEventContext(input);
|
|
487
|
+
if (current.snapshot !== snapshot)
|
|
488
|
+
return false;
|
|
489
|
+
const livePolicy = this.ctx.get('assistantPolicy');
|
|
490
|
+
if (!livePolicy)
|
|
491
|
+
return false;
|
|
492
|
+
return livePolicy.authorize({ subject: { kind: 'background', id: 'dsh-enhanced-assistant-actions', workspace: input.owner.workspace, principal: input.owner.principalId },
|
|
493
|
+
action: 'execute', resource: { kind: 'tool', id: `action:github:${grant.id}` }, context: { initiator: 'background' } }, { idempotencyKey: `external-action:${actionId}` }).effect === 'allow';
|
|
494
|
+
}
|
|
495
|
+
catch {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
};
|
|
500
|
+
return { grant, authorization, snapshot, ...(selected === undefined ? {} : { delivery: selected }) };
|
|
501
|
+
}
|
|
362
502
|
#external() {
|
|
363
503
|
if (!this.#active || !this.#externalClient)
|
|
364
504
|
throw new Error('assistant-actions: external broker unavailable');
|
|
@@ -434,7 +574,7 @@ export class AssistantActionsService extends Service {
|
|
|
434
574
|
...(response.result?.operation === 'commit' ? { commitOid: response.result.commitOid, branch: response.result.branch } : {}),
|
|
435
575
|
...(response.result?.operation === 'pull-request' ? { pullRequestNumber: response.result.pullRequestNumber, branch: response.result.branch } : {}),
|
|
436
576
|
...(response.error ? { reason: `external-broker-${response.error.code}` } : {}) };
|
|
437
|
-
return { result, generation: response.generation, ...(signed ? { receipt: captureExternalDeliveryReceipt(signed.hello, signed.request, response) } : {}), ...(response.status === 'succeeded' && response.result?.operation === 'inspect' ? { observed: structuredClone(response.result.observed) } : {}) };
|
|
577
|
+
return { result, generation: response.generation, ...(signed && Number.isSafeInteger(signed.hello.policyEpoch) && Number.isSafeInteger(signed.hello.emergencyEpoch) ? { epochs: brokerDigest([signed.hello.policyEpoch, signed.hello.emergencyEpoch]) } : {}), ...(signed ? { receipt: captureExternalDeliveryReceipt(signed.hello, signed.request, response) } : {}), ...(response.status === 'succeeded' && response.result?.operation === 'inspect' ? { observed: structuredClone(response.result.observed) } : {}) };
|
|
438
578
|
}
|
|
439
579
|
catch (error) {
|
|
440
580
|
if (error instanceof BrokerClientError)
|
|
@@ -459,7 +599,7 @@ export class AssistantActionsService extends Service {
|
|
|
459
599
|
const { grant, owner, identity } = this.#externalContext(agent, request.grantId);
|
|
460
600
|
if (!this.#allowsExternal(grant, identity, input))
|
|
461
601
|
throw new Error('assistant-actions: request not granted');
|
|
462
|
-
const payload = { kind: request.kind, ...(request.path === undefined ? {} : { path: request.path }), ...(request.pullRequestNumber === undefined ? {} : { pullRequestNumber: request.pullRequestNumber }) };
|
|
602
|
+
const payload = { kind: request.kind, ...(request.path === undefined ? {} : { path: request.path }), ...(request.pullRequestNumber === undefined ? {} : { pullRequestNumber: request.pullRequestNumber }), ...(request.commitOid === undefined ? {} : { commitOid: request.commitOid }) };
|
|
463
603
|
const { result, observed } = await this.#externalRequest(agent, grant, owner, 'inspect', payload, signal, invocation, request.idempotencyKey);
|
|
464
604
|
return { result, ...(observed === undefined ? {} : { observed }) };
|
|
465
605
|
}
|
|
@@ -574,18 +714,33 @@ export class AssistantActionsService extends Service {
|
|
|
574
714
|
throw new Error('assistant-actions: repository readback bounds invalid');
|
|
575
715
|
const observedAt = Date.now();
|
|
576
716
|
const deadline = AbortSignal.any([signal, AbortSignal.timeout(initial.authority.timeoutMs)]);
|
|
717
|
+
if (initial.authority.kind === 'repository-commit-readback') {
|
|
718
|
+
// Check the receipt's immutable commit first, then fence a moving branch
|
|
719
|
+
// with the final remote read before issuing an affirmative outcome.
|
|
720
|
+
const [checks, branchSnapshot] = [
|
|
721
|
+
await this.#readRepositoryInspection(context, 'commit-checks', undefined, initial.commitOid, deadline),
|
|
722
|
+
await this.#readRepositoryInspection(context, 'branch', undefined, undefined, deadline),
|
|
723
|
+
];
|
|
724
|
+
const final = context();
|
|
725
|
+
if (digest(initial) !== digest(final) || Date.now() - observedAt > final.authority.freshnessMs)
|
|
726
|
+
throw new Error('assistant-actions: repository readback authority changed');
|
|
727
|
+
return normalizeRepositoryCommitReadback({ repository: final.authority.repository, branch: final.authority.branch, commitOid: final.commitOid,
|
|
728
|
+
requirements: final.requirements, checks, branchSnapshot });
|
|
729
|
+
}
|
|
577
730
|
const pullRequestNumber = initial.pullRequestNumber;
|
|
731
|
+
if (pullRequestNumber === undefined)
|
|
732
|
+
throw new Error('assistant-actions: repository delivery receipt invalid');
|
|
578
733
|
const [checks, reviews, pullRequest, branchSnapshot] = [
|
|
579
|
-
await this.#readRepositoryInspection(context, 'checks', pullRequestNumber, deadline),
|
|
580
|
-
await this.#readRepositoryInspection(context, 'reviews', pullRequestNumber, deadline),
|
|
581
|
-
await this.#readRepositoryInspection(context, 'pull-request', pullRequestNumber, deadline),
|
|
582
|
-
await this.#readRepositoryInspection(context, 'branch', undefined, deadline),
|
|
734
|
+
await this.#readRepositoryInspection(context, 'checks', pullRequestNumber, undefined, deadline),
|
|
735
|
+
await this.#readRepositoryInspection(context, 'reviews', pullRequestNumber, undefined, deadline),
|
|
736
|
+
await this.#readRepositoryInspection(context, 'pull-request', pullRequestNumber, undefined, deadline),
|
|
737
|
+
await this.#readRepositoryInspection(context, 'branch', undefined, undefined, deadline),
|
|
583
738
|
];
|
|
584
739
|
const final = context();
|
|
585
740
|
if (digest(initial) !== digest(final) || Date.now() - observedAt > final.authority.freshnessMs)
|
|
586
741
|
throw new Error('assistant-actions: repository readback authority changed');
|
|
587
742
|
const normalized = normalizeRepositoryReadback({ repository: final.authority.repository, branch: final.authority.branch, baseBranch: final.authority.baseBranch,
|
|
588
|
-
commitOid: final.commitOid, pullRequestNumber
|
|
743
|
+
commitOid: final.commitOid, pullRequestNumber, requirements: final.requirements, checks, reviews, pullRequest, branchSnapshot });
|
|
589
744
|
const headConfirmed = normalized.headOid === final.commitOid;
|
|
590
745
|
const ci = !headConfirmed ? 'unknown' : normalized.ci;
|
|
591
746
|
const review = !headConfirmed ? 'unknown' : normalized.review;
|
|
@@ -593,7 +748,7 @@ export class AssistantActionsService extends Service {
|
|
|
593
748
|
ready: ci === 'passed' && review === 'approved' && (normalized.pullRequest === 'open' || normalized.pullRequest === 'merged') });
|
|
594
749
|
};
|
|
595
750
|
#repositoryReadbackContext(contract, authority) {
|
|
596
|
-
if (!this.#active || !this.#verified || contract.expiresAt <= Date.now() || contract.task.kind !== 'goal-outcome' ||
|
|
751
|
+
if (!this.#active || !this.#verified || contract.expiresAt <= Date.now() || contract.task.kind !== 'goal-outcome' || !['repository-readback', 'repository-commit-readback'].includes(authority.kind))
|
|
597
752
|
throw new Error('assistant-actions: repository readback binding invalid');
|
|
598
753
|
const goal = contract.task.goal;
|
|
599
754
|
const latest = this.#verified.latestForGoal({ id: goal.id, sessionId: goal.sessionId, nativeGoalId: goal.nativeGoalId, definitionVersion: goal.definitionVersion, definitionDigest: goal.definitionDigest }, authority.grantId, contract.owner, contract.scope);
|
|
@@ -609,6 +764,17 @@ export class AssistantActionsService extends Service {
|
|
|
609
764
|
throw new Error('assistant-actions: repository grant changed');
|
|
610
765
|
const outcome = latest.outcome;
|
|
611
766
|
const commitOid = outcome.commit.commitOid, pullRequestOutcome = outcome.pullRequest, pullRequestNumber = pullRequestOutcome?.pullRequestNumber;
|
|
767
|
+
const direct = authority.kind === 'repository-commit-readback';
|
|
768
|
+
if (direct && latest.intent.request.pullRequest)
|
|
769
|
+
throw new Error('assistant-actions: repository direct delivery unexpectedly opened a pull request');
|
|
770
|
+
if (!direct && !latest.intent.request.pullRequest)
|
|
771
|
+
throw new Error('assistant-actions: repository pull request delivery missing');
|
|
772
|
+
if (direct && this.#mode === 'external-unix-v1') {
|
|
773
|
+
const external = this.#externalGrants.get(authority.grantId);
|
|
774
|
+
if (!external || external.allowedOperations.includes('pull-request') || !external.allowedOperations.includes('inspect')
|
|
775
|
+
|| !external.allowedInspectKinds.includes('branch') || !external.allowedInspectKinds.includes('commit-checks'))
|
|
776
|
+
throw new Error('assistant-actions: repository direct grant changed');
|
|
777
|
+
}
|
|
612
778
|
if (this.#mode === 'external-unix-v1')
|
|
613
779
|
this.#verifyExternalDelivery(latest.intent, outcome);
|
|
614
780
|
else {
|
|
@@ -616,11 +782,11 @@ export class AssistantActionsService extends Service {
|
|
|
616
782
|
const pullRequest = pullRequestOutcome && this.#ledger.get(pullRequestOutcome.actionId);
|
|
617
783
|
if (outcome.commit.status !== 'succeeded' || !commitOid || !commit || commit.kind !== 'commit' || commit.status !== 'succeeded' || digest(commit.result) !== digest(outcome.commit)
|
|
618
784
|
|| commit.grantId !== grant.id || commit.grantRevision !== grant.revision || commit.sessionId !== security.sessionId || digest(commit.identity) !== digest(security.identity)
|
|
619
|
-
|| !pullRequestOutcome || pullRequestOutcome.status !== 'succeeded' || !pullRequestNumber || !pullRequest || pullRequest.kind !== 'pull-request' || pullRequest.status !== 'succeeded' || digest(pullRequest.result) !== digest(pullRequestOutcome)
|
|
620
|
-
|
|
785
|
+
|| !direct && (!pullRequestOutcome || pullRequestOutcome.status !== 'succeeded' || !pullRequestNumber || !pullRequest || pullRequest.kind !== 'pull-request' || pullRequest.status !== 'succeeded' || digest(pullRequest.result) !== digest(pullRequestOutcome)
|
|
786
|
+
|| pullRequest.grantId !== grant.id || pullRequest.grantRevision !== grant.revision || pullRequest.sessionId !== security.sessionId || digest(pullRequest.identity) !== digest(security.identity)))
|
|
621
787
|
throw new Error('assistant-actions: repository delivery receipt invalid');
|
|
622
788
|
}
|
|
623
|
-
if (outcome.commit.status !== 'succeeded' || !commitOid || pullRequestOutcome?.status !== 'succeeded' || !pullRequestNumber)
|
|
789
|
+
if (outcome.commit.status !== 'succeeded' || !commitOid || !direct && (pullRequestOutcome?.status !== 'succeeded' || !pullRequestNumber))
|
|
624
790
|
throw new Error('assistant-actions: repository delivery receipt invalid');
|
|
625
791
|
this.#deliveryIdentity(security);
|
|
626
792
|
const goals = this.ctx.get('assistantGoals', false);
|
|
@@ -650,10 +816,10 @@ export class AssistantActionsService extends Service {
|
|
|
650
816
|
|| digest(sourceContract.scope) !== digest(contract.scope) || sourceReceipt.objectiveStatus !== 'achieved')
|
|
651
817
|
throw new Error('assistant-actions: repository source acceptance changed');
|
|
652
818
|
const evidenceDigest = digest({ source, assessment, assessmentRun, acceptedSource });
|
|
653
|
-
return Object.freeze({ authority: Object.freeze({ grantId: authority.grantId, grantRevision: authority.grantRevision, repository: authority.repository, branch: authority.branch, baseBranch: authority.baseBranch, timeoutMs: authority.timeoutMs, freshnessMs: authority.freshnessMs }),
|
|
654
|
-
evidenceDigest, requirements: validateRepositoryReadbackRequirements({ requiredChecks: authority.requiredChecks, reviewerIds: authority.reviewerIds, minApprovals: authority.minApprovals }), security, intent: latest.intent, commitOid, pullRequestNumber });
|
|
819
|
+
return Object.freeze({ authority: Object.freeze({ kind: authority.kind, grantId: authority.grantId, grantRevision: authority.grantRevision, repository: authority.repository, branch: authority.branch, baseBranch: authority.baseBranch, timeoutMs: authority.timeoutMs, freshnessMs: authority.freshnessMs }),
|
|
820
|
+
evidenceDigest, requirements: validateRepositoryReadbackRequirements({ requiredChecks: authority.requiredChecks, reviewerIds: direct ? [] : authority.reviewerIds, minApprovals: direct ? 0 : authority.minApprovals }), security, intent: latest.intent, commitOid, ...(direct ? {} : { pullRequestNumber: pullRequestNumber }) });
|
|
655
821
|
}
|
|
656
|
-
async #readRepositoryInspection(context, kind, pullRequestNumber, signal) {
|
|
822
|
+
async #readRepositoryInspection(context, kind, pullRequestNumber, commitOid, signal) {
|
|
657
823
|
let observed;
|
|
658
824
|
const start = context();
|
|
659
825
|
if (this.#mode === 'external-unix-v1') {
|
|
@@ -665,13 +831,13 @@ export class AssistantActionsService extends Service {
|
|
|
665
831
|
authorization.current = () => { current(); if (digest(context()) !== digest(start))
|
|
666
832
|
throw new Error('assistant-actions: repository readback changed'); };
|
|
667
833
|
const generation = this.#externalObservedGeneration, epochs = this.#externalObservedEpochs, callId = `readback:${randomUUID()}`;
|
|
668
|
-
const response = await this.#externalRequest(undefined, grant, grant.owner, 'inspect', { kind, ...(pullRequestNumber === undefined ? {} : { pullRequestNumber }) }, signal, { callId, rootCallId: start.intent.id }, callId, authorization);
|
|
834
|
+
const response = await this.#externalRequest(undefined, grant, grant.owner, 'inspect', { kind, ...(pullRequestNumber === undefined ? {} : { pullRequestNumber }), ...(commitOid === undefined ? {} : { commitOid }) }, signal, { callId, rootCallId: start.intent.id }, callId, authorization);
|
|
669
835
|
if (response.result.status !== 'succeeded' || response.observed === undefined || generation !== undefined && generation !== response.generation || epochs !== undefined && epochs !== this.#externalObservedEpochs)
|
|
670
836
|
throw new Error('assistant-actions: repository inspection unavailable or broker changed');
|
|
671
837
|
authorization.current();
|
|
672
838
|
return response.observed;
|
|
673
839
|
}
|
|
674
|
-
const request = normalizeWorkflow({ grantId: start.authority.grantId, operation: 'inspect', idempotencyKey: randomUUID(), kind, ...(pullRequestNumber === undefined ? {} : { pullRequestNumber }) });
|
|
840
|
+
const request = normalizeWorkflow({ grantId: start.authority.grantId, operation: 'inspect', idempotencyKey: randomUUID(), kind, ...(pullRequestNumber === undefined ? {} : { pullRequestNumber }), ...(commitOid === undefined ? {} : { commitOid }) });
|
|
675
841
|
if (!('operation' in request))
|
|
676
842
|
throw new Error('assistant-actions: repository inspection invalid');
|
|
677
843
|
const authorization = { sessionId: start.security.sessionId,
|
|
@@ -679,7 +845,7 @@ export class AssistantActionsService extends Service {
|
|
|
679
845
|
throw new Error('assistant-actions: repository readback changed'); return current.security.identity; },
|
|
680
846
|
authorize: record => this.ctx.get('assistantPolicy')?.authorize(this.#deliveryPolicy(start.security), { idempotencyKey: `action:${record.id}` }).effect === 'allow' };
|
|
681
847
|
const result = await this.#runAuthorized(authorization, request, signal, async (actionId, grant, token, combined) => {
|
|
682
|
-
const reply = await this.workflow.inspect({ grant, kind: request.kind, ...(request.pullRequestNumber === undefined ? {} : { pullRequestNumber: request.pullRequestNumber }), token, signal: combined });
|
|
848
|
+
const reply = await this.workflow.inspect({ grant, kind: request.kind, ...(request.pullRequestNumber === undefined ? {} : { pullRequestNumber: request.pullRequestNumber }), ...(request.commitOid === undefined ? {} : { commitOid: request.commitOid }), token, signal: combined });
|
|
683
849
|
observed = reply?.observed;
|
|
684
850
|
return reply ? { actionId, status: 'succeeded' } : { actionId, status: 'failed', reason: 'github-inspect-failed' };
|
|
685
851
|
});
|
|
@@ -843,16 +1009,24 @@ export class AssistantActionsService extends Service {
|
|
|
843
1009
|
this.#deliveryIdentity(intent.security);
|
|
844
1010
|
const grant = this.#externalGrants.get(intent.security.grantId), receipts = outcome.brokerReceipts;
|
|
845
1011
|
const snapshot = this.#inspectDelivery(intent, true);
|
|
846
|
-
if (!receipts?.commit || !
|
|
1012
|
+
if (!receipts?.commit || !snapshot || !outcome.commit.commitOid)
|
|
847
1013
|
throw new Error('assistant-actions: external delivery receipt unavailable');
|
|
848
1014
|
const destination = { classification: 'github-repository', repository: grant.destination.repository, branch: grant.destination.branch,
|
|
849
1015
|
...(grant.destination.baseBranch === undefined ? {} : { baseBranch: grant.destination.baseBranch }) };
|
|
850
1016
|
const common = { grantId: grant.id, grantRevision: grant.revision, grantDigest: grant.grantDigest, owner: grant.owner, sessionId: intent.security.sessionId, source: grant.source, destination };
|
|
851
1017
|
const commit = verifyExternalDeliveryReceipt(receipts.commit, { expectedHeadOid: intent.request.expectedHeadOid, headline: intent.request.headline,
|
|
852
1018
|
files: snapshot.files.map(file => ({ path: file.path, content: file.content })) }, { ...common, operation: 'commit', actionId: this.#externalActionId(grant, intent.security.sessionId, 'commit', `${intent.id}:commit`) }, this.#external());
|
|
1019
|
+
if (commit.result?.operation !== 'commit' || commit.actionId !== outcome.commit.actionId || commit.result.commitOid !== outcome.commit.commitOid)
|
|
1020
|
+
throw new Error('assistant-actions: external delivery receipt changed');
|
|
1021
|
+
if (!intent.request.pullRequest) {
|
|
1022
|
+
if (outcome.pullRequest || receipts.pullRequest)
|
|
1023
|
+
throw new Error('assistant-actions: external delivery receipt changed');
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
if (!receipts.pullRequest || !outcome.pullRequest)
|
|
1027
|
+
throw new Error('assistant-actions: external delivery receipt unavailable');
|
|
853
1028
|
const pr = verifyExternalDeliveryReceipt(receipts.pullRequest, { expectedHeadOid: outcome.commit.commitOid, ...intent.request.pullRequest }, { ...common, operation: 'pull-request', actionId: this.#externalActionId(grant, intent.security.sessionId, 'pull-request', `${intent.id}:pr`) }, this.#external());
|
|
854
|
-
if (
|
|
855
|
-
|| commit.result.commitOid !== outcome.commit.commitOid || pr.result.pullRequestNumber !== outcome.pullRequest.pullRequestNumber)
|
|
1029
|
+
if (pr.result?.operation !== 'pull-request' || pr.actionId !== outcome.pullRequest.actionId || pr.result.pullRequestNumber !== outcome.pullRequest.pullRequestNumber)
|
|
856
1030
|
throw new Error('assistant-actions: external delivery receipt changed');
|
|
857
1031
|
}
|
|
858
1032
|
async #deliverVerified(intent, snapshot, signal) {
|