@agenticprimitives/provenance 0.0.0-alpha.0 → 0.0.0-alpha.2
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/dist/endeavor.d.ts +96 -0
- package/dist/endeavor.d.ts.map +1 -0
- package/dist/endeavor.js +159 -0
- package/dist/endeavor.js.map +1 -0
- package/dist/firewall.d.ts +1 -1
- package/dist/firewall.d.ts.map +1 -1
- package/dist/harness.d.ts +124 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +163 -0
- package/dist/harness.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/public.d.ts +34 -0
- package/dist/public.d.ts.map +1 -0
- package/dist/public.js +67 -0
- package/dist/public.js.map +1 -0
- package/dist/serialize.d.ts +21 -0
- package/dist/serialize.d.ts.map +1 -0
- package/dist/serialize.js +211 -0
- package/dist/serialize.js.map +1 -0
- package/dist/types.d.ts +101 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { AgentClass, ProvenanceRecordV1 } from './types.js';
|
|
2
|
+
export interface EndeavorRequestInput {
|
|
3
|
+
requestId: string;
|
|
4
|
+
requester: string;
|
|
5
|
+
requesterClass?: AgentClass;
|
|
6
|
+
submittedAt: string;
|
|
7
|
+
/** home-request | discussion-ask | inbox-ask | a2a-intent — provenance of the door, never a model switch. */
|
|
8
|
+
entryPoint?: string;
|
|
9
|
+
/** Vault ref / hash of the intake body — never inline plaintext. */
|
|
10
|
+
ref?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EndeavorPlanRevisionInput {
|
|
13
|
+
planId: string;
|
|
14
|
+
revision: number;
|
|
15
|
+
contentHash: string;
|
|
16
|
+
proposedBy: string;
|
|
17
|
+
proposedByClass?: AgentClass;
|
|
18
|
+
proposedAt: string;
|
|
19
|
+
status: 'proposed' | 'adopted' | 'superseded' | 'rejected';
|
|
20
|
+
adoptedBy?: string;
|
|
21
|
+
adoptedAt?: string;
|
|
22
|
+
/** apcoord:PlanStep ids + kinds, projected as p-plan:Steps of this revision. */
|
|
23
|
+
steps: Array<{
|
|
24
|
+
stepId: string;
|
|
25
|
+
kind: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
export interface EndeavorStepExecutionInput {
|
|
29
|
+
activityId: string;
|
|
30
|
+
/** The DURABLE apcoord:PlanStep id (`p-plan:correspondsToStep`). */
|
|
31
|
+
stepId: string;
|
|
32
|
+
/** The EXACT adopted plan revision the execution ran under (`prov:hadPlan`). */
|
|
33
|
+
planId: string;
|
|
34
|
+
planRevision: number;
|
|
35
|
+
actor: string;
|
|
36
|
+
actorClass?: AgentClass;
|
|
37
|
+
/** The capacity the actor functioned in (`prov:hadRole`) — never a permission. */
|
|
38
|
+
role?: string;
|
|
39
|
+
startedAt: string;
|
|
40
|
+
endedAt?: string;
|
|
41
|
+
/** BY-HASH refs (delegation, entitlement, the CoordinationContextSnapshot) — `prov:used`. */
|
|
42
|
+
usedRefs?: string[];
|
|
43
|
+
/** PRIVATE — `prov:actedOnBehalfOf`. S1 firewall rejects it from any public row. */
|
|
44
|
+
onBehalfOf?: string;
|
|
45
|
+
/** Generated artifact refs (vault refs / hashes). The object form additionally carries
|
|
46
|
+
* `prov:wasDerivedFrom` entity ids — e.g. a spec-329 synthesis artifact derived from each
|
|
47
|
+
* member answer (spec 334 §4 door 2 re-expression of the consultation fan-out). */
|
|
48
|
+
artifactRefs?: Array<string | {
|
|
49
|
+
ref: string;
|
|
50
|
+
derivedFrom?: string[];
|
|
51
|
+
}>;
|
|
52
|
+
/** The RUN-SPECIFIC `apexec:ExecutionPlan` this step compiled into (ADR-0054 §3): emitted as an
|
|
53
|
+
* ExecutionPlan entity `prov:wasDerivedFrom` the adopted revision, and the step gains
|
|
54
|
+
* `ep-plan:isDecomposedAsPlan` → it. `ref` is the run plan's hash / vault ref. */
|
|
55
|
+
runPlan?: {
|
|
56
|
+
id: string;
|
|
57
|
+
ref?: string;
|
|
58
|
+
};
|
|
59
|
+
/** `ep-plan:FailedActivity` — the execution was interrupted; recorded, never dropped. */
|
|
60
|
+
failed?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface EndeavorAttestationInput {
|
|
63
|
+
id: string;
|
|
64
|
+
/** apatt: outcome / validation / evidence — projected as Attestation entities. */
|
|
65
|
+
kind: 'outcome' | 'validation' | 'evidence';
|
|
66
|
+
ref?: string;
|
|
67
|
+
/** Contributing artifact ENTITY ids (`prov:wasDerivedFrom`). */
|
|
68
|
+
derivedFrom?: string[];
|
|
69
|
+
}
|
|
70
|
+
/** Structural projection input for one Endeavor (never the coordination package's types — leaf boundary). */
|
|
71
|
+
export interface EndeavorProvenanceInput {
|
|
72
|
+
endeavorId: string;
|
|
73
|
+
managingPrincipal: string;
|
|
74
|
+
managingPrincipalClass?: AgentClass;
|
|
75
|
+
request?: EndeavorRequestInput;
|
|
76
|
+
adoption?: {
|
|
77
|
+
actor: string;
|
|
78
|
+
actorClass?: AgentClass;
|
|
79
|
+
at: string;
|
|
80
|
+
};
|
|
81
|
+
outcome?: {
|
|
82
|
+
specId: string;
|
|
83
|
+
ref?: string;
|
|
84
|
+
};
|
|
85
|
+
planRevisions: EndeavorPlanRevisionInput[];
|
|
86
|
+
executions: EndeavorStepExecutionInput[];
|
|
87
|
+
attestations?: EndeavorAttestationInput[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Project one Endeavor's whole coordination process into the private PROV-O / P-Plan A-box:
|
|
91
|
+
* who (agents), did what (activities), on what (`prov:used`, by hash), producing what
|
|
92
|
+
* (`prov:generated`), under WHICH plan step and revision (`p-plan:correspondsToStep` +
|
|
93
|
+
* `prov:hadPlan`) — the reconstructable trace ADR-0054 requires.
|
|
94
|
+
*/
|
|
95
|
+
export declare function projectEndeavorProvenance(input: EndeavorProvenanceInput): ProvenanceRec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CAAC;IACzC,YAAY,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAC3C;AAKD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,uBAAuB,GAAG,kBAAkB,CA2J5F"}
|
package/dist/endeavor.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
const planEntityId = (endeavorId, planId, revision) => `ent:${endeavorId}:plan:${planId}:rev:${revision}`;
|
|
2
|
+
/**
|
|
3
|
+
* Project one Endeavor's whole coordination process into the private PROV-O / P-Plan A-box:
|
|
4
|
+
* who (agents), did what (activities), on what (`prov:used`, by hash), producing what
|
|
5
|
+
* (`prov:generated`), under WHICH plan step and revision (`p-plan:correspondsToStep` +
|
|
6
|
+
* `prov:hadPlan`) — the reconstructable trace ADR-0054 requires.
|
|
7
|
+
*/
|
|
8
|
+
export function projectEndeavorProvenance(input) {
|
|
9
|
+
const agents = new Map();
|
|
10
|
+
const addAgent = (id, agentClass) => {
|
|
11
|
+
if (!agents.has(id.toLowerCase()))
|
|
12
|
+
agents.set(id.toLowerCase(), { id, agentClass: agentClass ?? 'service' });
|
|
13
|
+
};
|
|
14
|
+
addAgent(input.managingPrincipal, input.managingPrincipalClass);
|
|
15
|
+
const activities = [];
|
|
16
|
+
const entities = [];
|
|
17
|
+
const plans = [];
|
|
18
|
+
// Intake: the request entity, attributed to the requester.
|
|
19
|
+
const requestEntityId = input.request ? `ent:${input.endeavorId}:request:${input.request.requestId}` : undefined;
|
|
20
|
+
if (input.request && requestEntityId) {
|
|
21
|
+
addAgent(input.request.requester, input.request.requesterClass);
|
|
22
|
+
entities.push({ id: requestEntityId, type: 'EndeavorRequest', ref: input.request.ref });
|
|
23
|
+
}
|
|
24
|
+
// Adoption: the activity that used the request and generated the outcome specification.
|
|
25
|
+
const outcomeEntityId = input.outcome ? `ent:${input.endeavorId}:outcome:${input.outcome.specId}` : undefined;
|
|
26
|
+
if (input.adoption) {
|
|
27
|
+
addAgent(input.adoption.actor, input.adoption.actorClass);
|
|
28
|
+
activities.push({
|
|
29
|
+
id: `act:${input.endeavorId}:adoption`,
|
|
30
|
+
type: 'EndeavorAdoption',
|
|
31
|
+
tier: 'execution-orchestrated',
|
|
32
|
+
startedAt: input.adoption.at,
|
|
33
|
+
endedAt: input.adoption.at,
|
|
34
|
+
wasAssociatedWith: input.adoption.actor,
|
|
35
|
+
used: requestEntityId ? [requestEntityId] : [],
|
|
36
|
+
generated: outcomeEntityId ? [outcomeEntityId] : [],
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (input.outcome && outcomeEntityId) {
|
|
40
|
+
entities.push({
|
|
41
|
+
id: outcomeEntityId,
|
|
42
|
+
type: 'OutcomeSpecification',
|
|
43
|
+
wasGeneratedBy: input.adoption ? `act:${input.endeavorId}:adoption` : undefined,
|
|
44
|
+
ref: input.outcome.ref,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Plan revisions: entities chained by prov:wasRevisionOf, each with its proposal (and adoption) activity,
|
|
48
|
+
// plus the P-Plan projection of the ADOPTED revision's steps.
|
|
49
|
+
const sorted = [...input.planRevisions].sort((a, b) => a.revision - b.revision);
|
|
50
|
+
let priorRevisionEntity;
|
|
51
|
+
for (const rev of sorted) {
|
|
52
|
+
const entityId = planEntityId(input.endeavorId, rev.planId, rev.revision);
|
|
53
|
+
const proposalActivityId = `act:${input.endeavorId}:plan:${rev.planId}:rev:${rev.revision}:proposed`;
|
|
54
|
+
addAgent(rev.proposedBy, rev.proposedByClass);
|
|
55
|
+
activities.push({
|
|
56
|
+
id: proposalActivityId,
|
|
57
|
+
type: 'PlanProposal',
|
|
58
|
+
tier: 'execution-orchestrated',
|
|
59
|
+
startedAt: rev.proposedAt,
|
|
60
|
+
endedAt: rev.proposedAt,
|
|
61
|
+
wasAssociatedWith: rev.proposedBy,
|
|
62
|
+
used: priorRevisionEntity ? [priorRevisionEntity] : [],
|
|
63
|
+
generated: [entityId],
|
|
64
|
+
});
|
|
65
|
+
entities.push({
|
|
66
|
+
id: entityId,
|
|
67
|
+
type: 'PlanRevision',
|
|
68
|
+
wasGeneratedBy: proposalActivityId,
|
|
69
|
+
ref: rev.contentHash,
|
|
70
|
+
wasRevisionOf: priorRevisionEntity,
|
|
71
|
+
});
|
|
72
|
+
if (rev.status === 'adopted' || rev.status === 'superseded') {
|
|
73
|
+
const adopter = rev.adoptedBy ?? input.managingPrincipal;
|
|
74
|
+
addAgent(adopter);
|
|
75
|
+
activities.push({
|
|
76
|
+
id: `act:${input.endeavorId}:plan:${rev.planId}:rev:${rev.revision}:adopted`,
|
|
77
|
+
type: 'PlanAdoption',
|
|
78
|
+
tier: 'execution-orchestrated',
|
|
79
|
+
startedAt: rev.adoptedAt ?? rev.proposedAt,
|
|
80
|
+
endedAt: rev.adoptedAt ?? rev.proposedAt,
|
|
81
|
+
wasAssociatedWith: adopter,
|
|
82
|
+
used: [entityId],
|
|
83
|
+
generated: [],
|
|
84
|
+
});
|
|
85
|
+
plans.push({
|
|
86
|
+
id: entityId,
|
|
87
|
+
steps: rev.steps.map((s) => ({ id: s.stepId, toolId: s.kind, isStepOfPlan: entityId })),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
priorRevisionEntity = entityId;
|
|
91
|
+
}
|
|
92
|
+
// Per-step executions: correspondsToStep + qualified association (hadPlan = the exact revision entity).
|
|
93
|
+
for (const exec of input.executions) {
|
|
94
|
+
addAgent(exec.actor, exec.actorClass);
|
|
95
|
+
const revisionEntityId = planEntityId(input.endeavorId, exec.planId, exec.planRevision);
|
|
96
|
+
const artifactEntityIds = (exec.artifactRefs ?? []).map((raw, i) => {
|
|
97
|
+
const artifact = typeof raw === 'string' ? { ref: raw } : raw;
|
|
98
|
+
const id = `ent:${input.endeavorId}:artifact:${exec.activityId}:${i}`;
|
|
99
|
+
entities.push({
|
|
100
|
+
id,
|
|
101
|
+
type: 'Artifact',
|
|
102
|
+
wasGeneratedBy: `act:${exec.activityId}`,
|
|
103
|
+
ref: artifact.ref,
|
|
104
|
+
...(artifact.derivedFrom?.length ? { wasDerivedFrom: artifact.derivedFrom } : {}),
|
|
105
|
+
});
|
|
106
|
+
return id;
|
|
107
|
+
});
|
|
108
|
+
// The compile bridge, both names (ADR-0054 §3): the run ExecutionPlan entity is
|
|
109
|
+
// prov:wasDerivedFrom the adopted revision, and the durable step gains
|
|
110
|
+
// ep-plan:isDecomposedAsPlan → it.
|
|
111
|
+
if (exec.runPlan) {
|
|
112
|
+
const runPlanEntityId = `ent:${input.endeavorId}:runplan:${exec.runPlan.id}`;
|
|
113
|
+
entities.push({
|
|
114
|
+
id: runPlanEntityId,
|
|
115
|
+
type: 'ExecutionPlan',
|
|
116
|
+
ref: exec.runPlan.ref,
|
|
117
|
+
wasDerivedFrom: [revisionEntityId],
|
|
118
|
+
});
|
|
119
|
+
const adoptedPlan = plans.find((p) => p.id === revisionEntityId);
|
|
120
|
+
const step = adoptedPlan?.steps.find((s) => s.id === exec.stepId);
|
|
121
|
+
if (step)
|
|
122
|
+
step.isDecomposedAsPlan = runPlanEntityId;
|
|
123
|
+
}
|
|
124
|
+
activities.push({
|
|
125
|
+
id: `act:${exec.activityId}`,
|
|
126
|
+
type: 'StepExecution',
|
|
127
|
+
tier: 'execution-orchestrated',
|
|
128
|
+
startedAt: exec.startedAt,
|
|
129
|
+
endedAt: exec.endedAt,
|
|
130
|
+
wasAssociatedWith: exec.actor,
|
|
131
|
+
used: exec.usedRefs ?? [],
|
|
132
|
+
onBehalfOf: exec.onBehalfOf,
|
|
133
|
+
generated: artifactEntityIds,
|
|
134
|
+
correspondsToStep: exec.stepId,
|
|
135
|
+
hadPlan: revisionEntityId,
|
|
136
|
+
hadRole: exec.role,
|
|
137
|
+
...(exec.failed ? { failed: true } : {}),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
// Outcome / validation attestations derive from the contributing artifacts.
|
|
141
|
+
for (const att of input.attestations ?? []) {
|
|
142
|
+
entities.push({
|
|
143
|
+
id: `ent:${input.endeavorId}:attestation:${att.id}`,
|
|
144
|
+
type: 'Attestation',
|
|
145
|
+
ref: att.ref,
|
|
146
|
+
wasDerivedFrom: att.derivedFrom,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
version: 'ap.provenance.v1',
|
|
151
|
+
agents: [...agents.values()],
|
|
152
|
+
activities,
|
|
153
|
+
entities,
|
|
154
|
+
plans,
|
|
155
|
+
// One Endeavor = one ep-plan:ExecutionTraceBundle; everything above is a hasTraceElement member.
|
|
156
|
+
bundle: { id: `bundle:${input.endeavorId}` },
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=endeavor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endeavor.js","sourceRoot":"","sources":["../src/endeavor.ts"],"names":[],"mappings":"AA+FA,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,MAAc,EAAE,QAAgB,EAAU,EAAE,CACpF,OAAO,UAAU,SAAS,MAAM,QAAQ,QAAQ,EAAE,CAAC;AAErD;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAA8B;IACtE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC/C,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,UAAuB,EAAQ,EAAE;QAC7D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC;IAC/G,CAAC,CAAC;IACF,QAAQ,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAEhE,MAAM,UAAU,GAAmB,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAiB,EAAE,CAAC;IAClC,MAAM,KAAK,GAAgB,EAAE,CAAC;IAE9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AC,EAAE,EAAE;YACnD,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,cAAc,EAAE,GAAG,CAAC,WAAW;SAChC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC5B,UAAU;QACV,QAAQ;QACR,KAAK;QACL,iGAAiG;QACjG,MAAM,EAAE,EAAE,EAAE,EAAE,UAAU,KAAK,CAAC,UAAU,EAAE,EAAE;KAC7C,CAAC;AACJ,CAAC"}
|
package/dist/firewall.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface PublicProvenanceRow {
|
|
|
7
7
|
anchoredBy?: string;
|
|
8
8
|
/** REQUIRED: the assurance floor — must be `OnchainConfirmed`. */
|
|
9
9
|
assurance?: string;
|
|
10
|
-
/** `prov:actedOnBehalfOf` / `
|
|
10
|
+
/** `prov:actedOnBehalfOf` / `apvr:onBehalfOf` edges — MUST be empty for a public row. */
|
|
11
11
|
actedOnBehalfOf?: string[];
|
|
12
12
|
/** `prov:wasAttributedTo` agent classes — MUST NOT include `person`. */
|
|
13
13
|
attributedToClasses?: AgentClass[];
|
package/dist/firewall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firewall.d.ts","sourceRoot":"","sources":["../src/firewall.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,+GAA+G;IAC/G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"firewall.d.ts","sourceRoot":"","sources":["../src/firewall.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,+GAA+G;IAC/G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,UAAU,EAAE,CAAC;IACnC,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAgC1E,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,mBAAmB,GAAG,cAAc,CAY/E;AAED,gHAAgH;AAChH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAGzE"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { AgentClass, ProvenanceRecordV1 } from './types.js';
|
|
2
|
+
/** The IRI the discovery indexer gives a Smart Agent in the public KB (`urn:ap:agent:eip155:<chain>:<sa>`),
|
|
3
|
+
* used here so a private run graph and the public graph name the SAME node — joinable by a reader who holds
|
|
4
|
+
* both, never joined inside an engine (spec 356/357). Without a chain id the agent is named by address alone. */
|
|
5
|
+
export declare function agentIri(address: string, chainId?: number): string;
|
|
6
|
+
/** One step of the view (the shape `orchestration.provenanceOf` produces per step). */
|
|
7
|
+
export interface HarnessStepView {
|
|
8
|
+
stepRef: string;
|
|
9
|
+
toolId: string;
|
|
10
|
+
capability?: {
|
|
11
|
+
id: string;
|
|
12
|
+
action: string;
|
|
13
|
+
};
|
|
14
|
+
risk?: string;
|
|
15
|
+
status: string;
|
|
16
|
+
startedAt?: string;
|
|
17
|
+
endedAt?: string;
|
|
18
|
+
authority?: {
|
|
19
|
+
presentedRef: string | null;
|
|
20
|
+
decision: string;
|
|
21
|
+
afterApproval: boolean;
|
|
22
|
+
chain?: {
|
|
23
|
+
accountabilityRoot: string;
|
|
24
|
+
actingAgent: string;
|
|
25
|
+
depth: number;
|
|
26
|
+
chainDigest: string;
|
|
27
|
+
links: Array<{
|
|
28
|
+
ref: string;
|
|
29
|
+
delegator: string;
|
|
30
|
+
delegate: string;
|
|
31
|
+
parentRef: string | null;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
actor?: {
|
|
36
|
+
rootPrincipal?: string;
|
|
37
|
+
originatingAgent?: string;
|
|
38
|
+
actingAgent: string;
|
|
39
|
+
};
|
|
40
|
+
receiptDigest?: string;
|
|
41
|
+
inputDigest?: string;
|
|
42
|
+
outputDigest?: string;
|
|
43
|
+
txHash?: string;
|
|
44
|
+
delegatedTo?: string;
|
|
45
|
+
delegatedToRun?: string;
|
|
46
|
+
effects?: Array<{
|
|
47
|
+
produces: string;
|
|
48
|
+
ok: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
decisions?: Array<{
|
|
51
|
+
point: string;
|
|
52
|
+
ruleId: string;
|
|
53
|
+
}>;
|
|
54
|
+
errorClass?: string;
|
|
55
|
+
/** Spec 390 — the span this step's activity is. */
|
|
56
|
+
spanId?: string;
|
|
57
|
+
/** Spec 391 — the step's raw result was offloaded to the acting agent's vault: where, how big, its digest. */
|
|
58
|
+
artifact?: {
|
|
59
|
+
recordType: string;
|
|
60
|
+
digest: string;
|
|
61
|
+
bytes: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** The whole view — `RunProvenanceV1` from `@agenticprimitives/orchestration`, restated structurally. */
|
|
65
|
+
export interface HarnessRunProvenanceInput {
|
|
66
|
+
runRef: string;
|
|
67
|
+
/** ISO — when the run ended. */
|
|
68
|
+
endedAt: string;
|
|
69
|
+
/** The agent the run ran at: whose authority was spent, whose vault the record lives in. An address. */
|
|
70
|
+
agent: string;
|
|
71
|
+
agentClass?: AgentClass;
|
|
72
|
+
asker?: string;
|
|
73
|
+
askerClass?: AgentClass;
|
|
74
|
+
intentDigest?: string;
|
|
75
|
+
outcome: string;
|
|
76
|
+
playbook?: {
|
|
77
|
+
skillId: string;
|
|
78
|
+
version: string;
|
|
79
|
+
commitment: string;
|
|
80
|
+
};
|
|
81
|
+
/** Spec 367 §8 — the request this run answered (a routed or handed-off run): the sender's run and step. */
|
|
82
|
+
inResponseTo?: {
|
|
83
|
+
agent: string;
|
|
84
|
+
runRef: string;
|
|
85
|
+
stepRef?: string;
|
|
86
|
+
};
|
|
87
|
+
steps: HarnessStepView[];
|
|
88
|
+
/** The chain the agents live on — names them the way the public KB does. */
|
|
89
|
+
chainId?: number;
|
|
90
|
+
/** Spec 390 — the trace the run's spans belong to, and the run's root span. */
|
|
91
|
+
traceId?: string;
|
|
92
|
+
spanId?: string;
|
|
93
|
+
}
|
|
94
|
+
/** Ids are derived from run and step references, so the same record is the same graph. */
|
|
95
|
+
export declare const harnessIds: {
|
|
96
|
+
run: (runRef: string) => string;
|
|
97
|
+
bundle: (runRef: string) => string;
|
|
98
|
+
step: (runRef: string, stepRef: string) => string;
|
|
99
|
+
plan: (runRef: string) => string;
|
|
100
|
+
planStep: (runRef: string, stepRef: string) => string;
|
|
101
|
+
playbook: (p: {
|
|
102
|
+
skillId: string;
|
|
103
|
+
version: string;
|
|
104
|
+
commitment: string;
|
|
105
|
+
}) => string;
|
|
106
|
+
runtime: (agentIriValue: string) => string;
|
|
107
|
+
mandate: (ref: string) => string;
|
|
108
|
+
receipt: (digest: string) => string;
|
|
109
|
+
tx: (hash: string) => string;
|
|
110
|
+
effect: (runRef: string, stepRef: string, produces: string) => string;
|
|
111
|
+
decision: (runRef: string, stepRef: string, point: string) => string;
|
|
112
|
+
actor: (runRef: string, stepRef: string) => string;
|
|
113
|
+
artifact: (runRef: string, stepRef: string) => string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Project a harness run into the private A-box: the runtime `actedOnBehalfOf` the agent; the run
|
|
117
|
+
* (`ServiceExecution`) associated with the runtime under its ExecutionPlan and — when a playbook shaped it —
|
|
118
|
+
* with the agent under that playbook; one activity per step that `usedDelegation` its mandate, `used` every
|
|
119
|
+
* chain link by reference, `generated` its receipt, its transaction, its effects and its decisions, and ended
|
|
120
|
+
* in a named completion state; a P-Plan with `isPrecededBy` order; one bundle, `wasInformedBy` the sender's
|
|
121
|
+
* when this run answered another.
|
|
122
|
+
*/
|
|
123
|
+
export declare function projectHarnessRunProvenance(input: HarnessRunProvenanceInput): ProvenanceRecordV1;
|
|
124
|
+
//# sourceMappingURL=harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAqD,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEpH;;kHAEkH;AAClH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlE;AAED,uFAAuF;AACvF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE;QACV,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,QAAQ,EAAE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A2B,CAAC,KAAK,EAAE,yBAAyB,GAAG,kBAAkB,CAwHhG"}
|
package/dist/harness.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/** The IRI the discovery indexer gives a Smart Agent in the public KB (`urn:ap:agent:eip155:<chain>:<sa>`),
|
|
2
|
+
* used here so a private run graph and the public graph name the SAME node — joinable by a reader who holds
|
|
3
|
+
* both, never joined inside an engine (spec 356/357). Without a chain id the agent is named by address alone. */
|
|
4
|
+
export function agentIri(address, chainId) {
|
|
5
|
+
const a = address.toLowerCase();
|
|
6
|
+
return chainId ? `urn:ap:agent:eip155:${chainId}:${a}` : `urn:ap:agent:${a}`;
|
|
7
|
+
}
|
|
8
|
+
const COMPLETION = {
|
|
9
|
+
completed: 'Completed', executed: 'Completed', failed: 'Failed', refused: 'Refused', denied: 'Refused',
|
|
10
|
+
skipped: 'Skipped', suspended: 'Suspended',
|
|
11
|
+
};
|
|
12
|
+
const completionOf = (status) => COMPLETION[status] ?? 'Failed';
|
|
13
|
+
/** Ids are derived from run and step references, so the same record is the same graph. */
|
|
14
|
+
export const harnessIds = {
|
|
15
|
+
run: (runRef) => `act:${runRef}`,
|
|
16
|
+
bundle: (runRef) => `bundle:${runRef}`,
|
|
17
|
+
step: (runRef, stepRef) => `act:${runRef}:${stepRef}`,
|
|
18
|
+
plan: (runRef) => `plan:${runRef}`,
|
|
19
|
+
planStep: (runRef, stepRef) => `plan:${runRef}:step:${stepRef}`,
|
|
20
|
+
playbook: (p) => `playbook:${p.skillId}@${p.version}#${p.commitment}`,
|
|
21
|
+
runtime: (agentIriValue) => `runtime:${agentIriValue}`,
|
|
22
|
+
mandate: (ref) => `mandate:${ref}`,
|
|
23
|
+
receipt: (digest) => `receipt:${digest}`,
|
|
24
|
+
tx: (hash) => `tx:${hash}`,
|
|
25
|
+
effect: (runRef, stepRef, produces) => `effect:${runRef}:${stepRef}:${produces}`,
|
|
26
|
+
decision: (runRef, stepRef, point) => `decision:${runRef}:${stepRef}:${point}`,
|
|
27
|
+
actor: (runRef, stepRef) => `actor:${runRef}:${stepRef}`,
|
|
28
|
+
artifact: (runRef, stepRef) => `artifact:${runRef}:${stepRef}`,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Project a harness run into the private A-box: the runtime `actedOnBehalfOf` the agent; the run
|
|
32
|
+
* (`ServiceExecution`) associated with the runtime under its ExecutionPlan and — when a playbook shaped it —
|
|
33
|
+
* with the agent under that playbook; one activity per step that `usedDelegation` its mandate, `used` every
|
|
34
|
+
* chain link by reference, `generated` its receipt, its transaction, its effects and its decisions, and ended
|
|
35
|
+
* in a named completion state; a P-Plan with `isPrecededBy` order; one bundle, `wasInformedBy` the sender's
|
|
36
|
+
* when this run answered another.
|
|
37
|
+
*/
|
|
38
|
+
export function projectHarnessRunProvenance(input) {
|
|
39
|
+
const ids = harnessIds;
|
|
40
|
+
const agentId = agentIri(input.agent, input.chainId);
|
|
41
|
+
const runtimeId = ids.runtime(agentId);
|
|
42
|
+
const runId = ids.run(input.runRef);
|
|
43
|
+
const planId = ids.plan(input.runRef);
|
|
44
|
+
const bundleId = ids.bundle(input.runRef);
|
|
45
|
+
const agents = new Map();
|
|
46
|
+
const agent = (id, agentClass) => {
|
|
47
|
+
if (!agents.has(id))
|
|
48
|
+
agents.set(id, { id, ...(agentClass ? { agentClass } : {}) });
|
|
49
|
+
return id;
|
|
50
|
+
};
|
|
51
|
+
agent(agentId, input.agentClass);
|
|
52
|
+
agents.set(runtimeId, { id: runtimeId, kind: 'AgentRuntime', actedOnBehalfOf: agentId });
|
|
53
|
+
const askerId = input.asker ? agent(agentIri(input.asker, input.chainId), input.askerClass) : undefined;
|
|
54
|
+
const entities = [];
|
|
55
|
+
const entity = (e) => { if (!entities.some((x) => x.id === e.id))
|
|
56
|
+
entities.push(e); return e.id; };
|
|
57
|
+
// The plans: the run's own ExecutionPlan (what the planner proposed and the executor received), and the
|
|
58
|
+
// playbook that shaped it (the procedure, pinned by its content commitment).
|
|
59
|
+
const plans = [{
|
|
60
|
+
id: planId, kind: 'ExecutionPlan',
|
|
61
|
+
steps: input.steps.map((s, i) => ({
|
|
62
|
+
id: ids.planStep(input.runRef, s.stepRef), toolId: s.toolId, isStepOfPlan: planId,
|
|
63
|
+
...(i > 0 ? { isPrecededBy: ids.planStep(input.runRef, input.steps[i - 1].stepRef) } : {}),
|
|
64
|
+
})),
|
|
65
|
+
}];
|
|
66
|
+
const playbookId = input.playbook ? ids.playbook(input.playbook) : undefined;
|
|
67
|
+
if (input.playbook && playbookId)
|
|
68
|
+
plans.push({ id: playbookId, kind: 'Playbook', steps: [], ref: input.playbook.commitment });
|
|
69
|
+
const activities = [];
|
|
70
|
+
const stepIds = [];
|
|
71
|
+
for (const s of input.steps) {
|
|
72
|
+
const stepId = ids.step(input.runRef, s.stepRef);
|
|
73
|
+
stepIds.push(stepId);
|
|
74
|
+
const used = [];
|
|
75
|
+
const generated = [];
|
|
76
|
+
let usedDelegation;
|
|
77
|
+
let accountabilityRoot;
|
|
78
|
+
if (s.authority?.presentedRef) {
|
|
79
|
+
usedDelegation = entity({ id: ids.mandate(s.authority.presentedRef), type: 'Delegation', ref: s.authority.presentedRef });
|
|
80
|
+
}
|
|
81
|
+
for (const link of s.authority?.chain?.links ?? []) {
|
|
82
|
+
const id = entity({ id: ids.mandate(link.ref), type: 'Delegation', ref: link.ref });
|
|
83
|
+
if (id !== usedDelegation)
|
|
84
|
+
used.push(id);
|
|
85
|
+
}
|
|
86
|
+
if (s.authority?.chain?.accountabilityRoot)
|
|
87
|
+
accountabilityRoot = agent(agentIri(s.authority.chain.accountabilityRoot, input.chainId));
|
|
88
|
+
if (s.receiptDigest)
|
|
89
|
+
generated.push(entity({ id: ids.receipt(s.receiptDigest), type: 'StepReceipt', wasGeneratedBy: stepId, ref: s.receiptDigest, wasAttributedTo: agentId }));
|
|
90
|
+
if (s.txHash)
|
|
91
|
+
generated.push(entity({ id: ids.tx(s.txHash), type: 'ChainTransaction', wasGeneratedBy: stepId, ref: s.txHash }));
|
|
92
|
+
for (const e of s.effects ?? [])
|
|
93
|
+
generated.push(entity({ id: ids.effect(input.runRef, s.stepRef, e.produces), type: 'Effect', wasGeneratedBy: stepId, effectProduces: e.produces, effectSucceeded: e.ok }));
|
|
94
|
+
for (const d of s.decisions ?? [])
|
|
95
|
+
generated.push(entity({ id: ids.decision(input.runRef, s.stepRef, d.point), type: 'DecisionRecord', wasGeneratedBy: stepId, decisionPoint: d.point, decisionRule: d.ruleId }));
|
|
96
|
+
if (s.artifact)
|
|
97
|
+
generated.push(entity({ id: ids.artifact(input.runRef, s.stepRef), type: 'RunArtifact', wasGeneratedBy: stepId, ref: s.artifact.recordType, wasAttributedTo: agentId, artifactBytes: s.artifact.bytes, artifactDigest: s.artifact.digest }));
|
|
98
|
+
let actorContext;
|
|
99
|
+
if (s.actor) {
|
|
100
|
+
actorContext = entity({
|
|
101
|
+
id: ids.actor(input.runRef, s.stepRef), type: 'ActorContext',
|
|
102
|
+
actingAgent: agent(agentIri(s.actor.actingAgent, input.chainId)),
|
|
103
|
+
...(s.actor.originatingAgent ? { originatingAgent: agent(agentIri(s.actor.originatingAgent, input.chainId)) } : {}),
|
|
104
|
+
...(s.actor.rootPrincipal ? { rootPrincipal: agent(agentIri(s.actor.rootPrincipal, input.chainId)) } : {}),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const delegatedToAgent = s.delegatedTo ? agent(agentIri(s.delegatedTo, input.chainId)) : undefined;
|
|
108
|
+
const completion = completionOf(s.status);
|
|
109
|
+
activities.push({
|
|
110
|
+
id: stepId, type: 'StepExecution', tier: 'execution-orchestrated',
|
|
111
|
+
startedAt: s.startedAt ?? input.endedAt, ...(s.endedAt ? { endedAt: s.endedAt } : {}),
|
|
112
|
+
wasAssociatedWith: agentId,
|
|
113
|
+
used, ...(usedDelegation ? { usedDelegation } : {}),
|
|
114
|
+
generated,
|
|
115
|
+
correspondsToStep: ids.planStep(input.runRef, s.stepRef),
|
|
116
|
+
...(playbookId ? { hadPlan: playbookId } : {}),
|
|
117
|
+
...(completion === 'Failed' || completion === 'Refused' ? { failed: true } : {}),
|
|
118
|
+
completionState: completion,
|
|
119
|
+
...(s.receiptDigest ? { receiptDigest: s.receiptDigest } : {}),
|
|
120
|
+
...(s.capability ? { realizesCapability: s.capability.id } : {}),
|
|
121
|
+
...(s.authority ? { authorityDecision: s.authority.decision, afterApproval: s.authority.afterApproval } : {}),
|
|
122
|
+
...(s.authority?.chain ? { chainDigest: s.authority.chain.chainDigest } : {}),
|
|
123
|
+
...(accountabilityRoot ? { accountabilityRoot } : {}),
|
|
124
|
+
...(actorContext ? { actorContext } : {}),
|
|
125
|
+
...(delegatedToAgent ? { delegatedToAgent } : {}),
|
|
126
|
+
...(s.delegatedToRun ? { wasInformedBy: [ids.run(s.delegatedToRun)] } : {}),
|
|
127
|
+
...(s.errorClass ? { errorClass: s.errorClass } : {}),
|
|
128
|
+
...(input.traceId ? { traceId: input.traceId } : {}),
|
|
129
|
+
...(s.spanId ? { spanId: s.spanId } : {}),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const started = input.steps.map((s) => s.startedAt).filter((x) => !!x).sort()[0] ?? input.endedAt;
|
|
133
|
+
activities.unshift({
|
|
134
|
+
id: runId, type: 'HarnessRun', tier: 'execution-orchestrated',
|
|
135
|
+
startedAt: started, endedAt: input.endedAt,
|
|
136
|
+
wasAssociatedWith: runtimeId,
|
|
137
|
+
used: [], generated: [],
|
|
138
|
+
executionPlan: planId,
|
|
139
|
+
...(playbookId ? { hadPlan: playbookId, usedPlanContentHash: input.playbook.commitment } : {}),
|
|
140
|
+
hasStep: stepIds,
|
|
141
|
+
runRef: input.runRef,
|
|
142
|
+
...(input.intentDigest ? { intentDigest: input.intentDigest } : {}),
|
|
143
|
+
completionState: input.outcome === 'completed' ? 'Completed' : input.outcome === 'suspended' ? 'Suspended' : 'Failed',
|
|
144
|
+
...(input.outcome !== 'completed' && input.outcome !== 'suspended' ? { failed: true } : {}),
|
|
145
|
+
...(askerId ? { onBehalfOf: askerId } : {}),
|
|
146
|
+
...(input.inResponseTo ? { wasInformedBy: [ids.run(input.inResponseTo.runRef)] } : {}),
|
|
147
|
+
...(input.traceId ? { traceId: input.traceId } : {}),
|
|
148
|
+
...(input.spanId ? { spanId: input.spanId } : {}),
|
|
149
|
+
});
|
|
150
|
+
return {
|
|
151
|
+
version: 'ap.provenance.v1',
|
|
152
|
+
agents: [...agents.values()],
|
|
153
|
+
activities,
|
|
154
|
+
entities,
|
|
155
|
+
plans,
|
|
156
|
+
bundle: {
|
|
157
|
+
id: bundleId,
|
|
158
|
+
wasAttributedTo: agentId,
|
|
159
|
+
...(input.inResponseTo ? { wasInformedBy: [ids.bundle(input.inResponseTo.runRef)] } : {}),
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAeA;;kHAEkH;AAClH,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,OAAgB;IACxD,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAChC,OAAO,OAAO,CAAC,CAAC,CAAC,uBAAuB,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAC/E,CAAC;AAwDD,MAAM,UAAU,GAA2B;IACzC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS;IACtG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW;CAC3C,CAAC;AACF,MAAM,YAAY,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,CAAC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CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3F,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtF,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC5B,UAAU;QACV,QAAQ;QACR,KAAK;QACL,MAAM,EAAE;YACN,EAAE,EAAE,QAAQ;YACZ,eAAe,EAAE,OAAO;YACxB,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1F;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,5 +3,10 @@ export declare const PACKAGE_STATUS: "w5-projector";
|
|
|
3
3
|
export declare const SPEC_REF = "specs/316-agentic-interaction-fabric.md";
|
|
4
4
|
export type { Tier, AgentClass, ProvAgentRef, ProvActivityType, ProvActivity, ProvEntityType, ProvEntity, PPlanStep, PPlanPlan, ProvenanceRecordV1, } from './types.js';
|
|
5
5
|
export { projectExchangeProvenance, projectRunProvenance, type ProvenanceExchangeInput, type ProvenanceRunInput, } from './project.js';
|
|
6
|
+
export { projectEndeavorProvenance, type EndeavorProvenanceInput, type EndeavorRequestInput, type EndeavorPlanRevisionInput, type EndeavorStepExecutionInput, type EndeavorAttestationInput, } from './endeavor.js';
|
|
7
|
+
export { projectHarnessRunProvenance, agentIri, harnessIds, type HarnessRunProvenanceInput, type HarnessStepView } from './harness.js';
|
|
8
|
+
export { toJsonLd, toProvN, iriOf, PROV_ID_BASE, type JsonLdOptions } from './serialize.js';
|
|
6
9
|
export { isPublicProjectionSafe, assertPublicProjectionSafe, type PublicProvenanceRow, type FirewallResult, } from './firewall.js';
|
|
10
|
+
export { projectPublicProvenance } from './public.js';
|
|
11
|
+
export type { PublicProvenanceRowV1, PublicProvenanceProjection } from './public.js';
|
|
7
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,kCAAkC,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,cAAuB,CAAC;AACtD,eAAO,MAAM,QAAQ,4CAA4C,CAAC;AAElE,YAAY,EACV,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,kCAAkC,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,cAAuB,CAAC;AACtD,eAAO,MAAM,QAAQ,4CAA4C,CAAC;AAElE,YAAY,EACV,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,yBAAyB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACvI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,5 +5,11 @@ export const PACKAGE_NAME = '@agenticprimitives/provenance';
|
|
|
5
5
|
export const PACKAGE_STATUS = 'w5-projector';
|
|
6
6
|
export const SPEC_REF = 'specs/316-agentic-interaction-fabric.md';
|
|
7
7
|
export { projectExchangeProvenance, projectRunProvenance, } from './project.js';
|
|
8
|
+
export { projectEndeavorProvenance, } from './endeavor.js';
|
|
9
|
+
// Spec 389 — the harness run as the same graph, and the two serializations every record leaves in.
|
|
10
|
+
export { projectHarnessRunProvenance, agentIri, harnessIds } from './harness.js';
|
|
11
|
+
export { toJsonLd, toProvN, iriOf, PROV_ID_BASE } from './serialize.js';
|
|
8
12
|
export { isPublicProjectionSafe, assertPublicProjectionSafe, } from './firewall.js';
|
|
13
|
+
// Spec 395 — the public projection: anchored outcomes only, through S1.
|
|
14
|
+
export { projectPublicProvenance } from './public.js';
|
|
9
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,8GAA8G;AAC9G,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAC5D,MAAM,CAAC,MAAM,cAAc,GAAG,cAAuB,CAAC;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAG,yCAAyC,CAAC;AAelE,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GAGrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAG3B,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,8GAA8G;AAC9G,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAC5D,MAAM,CAAC,MAAM,cAAc,GAAG,cAAuB,CAAC;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAG,yCAAyC,CAAC;AAelE,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GAGrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,yBAAyB,GAM1B,MAAM,eAAe,CAAC;AAEvB,mGAAmG;AACnG,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,UAAU,EAAwD,MAAM,cAAc,CAAC;AACvI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAG3B,MAAM,eAAe,CAAC;AACvB,wEAAwE;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/public.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ProvenanceRecordV1 } from './types.js';
|
|
2
|
+
/** One anchored outcome of a run, safe for anyone to read. The ids are the private graph's IRIs. */
|
|
3
|
+
export interface PublicProvenanceRowV1 {
|
|
4
|
+
type: 'AnchoredOutcome';
|
|
5
|
+
'@id': string;
|
|
6
|
+
run: string;
|
|
7
|
+
/** The chain transaction the step left — the anchor. */
|
|
8
|
+
anchoredBy: string;
|
|
9
|
+
assurance: 'OnchainConfirmed';
|
|
10
|
+
receiptDigest?: string;
|
|
11
|
+
/** The mandate the step presented, by hash — a counterparty checks its revocation state on the chain. */
|
|
12
|
+
mandate?: string;
|
|
13
|
+
chainDigest?: string;
|
|
14
|
+
intentDigest?: string;
|
|
15
|
+
/** The playbook's content commitment (never its author). */
|
|
16
|
+
playbook?: string;
|
|
17
|
+
capability?: string;
|
|
18
|
+
completionState: string;
|
|
19
|
+
endedAt?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PublicProvenanceProjection {
|
|
22
|
+
rows: PublicProvenanceRowV1[];
|
|
23
|
+
/** Every step activity that was NOT projected, and the firewall's or the anchor rule's reason. */
|
|
24
|
+
refused: Array<{
|
|
25
|
+
activity: string;
|
|
26
|
+
reason: string;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Project the anchored outcomes of a run. Pure. A candidate that the S1 firewall refuses, or whose JSON carries
|
|
31
|
+
* anything that looks like an address, is refused with the reason — never trimmed into shape.
|
|
32
|
+
*/
|
|
33
|
+
export declare function projectPublicProvenance(record: ProvenanceRecordV1): PublicProvenanceProjection;
|
|
34
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAA4B,MAAM,YAAY,CAAC;AAE/E,oGAAoG;AACpG,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,EAAE,CAAC;IAC9B,kGAAkG;IAClG,OAAO,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtD;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,0BAA0B,CA0C9F"}
|
package/dist/public.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// THE PUBLIC PROJECTION — spec 395. What a run LEFT ON THE CHAIN may be cited in public; what it was ABOUT may
|
|
2
|
+
// not. One row per step that generated a `ChainTransaction`: the transaction is the anchor (`apvr:anchoredBy`,
|
|
3
|
+
// assurance OnchainConfirmed — the harness records a hash only from a mined receipt), and the row carries DIGESTS
|
|
4
|
+
// AND IDS ONLY: the run and step IRIs (derived from the run reference — correlation, never trust), the receipt
|
|
5
|
+
// digest, the chain digest, the intent digest, the playbook commitment, the capability id, the completion state.
|
|
6
|
+
// NO AGENT, NO ATTRIBUTION, NO actedOnBehalfOf, NO ARGUMENT, NO RESULT, NO WORDS, NO ADDRESS. Every row passes the
|
|
7
|
+
// S1 firewall before it leaves; a step without an anchor is refused BY NAME and nothing of it is emitted.
|
|
8
|
+
//
|
|
9
|
+
// Served by the acting agent to anyone; never written into the discovery KB (ADR-0040: the indexer is the only
|
|
10
|
+
// writer). A counterparty verifies by RECOMPUTING — the receipt they hold hashes to the digest the row names, the
|
|
11
|
+
// transaction exists on chain, the run id is the one their receipt's hasProvenance named. No gate reads a row.
|
|
12
|
+
import { isPublicProjectionSafe } from './firewall.js';
|
|
13
|
+
const ADDRESS = /0x[0-9a-f]{40}(?![0-9a-f])/i;
|
|
14
|
+
/**
|
|
15
|
+
* Project the anchored outcomes of a run. Pure. A candidate that the S1 firewall refuses, or whose JSON carries
|
|
16
|
+
* anything that looks like an address, is refused with the reason — never trimmed into shape.
|
|
17
|
+
*/
|
|
18
|
+
export function projectPublicProvenance(record) {
|
|
19
|
+
const rows = [];
|
|
20
|
+
const refused = [];
|
|
21
|
+
const run = record.activities.find((a) => a.type === 'HarnessRun');
|
|
22
|
+
const entities = new Map(record.entities.map((e) => [e.id, e]));
|
|
23
|
+
const playbook = run?.usedPlanContentHash;
|
|
24
|
+
for (const step of record.activities.filter((a) => a.type === 'StepExecution')) {
|
|
25
|
+
const tx = step.generated.map((id) => entities.get(id)).find((e) => !!e && e.type === 'ChainTransaction');
|
|
26
|
+
const candidate = {
|
|
27
|
+
type: 'AnchoredOutcome',
|
|
28
|
+
...(tx?.ref ? { anchoredBy: tx.ref.toLowerCase() } : {}),
|
|
29
|
+
assurance: tx ? 'OnchainConfirmed' : 'Asserted',
|
|
30
|
+
properties: {
|
|
31
|
+
run: run?.id ?? '', step: step.id,
|
|
32
|
+
...(step.receiptDigest ? { receiptDigest: step.receiptDigest } : {}),
|
|
33
|
+
...(step.usedDelegation && entities.get(step.usedDelegation)?.ref ? { mandate: entities.get(step.usedDelegation).ref.toLowerCase() } : {}),
|
|
34
|
+
...(step.chainDigest ? { chainDigest: step.chainDigest } : {}),
|
|
35
|
+
...(run?.intentDigest ? { intentDigest: run.intentDigest } : {}),
|
|
36
|
+
...(playbook ? { playbook } : {}),
|
|
37
|
+
...(step.realizesCapability ? { capability: step.realizesCapability } : {}),
|
|
38
|
+
completionState: step.completionState ?? 'Completed',
|
|
39
|
+
...(step.endedAt ? { endedAt: step.endedAt } : {}),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const verdict = isPublicProjectionSafe(candidate);
|
|
43
|
+
if (!verdict.ok) {
|
|
44
|
+
refused.push({ activity: step.id, reason: verdict.reason });
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const row = {
|
|
48
|
+
type: 'AnchoredOutcome', '@id': step.id, run: candidate.properties.run, anchoredBy: candidate.anchoredBy, assurance: 'OnchainConfirmed',
|
|
49
|
+
...(candidate.properties.receiptDigest ? { receiptDigest: candidate.properties.receiptDigest } : {}),
|
|
50
|
+
...(candidate.properties.mandate ? { mandate: candidate.properties.mandate } : {}),
|
|
51
|
+
...(candidate.properties.chainDigest ? { chainDigest: candidate.properties.chainDigest } : {}),
|
|
52
|
+
...(candidate.properties.intentDigest ? { intentDigest: candidate.properties.intentDigest } : {}),
|
|
53
|
+
...(candidate.properties.playbook ? { playbook: candidate.properties.playbook } : {}),
|
|
54
|
+
...(candidate.properties.capability ? { capability: candidate.properties.capability } : {}),
|
|
55
|
+
completionState: candidate.properties.completionState,
|
|
56
|
+
...(candidate.properties.endedAt ? { endedAt: candidate.properties.endedAt } : {}),
|
|
57
|
+
};
|
|
58
|
+
// The last line: nothing that looks like an agent's address leaves, whatever field it hid in.
|
|
59
|
+
if (ADDRESS.test(JSON.stringify(row))) {
|
|
60
|
+
refused.push({ activity: step.id, reason: 'address_literal' });
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
rows.push(row);
|
|
64
|
+
}
|
|
65
|
+
return { rows, refused };
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,+GAA+G;AAC/G,kHAAkH;AAClH,+GAA+G;AAC/G,iHAAiH;AACjH,mHAAmH;AACnH,0GAA0G;AAC1G,EAAE;AACF,+GAA+G;AAC/G,kHAAkH;AAClH,+GAA+G;AAC/G,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AA6BvD,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAA0B;IAChE,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,MAAM,OAAO,GAAgD,EAAE,CAAC;IAChE,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAqB,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACpF,MAAM,QAAQ,GAAG,GAAG,EAAE,mBAAmB,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAqB,EA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 @@
|
|
|
1
|
+
import type { ProvenanceRecordV1 } from './types.js';
|
|
2
|
+
export declare const PROV_ID_BASE = "urn:ap:prov:";
|
|
3
|
+
/** A record id as an IRI: an absolute IRI (`urn:`, `https:`, `did:`) stays; an address becomes an agent IRI;
|
|
4
|
+
* anything else resolves under the record base. */
|
|
5
|
+
export declare function iriOf(id: string, chainId?: number): string;
|
|
6
|
+
export interface JsonLdOptions {
|
|
7
|
+
/** The `@context` value: the published context object, or its URL. */
|
|
8
|
+
context: Record<string, unknown> | string;
|
|
9
|
+
/** Names agents the way the public KB does when known. */
|
|
10
|
+
chainId?: number;
|
|
11
|
+
}
|
|
12
|
+
type Node = Record<string, unknown>;
|
|
13
|
+
/** A JSON-LD 1.1 document: the bundle as a named graph whose members are `@graph`. */
|
|
14
|
+
export declare function toJsonLd(record: ProvenanceRecordV1, opts: JsonLdOptions): Node;
|
|
15
|
+
/** PROV-N (W3C Recommendation) — the text notation, one statement per line. Qualified names use the same
|
|
16
|
+
* prefixes the JSON-LD context declares. */
|
|
17
|
+
export declare function toProvN(record: ProvenanceRecordV1, opts?: {
|
|
18
|
+
chainId?: number;
|
|
19
|
+
}): string;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=serialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../src/serialize.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAuF,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1I,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C;oDACoD;AACpD,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1D;AAwBD,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IAC1C,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpC,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAkF9E;AAED;6CAC6C;AAC7C,wBAAgB,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAqE3F"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
export const PROV_ID_BASE = 'urn:ap:prov:';
|
|
2
|
+
/** A record id as an IRI: an absolute IRI (`urn:`, `https:`, `did:`) stays; an address becomes an agent IRI;
|
|
3
|
+
* anything else resolves under the record base. */
|
|
4
|
+
export function iriOf(id, chainId) {
|
|
5
|
+
if (/^(urn|https?|did):/i.test(id))
|
|
6
|
+
return id;
|
|
7
|
+
if (/^0x[0-9a-f]{40}$/i.test(id))
|
|
8
|
+
return chainId ? `urn:ap:agent:eip155:${chainId}:${id.toLowerCase()}` : `urn:ap:agent:${id.toLowerCase()}`;
|
|
9
|
+
return `${PROV_ID_BASE}${id}`;
|
|
10
|
+
}
|
|
11
|
+
/** The class terms (as the context names them) for each activity type. */
|
|
12
|
+
const ACTIVITY_TYPES = {
|
|
13
|
+
CommunicationDelivery: ['Activity', 'CommunicationDelivery'],
|
|
14
|
+
IntentInvocation: ['Activity', 'IntentInvocation'],
|
|
15
|
+
OrchestratedTask: ['Activity', 'OrchestratedTask'],
|
|
16
|
+
EndeavorAdoption: ['Activity'],
|
|
17
|
+
PlanProposal: ['Activity'],
|
|
18
|
+
PlanAdoption: ['Activity'],
|
|
19
|
+
StepExecution: ['Activity'],
|
|
20
|
+
HarnessRun: ['Activity', 'ServiceExecution'],
|
|
21
|
+
};
|
|
22
|
+
const ENTITY_TYPES = {
|
|
23
|
+
Message: ['Entity'], Artifact: ['Entity'], DecisionArtifact: ['Entity'], EndeavorRequest: ['Entity'],
|
|
24
|
+
OutcomeSpecification: ['Entity'], PlanRevision: ['Entity', 'Plan', 'CoordinationPlan'], ExecutionPlan: ['Entity', 'Plan', 'ExecutionPlan'],
|
|
25
|
+
Attestation: ['Entity'], Delegation: ['Entity', 'Delegation'], Playbook: ['Entity', 'Plan', 'AgentSkillPackage'],
|
|
26
|
+
StepReceipt: ['Entity', 'StepReceipt'], ChainTransaction: ['Entity', 'ChainTransaction'], Effect: ['Entity', 'Effect'],
|
|
27
|
+
DecisionRecord: ['Entity', 'DecisionRecord'], ActorContext: ['Entity', 'ActorContext'], RunArtifact: ['Entity', 'RunArtifact'],
|
|
28
|
+
};
|
|
29
|
+
const PLAN_TYPES = {
|
|
30
|
+
Plan: ['Entity', 'Plan'], ExecutionPlan: ['Entity', 'Plan', 'ExecutionPlan'], Playbook: ['Entity', 'Plan', 'AgentSkillPackage'], CoordinationPlan: ['Entity', 'Plan', 'CoordinationPlan'],
|
|
31
|
+
};
|
|
32
|
+
/** A JSON-LD 1.1 document: the bundle as a named graph whose members are `@graph`. */
|
|
33
|
+
export function toJsonLd(record, opts) {
|
|
34
|
+
const iri = (id) => iriOf(id, opts.chainId);
|
|
35
|
+
const iris = (ids) => (ids?.length ? ids.map(iri) : undefined);
|
|
36
|
+
const drop = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined && !(Array.isArray(v) && v.length === 0)));
|
|
37
|
+
const agentNode = (a) => drop({
|
|
38
|
+
id: iri(a.id),
|
|
39
|
+
type: a.kind === 'AgentRuntime' ? ['SoftwareAgent', 'AgentRuntime'] : ['Agent', ...(a.agentClass === 'person' ? ['Person'] : a.agentClass === 'org' ? ['Organization'] : a.agentClass === 'service' ? ['SoftwareAgent'] : [])],
|
|
40
|
+
actedOnBehalfOf: a.actedOnBehalfOf ? iri(a.actedOnBehalfOf) : undefined,
|
|
41
|
+
});
|
|
42
|
+
const activityNode = (a) => {
|
|
43
|
+
const types = [...ACTIVITY_TYPES[a.type]];
|
|
44
|
+
if (a.type === 'StepExecution' && a.hadPlan)
|
|
45
|
+
types.push('SkillExecution');
|
|
46
|
+
if (a.failed)
|
|
47
|
+
types.push('FailedActivity');
|
|
48
|
+
const associations = [];
|
|
49
|
+
if (a.hadPlan || a.hadRole)
|
|
50
|
+
associations.push(drop({ type: 'Association', agent: iri(a.wasAssociatedWith), hadPlan: a.hadPlan ? iri(a.hadPlan) : undefined, hadRole: a.hadRole ? iri(a.hadRole) : undefined }));
|
|
51
|
+
if (a.executionPlan)
|
|
52
|
+
associations.push({ type: 'Association', agent: iri(a.wasAssociatedWith), hadPlan: iri(a.executionPlan) });
|
|
53
|
+
return drop({
|
|
54
|
+
id: iri(a.id), type: types,
|
|
55
|
+
startedAtTime: a.startedAt, endedAtTime: a.endedAt, endedAt: a.endedAt,
|
|
56
|
+
wasAssociatedWith: iri(a.wasAssociatedWith),
|
|
57
|
+
qualifiedAssociation: associations.length ? associations : undefined,
|
|
58
|
+
actedOnBehalfOf: a.onBehalfOf ? iri(a.onBehalfOf) : undefined,
|
|
59
|
+
used: iris(a.used), usedDelegation: a.usedDelegation ? iri(a.usedDelegation) : undefined,
|
|
60
|
+
generated: iris(a.generated),
|
|
61
|
+
wasInformedBy: iris(a.wasInformedBy),
|
|
62
|
+
correspondsToStep: a.correspondsToStep ? iri(a.correspondsToStep) : undefined,
|
|
63
|
+
hasStep: iris(a.hasStep),
|
|
64
|
+
runRef: a.runRef, intentDigest: a.intentDigest,
|
|
65
|
+
completionState: a.completionState,
|
|
66
|
+
receiptDigest: a.receiptDigest, usedPlanContentHash: a.usedPlanContentHash,
|
|
67
|
+
realizesCapability: a.realizesCapability ? (/^(urn|https?):/.test(a.realizesCapability) ? a.realizesCapability : `urn:ap:capability:${a.realizesCapability}`) : undefined,
|
|
68
|
+
authorityDecision: a.authorityDecision, afterApproval: a.afterApproval, chainDigest: a.chainDigest,
|
|
69
|
+
accountabilityRoot: a.accountabilityRoot ? iri(a.accountabilityRoot) : undefined,
|
|
70
|
+
actorContext: a.actorContext ? iri(a.actorContext) : undefined,
|
|
71
|
+
delegatedToAgent: a.delegatedToAgent ? iri(a.delegatedToAgent) : undefined,
|
|
72
|
+
errorClass: a.errorClass,
|
|
73
|
+
traceId: a.traceId, spanId: a.spanId,
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const entityNode = (e) => drop({
|
|
77
|
+
id: iri(e.id), type: ENTITY_TYPES[e.type],
|
|
78
|
+
wasGeneratedBy: e.wasGeneratedBy ? iri(e.wasGeneratedBy) : undefined,
|
|
79
|
+
wasRevisionOf: e.wasRevisionOf ? iri(e.wasRevisionOf) : undefined,
|
|
80
|
+
wasDerivedFrom: iris(e.wasDerivedFrom),
|
|
81
|
+
wasAttributedTo: e.wasAttributedTo ? iri(e.wasAttributedTo) : undefined,
|
|
82
|
+
effectProduces: e.effectProduces, effectSucceeded: e.effectSucceeded,
|
|
83
|
+
decisionPoint: e.decisionPoint, decisionRule: e.decisionRule,
|
|
84
|
+
actingAgent: e.actingAgent ? iri(e.actingAgent) : undefined,
|
|
85
|
+
originatingAgent: e.originatingAgent ? iri(e.originatingAgent) : undefined,
|
|
86
|
+
rootPrincipal: e.rootPrincipal ? iri(e.rootPrincipal) : undefined,
|
|
87
|
+
artifactBytes: e.artifactBytes, artifactDigest: e.artifactDigest,
|
|
88
|
+
});
|
|
89
|
+
const planNodes = (p) => [
|
|
90
|
+
drop({ id: iri(p.id), type: PLAN_TYPES[p.kind ?? 'Plan'] }),
|
|
91
|
+
...p.steps.map((s) => drop({
|
|
92
|
+
id: iri(s.id), type: ['Step'], isStepOfPlan: iri(s.isStepOfPlan),
|
|
93
|
+
isPrecededBy: s.isPrecededBy ? iri(s.isPrecededBy) : undefined,
|
|
94
|
+
isDecomposedAsPlan: s.isDecomposedAsPlan ? iri(s.isDecomposedAsPlan) : undefined,
|
|
95
|
+
})),
|
|
96
|
+
];
|
|
97
|
+
const members = [
|
|
98
|
+
...record.agents.map(agentNode),
|
|
99
|
+
...record.activities.map(activityNode),
|
|
100
|
+
...record.entities.map(entityNode),
|
|
101
|
+
...record.plans.flatMap(planNodes),
|
|
102
|
+
];
|
|
103
|
+
if (!record.bundle)
|
|
104
|
+
return { '@context': opts.context, graph: members };
|
|
105
|
+
return drop({
|
|
106
|
+
'@context': opts.context,
|
|
107
|
+
id: iri(record.bundle.id),
|
|
108
|
+
type: ['Entity', 'Bundle', 'ExecutionTraceBundle'],
|
|
109
|
+
wasAttributedTo: record.bundle.wasAttributedTo ? iri(record.bundle.wasAttributedTo) : undefined,
|
|
110
|
+
wasInformedBy: iris(record.bundle.wasInformedBy),
|
|
111
|
+
hasTraceElement: members.map((m) => m['id']),
|
|
112
|
+
graph: members,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** PROV-N (W3C Recommendation) — the text notation, one statement per line. Qualified names use the same
|
|
116
|
+
* prefixes the JSON-LD context declares. */
|
|
117
|
+
export function toProvN(record, opts = {}) {
|
|
118
|
+
const iri = (id) => `<${iriOf(id, opts.chainId)}>`;
|
|
119
|
+
const q = (s) => `"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
120
|
+
const attrs = (o) => {
|
|
121
|
+
const kv = Object.entries(o).filter(([, v]) => v !== undefined).map(([k, v]) => `${k}=${typeof v === 'boolean' ? `"${v}" %% xsd:boolean` : q(String(v))}`);
|
|
122
|
+
return kv.length ? `, [${kv.join(', ')}]` : '';
|
|
123
|
+
};
|
|
124
|
+
const lines = [
|
|
125
|
+
'document',
|
|
126
|
+
' prefix prov <http://www.w3.org/ns/prov#>',
|
|
127
|
+
' prefix p-plan <http://purl.org/net/p-plan#>',
|
|
128
|
+
' prefix ep-plan <https://w3id.org/ep-plan#>',
|
|
129
|
+
' prefix xsd <http://www.w3.org/2001/XMLSchema#>',
|
|
130
|
+
' prefix ap <https://agenticprimitives.dev/ns/core#>',
|
|
131
|
+
' prefix apexec <https://agenticprimitives.dev/ns/execution#>',
|
|
132
|
+
' prefix apactor <https://agenticprimitives.dev/ns/actor#>',
|
|
133
|
+
' prefix apguide <https://agenticprimitives.dev/ns/guidance#>',
|
|
134
|
+
' prefix apdel <https://agenticprimitives.dev/ns/delegation#>',
|
|
135
|
+
' prefix apvr <https://agenticprimitives.dev/ns/verification-receipt#>',
|
|
136
|
+
];
|
|
137
|
+
const body = [];
|
|
138
|
+
const indent = record.bundle ? ' ' : ' ';
|
|
139
|
+
for (const a of record.agents) {
|
|
140
|
+
body.push(`${indent}agent(${iri(a.id)}${attrs({ 'prov:type': a.kind === 'AgentRuntime' ? 'apexec:AgentRuntime' : a.agentClass === 'person' ? 'prov:Person' : a.agentClass === 'org' ? 'prov:Organization' : a.agentClass === 'service' ? 'prov:SoftwareAgent' : 'ap:Agent' })})`);
|
|
141
|
+
if (a.actedOnBehalfOf)
|
|
142
|
+
body.push(`${indent}actedOnBehalfOf(${iri(a.id)}, ${iri(a.actedOnBehalfOf)}, -)`);
|
|
143
|
+
}
|
|
144
|
+
for (const a of record.activities) {
|
|
145
|
+
const t = a.type === 'HarnessRun' ? 'apexec:ServiceExecution' : a.type === 'StepExecution' && a.hadPlan ? 'apexec:SkillExecution' : `prov:Activity`;
|
|
146
|
+
body.push(`${indent}activity(${iri(a.id)}, ${a.startedAt}, ${a.endedAt ?? '-'}${attrs({ 'prov:type': t, 'apexec:runRef': a.runRef, 'apexec:intentDigest': a.intentDigest, 'apexec:completionState': a.completionState ? `apexec:${a.completionState}` : undefined, 'apexec:receiptDigest': a.receiptDigest, 'apexec:usedPlanContentHash': a.usedPlanContentHash, 'apexec:authorityDecision': a.authorityDecision, 'apexec:afterApproval': a.afterApproval, 'apexec:chainDigest': a.chainDigest, 'apexec:errorClass': a.errorClass, 'apexec:realizesCapability': a.realizesCapability, 'apexec:traceId': a.traceId, 'apexec:spanId': a.spanId })})`);
|
|
147
|
+
if (a.failed)
|
|
148
|
+
body.push(`${indent}activity(${iri(a.id)}, -, -, [prov:type="ep-plan:FailedActivity"])`);
|
|
149
|
+
body.push(`${indent}wasAssociatedWith(${iri(a.id)}, ${iri(a.wasAssociatedWith)}, ${a.hadPlan ? iri(a.hadPlan) : '-'}${a.hadRole ? `, [prov:role=${q(a.hadRole)}]` : ''})`);
|
|
150
|
+
if (a.executionPlan)
|
|
151
|
+
body.push(`${indent}wasAssociatedWith(${iri(a.id)}, ${iri(a.wasAssociatedWith)}, ${iri(a.executionPlan)})`);
|
|
152
|
+
if (a.onBehalfOf)
|
|
153
|
+
body.push(`${indent}actedOnBehalfOf(${iri(a.wasAssociatedWith)}, ${iri(a.onBehalfOf)}, ${iri(a.id)})`);
|
|
154
|
+
if (a.usedDelegation)
|
|
155
|
+
body.push(`${indent}used(${iri(a.id)}, ${iri(a.usedDelegation)}, -, [prov:type="apvr:usedDelegation"])`);
|
|
156
|
+
for (const u of a.used)
|
|
157
|
+
body.push(`${indent}used(${iri(a.id)}, ${iri(u)}, -)`);
|
|
158
|
+
for (const g of a.generated)
|
|
159
|
+
body.push(`${indent}wasGeneratedBy(${iri(g)}, ${iri(a.id)}, ${a.endedAt ?? '-'})`);
|
|
160
|
+
for (const w of a.wasInformedBy ?? [])
|
|
161
|
+
body.push(`${indent}wasInformedBy(${iri(a.id)}, ${iri(w)})`);
|
|
162
|
+
for (const s of a.hasStep ?? [])
|
|
163
|
+
body.push(`${indent}wasInfluencedBy(${iri(s)}, ${iri(a.id)}, [prov:type="apexec:hasStep"])`);
|
|
164
|
+
if (a.correspondsToStep)
|
|
165
|
+
body.push(`${indent}wasInfluencedBy(${iri(a.id)}, ${iri(a.correspondsToStep)}, [prov:type="p-plan:correspondsToStep"])`);
|
|
166
|
+
if (a.accountabilityRoot)
|
|
167
|
+
body.push(`${indent}wasInfluencedBy(${iri(a.id)}, ${iri(a.accountabilityRoot)}, [prov:type="apexec:accountabilityRoot"])`);
|
|
168
|
+
if (a.actorContext)
|
|
169
|
+
body.push(`${indent}used(${iri(a.id)}, ${iri(a.actorContext)}, -, [prov:type="apexec:actorContext"])`);
|
|
170
|
+
if (a.delegatedToAgent)
|
|
171
|
+
body.push(`${indent}wasInfluencedBy(${iri(a.id)}, ${iri(a.delegatedToAgent)}, [prov:type="apexec:delegatedToAgent"])`);
|
|
172
|
+
}
|
|
173
|
+
for (const e of record.entities) {
|
|
174
|
+
body.push(`${indent}entity(${iri(e.id)}${attrs({ 'prov:type': e.type === 'Delegation' ? 'apdel:Delegation' : e.type === 'Playbook' ? 'apguide:AgentSkillPackage' : e.type === 'ExecutionPlan' ? 'apexec:ExecutionPlan' : `apexec:${e.type}`, 'apexec:effectProduces': e.effectProduces, 'apexec:effectSucceeded': e.effectSucceeded, 'apexec:decisionPoint': e.decisionPoint, 'apexec:decisionRule': e.decisionRule, 'apexec:artifactDigest': e.artifactDigest, 'apexec:artifactBytes': e.artifactBytes !== undefined ? String(e.artifactBytes) : undefined })})`);
|
|
175
|
+
if (e.wasAttributedTo)
|
|
176
|
+
body.push(`${indent}wasAttributedTo(${iri(e.id)}, ${iri(e.wasAttributedTo)})`);
|
|
177
|
+
if (e.wasRevisionOf)
|
|
178
|
+
body.push(`${indent}wasRevisionOf(${iri(e.id)}, ${iri(e.wasRevisionOf)})`);
|
|
179
|
+
for (const d of e.wasDerivedFrom ?? [])
|
|
180
|
+
body.push(`${indent}wasDerivedFrom(${iri(e.id)}, ${iri(d)})`);
|
|
181
|
+
if (e.actingAgent)
|
|
182
|
+
body.push(`${indent}wasInfluencedBy(${iri(e.id)}, ${iri(e.actingAgent)}, [prov:type="apactor:actingAgent"])`);
|
|
183
|
+
if (e.originatingAgent)
|
|
184
|
+
body.push(`${indent}wasInfluencedBy(${iri(e.id)}, ${iri(e.originatingAgent)}, [prov:type="apactor:originatingAgent"])`);
|
|
185
|
+
if (e.rootPrincipal)
|
|
186
|
+
body.push(`${indent}wasInfluencedBy(${iri(e.id)}, ${iri(e.rootPrincipal)}, [prov:type="apactor:rootPrincipal"])`);
|
|
187
|
+
}
|
|
188
|
+
for (const p of record.plans) {
|
|
189
|
+
body.push(`${indent}entity(${iri(p.id)}, [prov:type="${p.kind === 'ExecutionPlan' ? 'apexec:ExecutionPlan' : p.kind === 'Playbook' ? 'apguide:AgentSkillPackage' : p.kind === 'CoordinationPlan' ? 'apcoord:CoordinationPlan' : 'p-plan:Plan'}"])`);
|
|
190
|
+
for (const s of p.steps) {
|
|
191
|
+
body.push(`${indent}entity(${iri(s.id)}, [prov:type="p-plan:Step", p-plan:isStepOfPlan=${q(iriOf(s.isStepOfPlan, opts.chainId))}])`);
|
|
192
|
+
if (s.isPrecededBy)
|
|
193
|
+
body.push(`${indent}wasInfluencedBy(${iri(s.id)}, ${iri(s.isPrecededBy)}, [prov:type="p-plan:isPrecededBy"])`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (record.bundle) {
|
|
197
|
+
lines.push(` bundle ${iri(record.bundle.id)}`);
|
|
198
|
+
lines.push(...body);
|
|
199
|
+
lines.push(' endBundle');
|
|
200
|
+
lines.push(` entity(${iri(record.bundle.id)}, [prov:type="ep-plan:ExecutionTraceBundle"])`);
|
|
201
|
+
if (record.bundle.wasAttributedTo)
|
|
202
|
+
lines.push(` wasAttributedTo(${iri(record.bundle.id)}, ${iri(record.bundle.wasAttributedTo)})`);
|
|
203
|
+
for (const w of record.bundle.wasInformedBy ?? [])
|
|
204
|
+
lines.push(` wasDerivedFrom(${iri(record.bundle.id)}, ${iri(w)}, [prov:type="prov:wasInformedBy"])`);
|
|
205
|
+
}
|
|
206
|
+
else
|
|
207
|
+
lines.push(...body);
|
|
208
|
+
lines.push('endDocument');
|
|
209
|
+
return lines.join('\n') + '\n';
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=serialize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../src/serialize.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C;oDACoD;AACpD,MAAM,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ROV-O agent (`prov:Agent`), classified per ADR-0046. */
|
|
4
4
|
export interface ProvAgentRef {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
/** Person / org / service (ADR-0046). Absent when the projector was not told — a graph says `ap:Agent`
|
|
7
|
+
* and nothing more, rather than a class it guessed (the knowledge plane's plausible-falsehood failure). */
|
|
8
|
+
agentClass?: AgentClass;
|
|
9
|
+
/** Spec 389 — `AgentRuntime` for the identified runtime (`apexec:AgentRuntime ⊑ prov:SoftwareAgent`) that
|
|
10
|
+
* bore responsibility for a run; default `Agent`. */
|
|
11
|
+
kind?: 'Agent' | 'AgentRuntime';
|
|
12
|
+
/** `prov:actedOnBehalfOf` — the agent this one acted for (the runtime for its Smart Agent; a delegate
|
|
13
|
+
* for its delegator). Private detail (the S1 firewall rejects it from any public row). */
|
|
14
|
+
actedOnBehalfOf?: string;
|
|
7
15
|
}
|
|
8
|
-
/** `
|
|
9
|
-
* (T2) — all `⊑ prov:Activity` (§6).
|
|
10
|
-
|
|
16
|
+
/** `apix:CommunicationDelivery` (T0) / `apix:IntentInvocation` (T1) / `apix:OrchestratedTask ≡ apful:Task`
|
|
17
|
+
* (T2) — all `⊑ prov:Activity` (§6). Spec 332 §7 adds the coordination activities: `EndeavorAdoption`,
|
|
18
|
+
* `PlanProposal`, `PlanAdoption`, and the per-step `StepExecution` (an `apexec:ServiceExecution` /
|
|
19
|
+
* `apful:Task` activity carrying `p-plan:correspondsToStep`). */
|
|
20
|
+
export type ProvActivityType = 'CommunicationDelivery' | 'IntentInvocation' | 'OrchestratedTask' | 'EndeavorAdoption' | 'PlanProposal' | 'PlanAdoption' | 'StepExecution'
|
|
21
|
+
/** Spec 389 — a harness run (`apexec:ServiceExecution`); its steps are `StepExecution`s it `hasStep`. */
|
|
22
|
+
| 'HarnessRun';
|
|
11
23
|
export interface ProvActivity {
|
|
12
24
|
id: string;
|
|
13
25
|
type: ProvActivityType;
|
|
@@ -16,15 +28,56 @@ export interface ProvActivity {
|
|
|
16
28
|
endedAt?: string;
|
|
17
29
|
/** `prov:wasAssociatedWith` — the acting agent id. */
|
|
18
30
|
wasAssociatedWith: string;
|
|
19
|
-
/** `
|
|
31
|
+
/** `apvr:usedDelegation`/`usedStatusEvidence ⊑ prov:used` — BY-HASH refs, never inline authority. */
|
|
20
32
|
used: string[];
|
|
21
|
-
/** `
|
|
33
|
+
/** `apvr:onBehalfOf ⊑ prov:actedOnBehalfOf` — **PRIVATE DETAIL ONLY** (the S1 firewall rejects it from any
|
|
22
34
|
* public row). */
|
|
23
35
|
onBehalfOf?: string;
|
|
24
36
|
/** `prov:generated` — entity ids this activity produced. */
|
|
25
37
|
generated: string[];
|
|
38
|
+
/** `p-plan:correspondsToStep` — the DURABLE `apcoord:PlanStep` this execution enacted (spec 332 §7). */
|
|
39
|
+
correspondsToStep?: string;
|
|
40
|
+
/** `prov:qualifiedAssociation[prov:hadPlan]` — the EXACT adopted plan revision entity id (spec 330 §9). */
|
|
41
|
+
hadPlan?: string;
|
|
42
|
+
/** `prov:qualifiedAssociation[prov:hadRole]` — the capacity the agent functioned in. Never a permission. */
|
|
43
|
+
hadRole?: string;
|
|
44
|
+
/** `ep-plan:FailedActivity` — the execution was interrupted / not completed. A first-class trace
|
|
45
|
+
* fact (tbox/plan.ttl), never silently dropped. */
|
|
46
|
+
failed?: boolean;
|
|
47
|
+
/** `apexec:hasStep` — the step activities this run contains (a run only). */
|
|
48
|
+
hasStep?: string[];
|
|
49
|
+
/** `apvr:usedDelegation ⊑ prov:used` — the mandate the step presented, by reference. */
|
|
50
|
+
usedDelegation?: string;
|
|
51
|
+
/** `prov:wasInformedBy` — activities this one was informed by (a hand-off step ← the child run). */
|
|
52
|
+
wasInformedBy?: string[];
|
|
53
|
+
/** A second `prov:qualifiedAssociation` (agent = the runtime, `hadPlan` = the run's own ExecutionPlan). */
|
|
54
|
+
executionPlan?: string;
|
|
55
|
+
runRef?: string;
|
|
56
|
+
intentDigest?: string;
|
|
57
|
+
/** `apexec:completionState` — one of the closed list (`Completed` … `Suspended`). */
|
|
58
|
+
completionState?: string;
|
|
59
|
+
receiptDigest?: string;
|
|
60
|
+
usedPlanContentHash?: string;
|
|
61
|
+
/** `apexec:realizesCapability` — the capability id the step realized (a `aps:Capability` IRI or id). */
|
|
62
|
+
realizesCapability?: string;
|
|
63
|
+
authorityDecision?: string;
|
|
64
|
+
afterApproval?: boolean;
|
|
65
|
+
chainDigest?: string;
|
|
66
|
+
accountabilityRoot?: string;
|
|
67
|
+
/** `apexec:actorContext` — the ActorContext entity id. */
|
|
68
|
+
actorContext?: string;
|
|
69
|
+
/** `apexec:delegatedToAgent` — the agent a step was handed to. */
|
|
70
|
+
delegatedToAgent?: string;
|
|
71
|
+
errorClass?: string;
|
|
72
|
+
/** Spec 390 — the OpenTelemetry span this activity IS (W3C-sized hex ids). Correlation, never trust. */
|
|
73
|
+
traceId?: string;
|
|
74
|
+
spanId?: string;
|
|
26
75
|
}
|
|
27
|
-
export type ProvEntityType = 'Message' | 'Artifact' | 'DecisionArtifact'
|
|
76
|
+
export type ProvEntityType = 'Message' | 'Artifact' | 'DecisionArtifact' | 'EndeavorRequest' | 'OutcomeSpecification' | 'PlanRevision'
|
|
77
|
+
/** The RUN-SPECIFIC `apexec:ExecutionPlan` a PlanStep compiled into (ADR-0054 §3 trichotomy). */
|
|
78
|
+
| 'ExecutionPlan' | 'Attestation' | 'Delegation' | 'Playbook' | 'StepReceipt' | 'ChainTransaction' | 'Effect' | 'DecisionRecord' | 'ActorContext'
|
|
79
|
+
/** Spec 391 — a step's raw result, offloaded to the acting agent's vault. */
|
|
80
|
+
| 'RunArtifact';
|
|
28
81
|
export interface ProvEntity {
|
|
29
82
|
id: string;
|
|
30
83
|
type: ProvEntityType;
|
|
@@ -32,6 +85,23 @@ export interface ProvEntity {
|
|
|
32
85
|
wasGeneratedBy?: string;
|
|
33
86
|
/** Vault-resident ref (hash / VaultRef) — NEVER inline plaintext. */
|
|
34
87
|
ref?: string;
|
|
88
|
+
/** `prov:wasRevisionOf` — the prior revision entity id (plan revision chains, spec 332 §7). */
|
|
89
|
+
wasRevisionOf?: string;
|
|
90
|
+
/** `prov:wasDerivedFrom` — contributing entity ids (outcome attestations derive from artifacts). */
|
|
91
|
+
wasDerivedFrom?: string[];
|
|
92
|
+
/** `prov:wasAttributedTo` — the agent an entity is attributed to (a playbook to its author's agent is NOT
|
|
93
|
+
* recorded — only the commitment is; a receipt to the acting agent). */
|
|
94
|
+
wasAttributedTo?: string;
|
|
95
|
+
effectProduces?: string;
|
|
96
|
+
effectSucceeded?: boolean;
|
|
97
|
+
decisionPoint?: string;
|
|
98
|
+
decisionRule?: string;
|
|
99
|
+
actingAgent?: string;
|
|
100
|
+
originatingAgent?: string;
|
|
101
|
+
rootPrincipal?: string;
|
|
102
|
+
/** Spec 391 — an offloaded artifact's size and digest. */
|
|
103
|
+
artifactBytes?: number;
|
|
104
|
+
artifactDigest?: string;
|
|
35
105
|
}
|
|
36
106
|
/** P-Plan (`tbox/plan.ttl`) — grounds an orchestration `Plan` (and a service-agent `PrimitivePlan`) as
|
|
37
107
|
* `p-plan:Plan`; steps are `p-plan:Step` via `isStepOfPlan` (§6). */
|
|
@@ -39,10 +109,23 @@ export interface PPlanStep {
|
|
|
39
109
|
id: string;
|
|
40
110
|
toolId: string;
|
|
41
111
|
isStepOfPlan: string;
|
|
112
|
+
/** `ep-plan:isDecomposedAsPlan` — the run-specific ExecutionPlan ENTITY id this step compiled
|
|
113
|
+
* into (the CoordinationPlan→ExecutionPlan bridge, named; emitted alongside the run plan's
|
|
114
|
+
* `prov:wasDerivedFrom` back to the adopted revision). */
|
|
115
|
+
isDecomposedAsPlan?: string;
|
|
116
|
+
/** `p-plan:isPrecededBy` — the step before this one in the plan's order. */
|
|
117
|
+
isPrecededBy?: string;
|
|
42
118
|
}
|
|
43
119
|
export interface PPlanPlan {
|
|
44
120
|
id: string;
|
|
45
121
|
steps: PPlanStep[];
|
|
122
|
+
/** Spec 389 — which plan variant (ADR-0054 §3 trichotomy): the run's own `apexec:ExecutionPlan`, a
|
|
123
|
+
* playbook (`apguide:AgentSkillPackage`, prescriptive procedure), a durable `apcoord:CoordinationPlan`.
|
|
124
|
+
* Absent ⇒ `p-plan:Plan` only. */
|
|
125
|
+
kind?: 'ExecutionPlan' | 'Playbook' | 'CoordinationPlan';
|
|
126
|
+
/** For a playbook: `apexec:usedPlanContentHash` is carried on the run; the plan entity itself is named
|
|
127
|
+
* by skill id, version and commitment. Vault ref / hash of the plan content when one exists. */
|
|
128
|
+
ref?: string;
|
|
46
129
|
}
|
|
47
130
|
/** The PRIVATE vault A-box the projector writes — the ONLY surface this package emits. It NEVER writes the
|
|
48
131
|
* public discovery KB (that has exactly one writer, the indexer, projecting on-chain facts; §6 / B1). */
|
|
@@ -52,5 +135,16 @@ export interface ProvenanceRecordV1 {
|
|
|
52
135
|
activities: ProvActivity[];
|
|
53
136
|
entities: ProvEntity[];
|
|
54
137
|
plans: PPlanPlan[];
|
|
138
|
+
/** `ep-plan:ExecutionTraceBundle` (⊑ prov:Bundle) — names THIS record as one bundle; every
|
|
139
|
+
* agent/activity/entity above is an `ep-plan:hasTraceElement` member. Set by per-execution
|
|
140
|
+
* projections (one Endeavor = one bundle); absent on partial/merged records. */
|
|
141
|
+
bundle?: {
|
|
142
|
+
id: string;
|
|
143
|
+
/** Spec 389 — the sender's bundle for a routed / handed-off run (`prov:wasInformedBy`), so a run across
|
|
144
|
+
* two Homes reads as one graph from either side, each holding only its own bundle. */
|
|
145
|
+
wasInformedBy?: string[];
|
|
146
|
+
/** `prov:wasAttributedTo` — whose bundle this is (the acting agent — the vault it lives in). */
|
|
147
|
+
wasAttributedTo?: string;
|
|
148
|
+
};
|
|
55
149
|
}
|
|
56
150
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,M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AC;CACd;AAED;0GAC0G;AAC1G,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;qFAEiF;IACjF,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX;+FACuF;QACvF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,gGAAgG;QAChG,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticprimitives/provenance",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.2",
|
|
4
4
|
"description": "The Ring-0 provenance projector (spec 316 §6): maps fabric exchanges + orchestration runs to a PRIVATE PROV-O / P-Plan A-box, and enforces the ADR-0040 public-projection firewall (S1). Sole writer of the private vault A-box; NEVER writes the public KB.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|