@agenticprimitives/coordination 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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/core/commands.d.ts +179 -0
- package/dist/core/commands.d.ts.map +1 -0
- package/dist/core/commands.js +26 -0
- package/dist/core/commands.js.map +1 -0
- package/dist/core/events.d.ts +163 -0
- package/dist/core/events.d.ts.map +1 -0
- package/dist/core/events.js +2 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/ids.d.ts +31 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/ids.js +36 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/provenance.d.ts +29 -0
- package/dist/core/provenance.d.ts.map +1 -0
- package/dist/core/provenance.js +175 -0
- package/dist/core/provenance.js.map +1 -0
- package/dist/core/reducer.d.ts +50 -0
- package/dist/core/reducer.d.ts.map +1 -0
- package/dist/core/reducer.js +1164 -0
- package/dist/core/reducer.js.map +1 -0
- package/dist/core/types.d.ts +106 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +22 -0
- package/dist/core/types.js.map +1 -0
- package/dist/decisions/index.d.ts +17 -0
- package/dist/decisions/index.d.ts.map +1 -0
- package/dist/decisions/index.js +6 -0
- package/dist/decisions/index.js.map +1 -0
- package/dist/decisions/triage.d.ts +30 -0
- package/dist/decisions/triage.d.ts.map +1 -0
- package/dist/decisions/triage.js +66 -0
- package/dist/decisions/triage.js.map +1 -0
- package/dist/decisions/types.d.ts +39 -0
- package/dist/decisions/types.d.ts.map +1 -0
- package/dist/decisions/types.js +2 -0
- package/dist/decisions/types.js.map +1 -0
- package/dist/execution/compile.d.ts +60 -0
- package/dist/execution/compile.d.ts.map +1 -0
- package/dist/execution/compile.js +83 -0
- package/dist/execution/compile.js.map +1 -0
- package/dist/execution/index.d.ts +3 -0
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +2 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/participation/index.d.ts +2 -0
- package/dist/participation/index.d.ts.map +1 -0
- package/dist/participation/index.js +2 -0
- package/dist/participation/index.js.map +1 -0
- package/dist/participation/types.d.ts +66 -0
- package/dist/participation/types.d.ts.map +1 -0
- package/dist/participation/types.js +2 -0
- package/dist/participation/types.js.map +1 -0
- package/dist/planning/hash.d.ts +8 -0
- package/dist/planning/hash.d.ts.map +1 -0
- package/dist/planning/hash.js +20 -0
- package/dist/planning/hash.js.map +1 -0
- package/dist/planning/index.d.ts +5 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +3 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/types.d.ts +75 -0
- package/dist/planning/types.d.ts.map +1 -0
- package/dist/planning/types.js +2 -0
- package/dist/planning/types.js.map +1 -0
- package/dist/planning/validate.d.ts +13 -0
- package/dist/planning/validate.d.ts.map +1 -0
- package/dist/planning/validate.js +55 -0
- package/dist/planning/validate.js.map +1 -0
- package/dist/profiles/index.d.ts +11 -0
- package/dist/profiles/index.d.ts.map +1 -0
- package/dist/profiles/index.js +3 -0
- package/dist/profiles/index.js.map +1 -0
- package/dist/projections/index.d.ts +8 -0
- package/dist/projections/index.d.ts.map +1 -0
- package/dist/projections/index.js +3 -0
- package/dist/projections/index.js.map +1 -0
- package/package.json +78 -0
- package/spec.md +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agentic Trust Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @agenticprimitives/coordination
|
|
2
|
+
|
|
3
|
+
The **Endeavor** coordination core (spec 332, Wave 1): a durable, shared, multi-principal coordination
|
|
4
|
+
object — *someone posted a request; the group adopted it as a goal; a shared plan was proposed, revised,
|
|
5
|
+
and adopted; participants were allocated and committed; work executed against plan steps; the outcome was
|
|
6
|
+
validated* — expressed as a pure, deterministic, event-sourced machine.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add @agenticprimitives/coordination
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Subpath exports: `.` (everything), `./core` (records, commands, events, reducer, provenance inputs),
|
|
15
|
+
`./planning` (plans, steps, edges, milestones, content hash, acyclicity), `./participation`
|
|
16
|
+
(participations, proposals, allocations, signed commitments). `./profiles`, `./decisions`, and
|
|
17
|
+
`./projections` are reserved stubs whose real contents land with spec 333/334.
|
|
18
|
+
|
|
19
|
+
## Model
|
|
20
|
+
|
|
21
|
+
- **`EndeavorRequestV1`** — structured intake before adoption (`ereq_` id). Any entry point (Home
|
|
22
|
+
request, discussion ask, inbox ask, A2A intent) produces the same request and drives the same
|
|
23
|
+
machinery.
|
|
24
|
+
- **`EndeavorV1`** — the durable multi-principal Situation (`end_` id) pursuing an
|
|
25
|
+
`OutcomeSpecificationV1` (observable success criteria, versioned).
|
|
26
|
+
- **`CoordinationPlanV1`** — the durable *shared* plan (`p-plan:Plan` grounding). Revisions are
|
|
27
|
+
immutable; `planContentHash` is `sha256(JCS(steps + edges + milestones))`; adoption is an explicit
|
|
28
|
+
decision, never implicit; at most one revision is adopted at a time.
|
|
29
|
+
- **`EndeavorParticipationV1`** — a participant's relationship to the Endeavor (role + scope +
|
|
30
|
+
validity), asserted through invitation/acceptance or allocation/commitment.
|
|
31
|
+
- **`ContributionProposalV1` → `AllocationDecisionV1` → `ContributionCommitmentV1`** — offer,
|
|
32
|
+
selection, and the participant's *signed* acceptance. A commitment binds an **exact plan revision
|
|
33
|
+
hash**; a stale hash is rejected.
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import {
|
|
39
|
+
initialCoordinationState,
|
|
40
|
+
validateCoordinationCommand,
|
|
41
|
+
applyCoordinationEvent,
|
|
42
|
+
deriveProvenanceInputs,
|
|
43
|
+
} from '@agenticprimitives/coordination/core';
|
|
44
|
+
|
|
45
|
+
let state = initialCoordinationState();
|
|
46
|
+
const result = validateCoordinationCommand(state, {
|
|
47
|
+
kind: 'SubmitEndeavorRequest',
|
|
48
|
+
actor: requesterAddress,
|
|
49
|
+
issuedAt: new Date().toISOString(),
|
|
50
|
+
requestId: 'ereq_1',
|
|
51
|
+
targetPrincipal: orgAddress,
|
|
52
|
+
goal: 'Produce the Q3 treasury report',
|
|
53
|
+
entryPoint: 'home-request',
|
|
54
|
+
});
|
|
55
|
+
if (!result.ok) throw new Error(result.reason);
|
|
56
|
+
for (const event of result.events) state = applyCoordinationEvent(state, event);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`validateCoordinationCommand` rejects before append (fail-closed) and returns the events to persist;
|
|
60
|
+
`applyCoordinationEvent` is a pure reducer that enforces monotonic revisions. Replaying the event log
|
|
61
|
+
always reproduces the state; `deriveProvenanceInputs(events)` yields a structural summary (entities,
|
|
62
|
+
activities, agents, `correspondsToStep` links) a P-Plan/PROV projection can consume.
|
|
63
|
+
|
|
64
|
+
## Invariants (spec 332 §6/§9)
|
|
65
|
+
|
|
66
|
+
1. **Allocation is never authority.** No gate reads an `apcoord:` record; `capable / available /
|
|
67
|
+
allocated / committed / authorized / performing / satisfied` are seven separate facts.
|
|
68
|
+
2. **Commitments are signed** by the participant against the exact adopted plan revision hash.
|
|
69
|
+
3. **Conversation never mutates state.** Only signed commands produce events; `PlanRejected` is the
|
|
70
|
+
only way a plan proposal dies; unknown command kinds are rejected fail-closed.
|
|
71
|
+
4. **One mechanism** (ADR-0013): the reducer is the only state-transition path.
|
|
72
|
+
5. **Deterministic:** ids and timestamps come from commands/events, never from the reducer.
|
|
73
|
+
|
|
74
|
+
## Boundaries
|
|
75
|
+
|
|
76
|
+
Depends on `@agenticprimitives/types`, `@agenticprimitives/situations` (EntityRef, validity, JCS), and
|
|
77
|
+
`@agenticprimitives/ontology` (`apcoord:` IRIs). Never imports fabric/home/a2a/delegation/vault —
|
|
78
|
+
those layers consume coordination. Vendor adapters (Linear, Jira, Temporal, LangGraph, …) live in
|
|
79
|
+
external repos; only `ExternalObjectBindingV1` (the adapter contract surface) ships here.
|
|
80
|
+
|
|
81
|
+
## Spec
|
|
82
|
+
|
|
83
|
+
[`specs/332-coordination-endeavor-core.md`](../../specs/332-coordination-endeavor-core.md) ·
|
|
84
|
+
[ADR-0054](../../docs/architecture/decisions/0054-coordination-endeavor-doctrine.md) · golden fixtures
|
|
85
|
+
in `test/fixtures/`.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { Address } from '@agenticprimitives/types';
|
|
2
|
+
import type { EntityRef, SituationId } from '@agenticprimitives/situations';
|
|
3
|
+
import type { AllocationId, CommitmentId, CoordinationPlanId, EndeavorId, EndeavorRequestId, ParticipationId, PlanStepId, ProposalId, RecommendationId } from './ids.js';
|
|
4
|
+
import type { ContextRef, EndeavorEntryPoint, OutcomeCriterionV1 } from './types.js';
|
|
5
|
+
import type { MilestoneDefinitionV1, PlanEdgeV1, PlanRevisionRef, PlanStepV1 } from '../planning/types.js';
|
|
6
|
+
import type { ParticipationRole, SignedPayloadRef } from '../participation/types.js';
|
|
7
|
+
import type { CoordinationCommandTemplate, RecommendationSubjectV1 } from '../decisions/types.js';
|
|
8
|
+
interface CommandBase {
|
|
9
|
+
actor: Address;
|
|
10
|
+
issuedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SubmitEndeavorRequestCommand extends CommandBase {
|
|
13
|
+
kind: 'SubmitEndeavorRequest';
|
|
14
|
+
requestId: EndeavorRequestId;
|
|
15
|
+
targetPrincipal: Address;
|
|
16
|
+
goal: string;
|
|
17
|
+
entryPoint: EndeavorEntryPoint;
|
|
18
|
+
intentRef?: EntityRef;
|
|
19
|
+
intakeContext?: ContextRef[];
|
|
20
|
+
profileRef?: EntityRef;
|
|
21
|
+
}
|
|
22
|
+
export interface AdoptEndeavorCommand extends CommandBase {
|
|
23
|
+
kind: 'AdoptEndeavor';
|
|
24
|
+
requestId: EndeavorRequestId;
|
|
25
|
+
endeavorId: EndeavorId;
|
|
26
|
+
situationId: SituationId;
|
|
27
|
+
title: string;
|
|
28
|
+
outcome: {
|
|
29
|
+
outcomeId: string;
|
|
30
|
+
criteria: OutcomeCriterionV1[];
|
|
31
|
+
};
|
|
32
|
+
initialParticipations: Array<{
|
|
33
|
+
participationId: ParticipationId;
|
|
34
|
+
participant: Address;
|
|
35
|
+
role: ParticipationRole;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export interface DeclineEndeavorRequestCommand extends CommandBase {
|
|
39
|
+
kind: 'DeclineEndeavorRequest';
|
|
40
|
+
requestId: EndeavorRequestId;
|
|
41
|
+
reason: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ReviseOutcomeCommand extends CommandBase {
|
|
44
|
+
kind: 'ReviseOutcome';
|
|
45
|
+
endeavorId: EndeavorId;
|
|
46
|
+
outcome: {
|
|
47
|
+
outcomeId: string;
|
|
48
|
+
criteria: OutcomeCriterionV1[];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface ProposePlanCommand extends CommandBase {
|
|
52
|
+
kind: 'ProposePlan';
|
|
53
|
+
endeavorId: EndeavorId;
|
|
54
|
+
planId: CoordinationPlanId;
|
|
55
|
+
revision: number;
|
|
56
|
+
steps: PlanStepV1[];
|
|
57
|
+
edges: PlanEdgeV1[];
|
|
58
|
+
milestones: MilestoneDefinitionV1[];
|
|
59
|
+
}
|
|
60
|
+
export interface AdoptPlanCommand extends CommandBase {
|
|
61
|
+
kind: 'AdoptPlan';
|
|
62
|
+
endeavorId: EndeavorId;
|
|
63
|
+
planRef: PlanRevisionRef;
|
|
64
|
+
}
|
|
65
|
+
export interface RejectPlanCommand extends CommandBase {
|
|
66
|
+
kind: 'RejectPlan';
|
|
67
|
+
endeavorId: EndeavorId;
|
|
68
|
+
planId: CoordinationPlanId;
|
|
69
|
+
revision: number;
|
|
70
|
+
reason?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface InviteParticipantCommand extends CommandBase {
|
|
73
|
+
kind: 'InviteParticipant';
|
|
74
|
+
endeavorId: EndeavorId;
|
|
75
|
+
participationId: ParticipationId;
|
|
76
|
+
participant: Address;
|
|
77
|
+
role: ParticipationRole;
|
|
78
|
+
scope?: PlanStepId[];
|
|
79
|
+
}
|
|
80
|
+
export interface AcceptParticipationCommand extends CommandBase {
|
|
81
|
+
kind: 'AcceptParticipation';
|
|
82
|
+
endeavorId: EndeavorId;
|
|
83
|
+
participationId: ParticipationId;
|
|
84
|
+
}
|
|
85
|
+
export interface WithdrawParticipationCommand extends CommandBase {
|
|
86
|
+
kind: 'WithdrawParticipation';
|
|
87
|
+
endeavorId: EndeavorId;
|
|
88
|
+
participationId: ParticipationId;
|
|
89
|
+
}
|
|
90
|
+
export interface ProposeContributionCommand extends CommandBase {
|
|
91
|
+
kind: 'ProposeContribution';
|
|
92
|
+
endeavorId: EndeavorId;
|
|
93
|
+
proposalId: ProposalId;
|
|
94
|
+
planRef: PlanRevisionRef;
|
|
95
|
+
steps: PlanStepId[];
|
|
96
|
+
note?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface AllocateContributionCommand extends CommandBase {
|
|
99
|
+
kind: 'AllocateContribution';
|
|
100
|
+
endeavorId: EndeavorId;
|
|
101
|
+
allocationId: AllocationId;
|
|
102
|
+
proposalRef: ProposalId;
|
|
103
|
+
participant: Address;
|
|
104
|
+
steps: PlanStepId[];
|
|
105
|
+
}
|
|
106
|
+
export interface CommitContributionCommand extends CommandBase {
|
|
107
|
+
kind: 'CommitContribution';
|
|
108
|
+
endeavorId: EndeavorId;
|
|
109
|
+
commitmentId: CommitmentId;
|
|
110
|
+
allocationRef: AllocationId;
|
|
111
|
+
planRef: PlanRevisionRef;
|
|
112
|
+
steps: PlanStepId[];
|
|
113
|
+
signature: SignedPayloadRef;
|
|
114
|
+
bounds?: {
|
|
115
|
+
deadline?: string;
|
|
116
|
+
effortEstimateRef?: EntityRef;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface WithdrawCommitmentCommand extends CommandBase {
|
|
120
|
+
kind: 'WithdrawCommitment';
|
|
121
|
+
endeavorId: EndeavorId;
|
|
122
|
+
commitmentId: CommitmentId;
|
|
123
|
+
reason?: string;
|
|
124
|
+
}
|
|
125
|
+
export interface ReallocateContributionCommand extends CommandBase {
|
|
126
|
+
kind: 'ReallocateContribution';
|
|
127
|
+
endeavorId: EndeavorId;
|
|
128
|
+
commitmentId: CommitmentId;
|
|
129
|
+
allocationId: AllocationId;
|
|
130
|
+
participant: Address;
|
|
131
|
+
}
|
|
132
|
+
export interface RecordStepSatisfiedCommand extends CommandBase {
|
|
133
|
+
kind: 'RecordStepSatisfied';
|
|
134
|
+
endeavorId: EndeavorId;
|
|
135
|
+
stepId: PlanStepId;
|
|
136
|
+
evidenceRefs: EntityRef[];
|
|
137
|
+
}
|
|
138
|
+
export interface RecordMilestoneAchievedCommand extends CommandBase {
|
|
139
|
+
kind: 'RecordMilestoneAchieved';
|
|
140
|
+
endeavorId: EndeavorId;
|
|
141
|
+
milestoneId: string;
|
|
142
|
+
evidenceRefs: EntityRef[];
|
|
143
|
+
}
|
|
144
|
+
export interface SatisfyEndeavorCommand extends CommandBase {
|
|
145
|
+
kind: 'SatisfyEndeavor';
|
|
146
|
+
endeavorId: EndeavorId;
|
|
147
|
+
outcomeValidationRef: EntityRef;
|
|
148
|
+
}
|
|
149
|
+
export interface AbandonEndeavorCommand extends CommandBase {
|
|
150
|
+
kind: 'AbandonEndeavor';
|
|
151
|
+
endeavorId: EndeavorId;
|
|
152
|
+
reason?: string;
|
|
153
|
+
}
|
|
154
|
+
/** spec 333 §3 / spec 334 §10 (W4 minimal slice) — the actor is the RECOMMENDING agent. */
|
|
155
|
+
export interface ProposeRecommendationCommand extends CommandBase {
|
|
156
|
+
kind: 'ProposeRecommendation';
|
|
157
|
+
recommendationId: RecommendationId;
|
|
158
|
+
subject: RecommendationSubjectV1;
|
|
159
|
+
/** Recommendation class, e.g. 'duplicate-goal', 'triage-classification'. */
|
|
160
|
+
recommendationKind: string;
|
|
161
|
+
proposedCommands: CoordinationCommandTemplate[];
|
|
162
|
+
confidence?: number;
|
|
163
|
+
explanation: string;
|
|
164
|
+
evidenceRefs?: EntityRef[];
|
|
165
|
+
}
|
|
166
|
+
/** Steward/principal decision on a proposed recommendation. Acceptance NEVER applies the
|
|
167
|
+
* templates — the serving plane replays them through ordinary command validation. */
|
|
168
|
+
export interface ResolveRecommendationCommand extends CommandBase {
|
|
169
|
+
kind: 'ResolveRecommendation';
|
|
170
|
+
recommendationId: RecommendationId;
|
|
171
|
+
resolution: 'accepted' | 'rejected';
|
|
172
|
+
reason?: string;
|
|
173
|
+
}
|
|
174
|
+
export type CoordinationCommandV1 = SubmitEndeavorRequestCommand | AdoptEndeavorCommand | DeclineEndeavorRequestCommand | ReviseOutcomeCommand | ProposePlanCommand | AdoptPlanCommand | RejectPlanCommand | InviteParticipantCommand | AcceptParticipationCommand | WithdrawParticipationCommand | ProposeContributionCommand | AllocateContributionCommand | CommitContributionCommand | WithdrawCommitmentCommand | ReallocateContributionCommand | RecordStepSatisfiedCommand | RecordMilestoneAchievedCommand | SatisfyEndeavorCommand | AbandonEndeavorCommand | ProposeRecommendationCommand | ResolveRecommendationCommand;
|
|
175
|
+
/** Every coordination command kind — the set `CoordinationCommandTemplate.kind` must name
|
|
176
|
+
* (validated at ProposeRecommendation time: templates are typed, never free-form). */
|
|
177
|
+
export declare const COORDINATION_COMMAND_KINDS: ReadonlySet<string>;
|
|
178
|
+
export {};
|
|
179
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/core/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrF,OAA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AC;IACnC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAC7B,4BAA4B,GAC5B,oBAAoB,GACpB,6BAA6B,GAC7B,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,wBAAwB,GACxB,0BAA0B,GAC1B,4BAA4B,GAC5B,0BAA0B,GAC1B,2BAA2B,GAC3B,yBAAyB,GACzB,yBAAyB,GACzB,6BAA6B,GAC7B,0BAA0B,GAC1B,8BAA8B,GAC9B,sBAAsB,GACtB,sBAAsB,GACtB,4BAA4B,GAC5B,4BAA4B,CAAC;AAEjC;uFACuF;AACvF,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAsBzD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Every coordination command kind — the set `CoordinationCommandTemplate.kind` must name
|
|
2
|
+
* (validated at ProposeRecommendation time: templates are typed, never free-form). */
|
|
3
|
+
export const COORDINATION_COMMAND_KINDS = new Set([
|
|
4
|
+
'SubmitEndeavorRequest',
|
|
5
|
+
'AdoptEndeavor',
|
|
6
|
+
'DeclineEndeavorRequest',
|
|
7
|
+
'ReviseOutcome',
|
|
8
|
+
'ProposePlan',
|
|
9
|
+
'AdoptPlan',
|
|
10
|
+
'RejectPlan',
|
|
11
|
+
'InviteParticipant',
|
|
12
|
+
'AcceptParticipation',
|
|
13
|
+
'WithdrawParticipation',
|
|
14
|
+
'ProposeContribution',
|
|
15
|
+
'AllocateContribution',
|
|
16
|
+
'CommitContribution',
|
|
17
|
+
'WithdrawCommitment',
|
|
18
|
+
'ReallocateContribution',
|
|
19
|
+
'RecordStepSatisfied',
|
|
20
|
+
'RecordMilestoneAchieved',
|
|
21
|
+
'SatisfyEndeavor',
|
|
22
|
+
'AbandonEndeavor',
|
|
23
|
+
'ProposeRecommendation',
|
|
24
|
+
'ResolveRecommendation',
|
|
25
|
+
]);
|
|
26
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/core/commands.ts"],"names":[],"mappings":"AA4NA;uFACuF;AACvF,MAAM,CAAC,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAgC;IACpG,uBAAuB;IACvB,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,uBAAuB;IACvB,qBAAqB;IACrB,sBAAsB;IACtB,oBAAoB;IACpB,oBAAoB;IACpB,wBAAwB;IACxB,qBAAqB;IACrB,yBAAyB;IACzB,iBAAiB;IACjB,iBAAiB;IACjB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { Address, Hex32 } from '@agenticprimitives/types';
|
|
2
|
+
import type { EntityRef, SituationId } from '@agenticprimitives/situations';
|
|
3
|
+
import type { AllocationId, CommitmentId, CoordinationPlanId, EndeavorId, EndeavorRequestId, ParticipationId, PlanStepId, ProposalId, RecommendationId } from './ids.js';
|
|
4
|
+
import type { EndeavorRequestV1, OutcomeSpecificationV1 } from './types.js';
|
|
5
|
+
import type { RecommendationV1 } from '../decisions/types.js';
|
|
6
|
+
import type { MilestoneDefinitionV1, PlanEdgeV1, PlanRevisionRef, PlanStepV1 } from '../planning/types.js';
|
|
7
|
+
import type { ParticipationRole, SignedPayloadRef } from '../participation/types.js';
|
|
8
|
+
interface EventBase {
|
|
9
|
+
eventId: string;
|
|
10
|
+
occurredAt: string;
|
|
11
|
+
revision: number;
|
|
12
|
+
}
|
|
13
|
+
interface EndeavorEventBase extends EventBase {
|
|
14
|
+
endeavorId: EndeavorId;
|
|
15
|
+
}
|
|
16
|
+
export interface EndeavorRequestSubmittedEvent extends EventBase {
|
|
17
|
+
kind: 'EndeavorRequestSubmitted';
|
|
18
|
+
requestId: EndeavorRequestId;
|
|
19
|
+
request: EndeavorRequestV1;
|
|
20
|
+
}
|
|
21
|
+
export interface EndeavorRequestDeclinedEvent extends EventBase {
|
|
22
|
+
kind: 'EndeavorRequestDeclined';
|
|
23
|
+
requestId: EndeavorRequestId;
|
|
24
|
+
declinedBy: Address;
|
|
25
|
+
reason: string;
|
|
26
|
+
}
|
|
27
|
+
export interface EndeavorAdoptedEvent extends EndeavorEventBase {
|
|
28
|
+
kind: 'EndeavorAdopted';
|
|
29
|
+
requestId: EndeavorRequestId;
|
|
30
|
+
managingPrincipal: Address;
|
|
31
|
+
situationId: SituationId;
|
|
32
|
+
title: string;
|
|
33
|
+
outcome: OutcomeSpecificationV1;
|
|
34
|
+
}
|
|
35
|
+
export interface OutcomeRevisedEvent extends EndeavorEventBase {
|
|
36
|
+
kind: 'OutcomeRevised';
|
|
37
|
+
outcome: OutcomeSpecificationV1;
|
|
38
|
+
}
|
|
39
|
+
export interface PlanProposedEvent extends EndeavorEventBase {
|
|
40
|
+
kind: 'PlanProposed';
|
|
41
|
+
planId: CoordinationPlanId;
|
|
42
|
+
planRevision: number;
|
|
43
|
+
contentHash: Hex32;
|
|
44
|
+
steps: PlanStepV1[];
|
|
45
|
+
edges: PlanEdgeV1[];
|
|
46
|
+
milestones: MilestoneDefinitionV1[];
|
|
47
|
+
proposedBy: Address;
|
|
48
|
+
}
|
|
49
|
+
export interface PlanAdoptedEvent extends EndeavorEventBase {
|
|
50
|
+
kind: 'PlanAdopted';
|
|
51
|
+
planRef: PlanRevisionRef;
|
|
52
|
+
adoptedBy: Address;
|
|
53
|
+
supersededPlanRef?: PlanRevisionRef;
|
|
54
|
+
}
|
|
55
|
+
export interface PlanRejectedEvent extends EndeavorEventBase {
|
|
56
|
+
kind: 'PlanRejected';
|
|
57
|
+
planId: CoordinationPlanId;
|
|
58
|
+
planRevision: number;
|
|
59
|
+
rejectedBy: Address;
|
|
60
|
+
reason?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ParticipationInvitedEvent extends EndeavorEventBase {
|
|
63
|
+
kind: 'ParticipationInvited';
|
|
64
|
+
participationId: ParticipationId;
|
|
65
|
+
participant: Address;
|
|
66
|
+
role: ParticipationRole;
|
|
67
|
+
invitedBy: Address;
|
|
68
|
+
scope?: PlanStepId[];
|
|
69
|
+
}
|
|
70
|
+
export interface ParticipationAssertedEvent extends EndeavorEventBase {
|
|
71
|
+
kind: 'ParticipationAsserted';
|
|
72
|
+
participationId: ParticipationId;
|
|
73
|
+
participant: Address;
|
|
74
|
+
role: ParticipationRole;
|
|
75
|
+
assertedBy: 'invitation-acceptance' | 'allocation-commitment' | 'self-sponsor';
|
|
76
|
+
scope?: PlanStepId[];
|
|
77
|
+
}
|
|
78
|
+
export interface ParticipationWithdrawnEvent extends EndeavorEventBase {
|
|
79
|
+
kind: 'ParticipationWithdrawn';
|
|
80
|
+
participationId: ParticipationId;
|
|
81
|
+
}
|
|
82
|
+
export interface ContributionProposedEvent extends EndeavorEventBase {
|
|
83
|
+
kind: 'ContributionProposed';
|
|
84
|
+
proposalId: ProposalId;
|
|
85
|
+
proposer: Address;
|
|
86
|
+
planRef: PlanRevisionRef;
|
|
87
|
+
steps: PlanStepId[];
|
|
88
|
+
note?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ContributionAllocatedEvent extends EndeavorEventBase {
|
|
91
|
+
kind: 'ContributionAllocated';
|
|
92
|
+
allocationId: AllocationId;
|
|
93
|
+
proposalRef: ProposalId;
|
|
94
|
+
participant: Address;
|
|
95
|
+
steps: PlanStepId[];
|
|
96
|
+
decidedBy: Address;
|
|
97
|
+
}
|
|
98
|
+
export interface ContributionCommittedEvent extends EndeavorEventBase {
|
|
99
|
+
kind: 'ContributionCommitted';
|
|
100
|
+
commitmentId: CommitmentId;
|
|
101
|
+
allocationRef: AllocationId;
|
|
102
|
+
participant: Address;
|
|
103
|
+
planRef: PlanRevisionRef;
|
|
104
|
+
steps: PlanStepId[];
|
|
105
|
+
signature: SignedPayloadRef;
|
|
106
|
+
bounds?: {
|
|
107
|
+
deadline?: string;
|
|
108
|
+
effortEstimateRef?: EntityRef;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface CommitmentWithdrawnEvent extends EndeavorEventBase {
|
|
112
|
+
kind: 'CommitmentWithdrawn';
|
|
113
|
+
commitmentId: CommitmentId;
|
|
114
|
+
reason?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface ContributionReallocatedEvent extends EndeavorEventBase {
|
|
117
|
+
kind: 'ContributionReallocated';
|
|
118
|
+
commitmentId: CommitmentId;
|
|
119
|
+
allocationId: AllocationId;
|
|
120
|
+
participant: Address;
|
|
121
|
+
decidedBy: Address;
|
|
122
|
+
}
|
|
123
|
+
export interface PlanStepSatisfiedEvent extends EndeavorEventBase {
|
|
124
|
+
kind: 'PlanStepSatisfied';
|
|
125
|
+
stepId: PlanStepId;
|
|
126
|
+
planRef: PlanRevisionRef;
|
|
127
|
+
evidenceRefs: EntityRef[];
|
|
128
|
+
recordedBy: Address;
|
|
129
|
+
}
|
|
130
|
+
export interface MilestoneAchievedEvent extends EndeavorEventBase {
|
|
131
|
+
kind: 'MilestoneAchieved';
|
|
132
|
+
milestoneId: string;
|
|
133
|
+
evidenceRefs: EntityRef[];
|
|
134
|
+
recordedBy: Address;
|
|
135
|
+
}
|
|
136
|
+
export interface EndeavorSatisfiedEvent extends EndeavorEventBase {
|
|
137
|
+
kind: 'EndeavorSatisfied';
|
|
138
|
+
outcomeValidationRef: EntityRef;
|
|
139
|
+
}
|
|
140
|
+
export interface EndeavorAbandonedEvent extends EndeavorEventBase {
|
|
141
|
+
kind: 'EndeavorAbandoned';
|
|
142
|
+
reason?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface RecommendationProposedEvent extends EventBase {
|
|
145
|
+
kind: 'RecommendationProposed';
|
|
146
|
+
recommendationId: RecommendationId;
|
|
147
|
+
recommendation: RecommendationV1;
|
|
148
|
+
}
|
|
149
|
+
export interface RecommendationAcceptedEvent extends EventBase {
|
|
150
|
+
kind: 'RecommendationAccepted';
|
|
151
|
+
recommendationId: RecommendationId;
|
|
152
|
+
resolvedBy: Address;
|
|
153
|
+
reason?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface RecommendationRejectedEvent extends EventBase {
|
|
156
|
+
kind: 'RecommendationRejected';
|
|
157
|
+
recommendationId: RecommendationId;
|
|
158
|
+
resolvedBy: Address;
|
|
159
|
+
reason?: string;
|
|
160
|
+
}
|
|
161
|
+
export type CoordinationEventV1 = EndeavorRequestSubmittedEvent | EndeavorRequestDeclinedEvent | EndeavorAdoptedEvent | OutcomeRevisedEvent | PlanProposedEvent | PlanAdoptedEvent | PlanRejectedEvent | ParticipationInvitedEvent | ParticipationAssertedEvent | ParticipationWithdrawnEvent | ContributionProposedEvent | ContributionAllocatedEvent | ContributionCommittedEvent | CommitmentWithdrawnEvent | ContributionReallocatedEvent | PlanStepSatisfiedEvent | MilestoneAchievedEvent | EndeavorSatisfiedEvent | EndeavorAbandonedEvent | RecommendationProposedEvent | RecommendationAcceptedEvent | RecommendationRejectedEvent;
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/core/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,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0B,GAC1B,0BAA0B,GAC1B,wBAAwB,GACxB,4BAA4B,GAC5B,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,2BAA2B,GAC3B,2BAA2B,GAC3B,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/core/events.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type EndeavorId = `end_${string}`;
|
|
2
|
+
export type EndeavorRequestId = `ereq_${string}`;
|
|
3
|
+
export type CoordinationPlanId = `plan_${string}`;
|
|
4
|
+
export type PlanStepId = `step_${string}`;
|
|
5
|
+
export type ParticipationId = `part_${string}`;
|
|
6
|
+
export type AllocationId = `alloc_${string}`;
|
|
7
|
+
export type CommitmentId = `commit_${string}`;
|
|
8
|
+
export type ProposalId = `prop_${string}`;
|
|
9
|
+
export type RecommendationId = `rec_${string}`;
|
|
10
|
+
export declare class CoordinationIdError extends Error {
|
|
11
|
+
constructor(expectedPrefix: string, value: string);
|
|
12
|
+
}
|
|
13
|
+
export declare const makeEndeavorId: (suffix: string) => EndeavorId;
|
|
14
|
+
export declare const makeEndeavorRequestId: (suffix: string) => EndeavorRequestId;
|
|
15
|
+
export declare const makeCoordinationPlanId: (suffix: string) => CoordinationPlanId;
|
|
16
|
+
export declare const makePlanStepId: (suffix: string) => PlanStepId;
|
|
17
|
+
export declare const makeParticipationId: (suffix: string) => ParticipationId;
|
|
18
|
+
export declare const makeAllocationId: (suffix: string) => AllocationId;
|
|
19
|
+
export declare const makeCommitmentId: (suffix: string) => CommitmentId;
|
|
20
|
+
export declare const makeProposalId: (suffix: string) => ProposalId;
|
|
21
|
+
export declare const makeRecommendationId: (suffix: string) => RecommendationId;
|
|
22
|
+
export declare const assertEndeavorId: (value: string) => EndeavorId;
|
|
23
|
+
export declare const assertEndeavorRequestId: (value: string) => EndeavorRequestId;
|
|
24
|
+
export declare const assertCoordinationPlanId: (value: string) => CoordinationPlanId;
|
|
25
|
+
export declare const assertPlanStepId: (value: string) => PlanStepId;
|
|
26
|
+
export declare const assertParticipationId: (value: string) => ParticipationId;
|
|
27
|
+
export declare const assertAllocationId: (value: string) => AllocationId;
|
|
28
|
+
export declare const assertCommitmentId: (value: string) => CommitmentId;
|
|
29
|
+
export declare const assertProposalId: (value: string) => ProposalId;
|
|
30
|
+
export declare const assertRecommendationId: (value: string) => RecommendationId;
|
|
31
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/core/ids.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,EAAE,CAAC;AACzC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,MAAM,EAAE,CAAC;AACjD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,MAAM,EAAE,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,QAAQ,MAAM,EAAE,CAAC;AAC1C,MAAM,MAAM,eAAe,GAAG,QAAQ,MAAM,EAAE,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,SAAS,MAAM,EAAE,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,UAAU,MAAM,EAAE,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,QAAQ,MAAM,EAAE,CAAC;AAC1C,MAAM,MAAM,gBAAgB,GAAG,OAAO,MAAM,EAAE,CAAC;AAE/C,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAGlD;AAcD,eAAO,MAAM,cAAc,WAAY,MAAM,KAAG,UAAkC,CAAC;AACnF,eAAO,MAAM,qBAAqB,WAAY,MAAM,KAAG,iBAA0C,CAAC;AAClG,eAAO,MAAM,sBAAsB,WAAY,MAAM,KAAG,kBAA2C,CAAC;AACpG,eAAO,MAAM,cAAc,WAAY,MAAM,KAAG,UAAmC,CAAC;AACpF,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,eAAwC,CAAC;AAC9F,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,YAAsC,CAAC;AACzF,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,YAAuC,CAAC;AAC1F,eAAO,MAAM,cAAc,WAAY,MAAM,KAAG,UAAmC,CAAC;AACpF,eAAO,MAAM,oBAAoB,WAAY,MAAM,KAAG,gBAAwC,CAAC;AAE/F,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,UAAmC,CAAC;AACrF,eAAO,MAAM,uBAAuB,UAAW,MAAM,KAAG,iBAA2C,CAAC;AACpG,eAAO,MAAM,wBAAwB,UAAW,MAAM,KAAG,kBAA4C,CAAC;AACtG,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,UAAoC,CAAC;AACtF,eAAO,MAAM,qBAAqB,UAAW,MAAM,KAAG,eAAyC,CAAC;AAChG,eAAO,MAAM,kBAAkB,UAAW,MAAM,KAAG,YAAuC,CAAC;AAC3F,eAAO,MAAM,kBAAkB,UAAW,MAAM,KAAG,YAAwC,CAAC;AAC5F,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,UAAoC,CAAC;AACtF,eAAO,MAAM,sBAAsB,UAAW,MAAM,KAAG,gBAAyC,CAAC"}
|
package/dist/core/ids.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Branded coordination ids (spec 332 §5). Ids are supplied by commands — never generated here.
|
|
2
|
+
export class CoordinationIdError extends Error {
|
|
3
|
+
constructor(expectedPrefix, value) {
|
|
4
|
+
super(`[coordination] expected id with prefix "${expectedPrefix}", got "${value}"`);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
function make(prefix, suffix) {
|
|
8
|
+
if (suffix.length === 0)
|
|
9
|
+
throw new CoordinationIdError(prefix, suffix);
|
|
10
|
+
return `${prefix}${suffix}`;
|
|
11
|
+
}
|
|
12
|
+
function assert(prefix, value) {
|
|
13
|
+
if (!value.startsWith(prefix) || value.length <= prefix.length) {
|
|
14
|
+
throw new CoordinationIdError(prefix, value);
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
export const makeEndeavorId = (suffix) => make('end_', suffix);
|
|
19
|
+
export const makeEndeavorRequestId = (suffix) => make('ereq_', suffix);
|
|
20
|
+
export const makeCoordinationPlanId = (suffix) => make('plan_', suffix);
|
|
21
|
+
export const makePlanStepId = (suffix) => make('step_', suffix);
|
|
22
|
+
export const makeParticipationId = (suffix) => make('part_', suffix);
|
|
23
|
+
export const makeAllocationId = (suffix) => make('alloc_', suffix);
|
|
24
|
+
export const makeCommitmentId = (suffix) => make('commit_', suffix);
|
|
25
|
+
export const makeProposalId = (suffix) => make('prop_', suffix);
|
|
26
|
+
export const makeRecommendationId = (suffix) => make('rec_', suffix);
|
|
27
|
+
export const assertEndeavorId = (value) => assert('end_', value);
|
|
28
|
+
export const assertEndeavorRequestId = (value) => assert('ereq_', value);
|
|
29
|
+
export const assertCoordinationPlanId = (value) => assert('plan_', value);
|
|
30
|
+
export const assertPlanStepId = (value) => assert('step_', value);
|
|
31
|
+
export const assertParticipationId = (value) => assert('part_', value);
|
|
32
|
+
export const assertAllocationId = (value) => assert('alloc_', value);
|
|
33
|
+
export const assertCommitmentId = (value) => assert('commit_', value);
|
|
34
|
+
export const assertProposalId = (value) => assert('prop_', value);
|
|
35
|
+
export const assertRecommendationId = (value) => assert('rec_', value);
|
|
36
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/core/ids.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAY/F,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,cAAsB,EAAE,KAAa;QAC/C,KAAK,CAAC,2CAA2C,cAAc,WAAW,KAAK,GAAG,CAAC,CAAC;IACtF,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,MAAM,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { AllocationId, CommitmentId, CoordinationPlanId, EndeavorId, EndeavorRequestId, ParticipationId, PlanStepId, ProposalId, RecommendationId, } from './ids.js';
|
|
2
|
+
export { CoordinationIdError, assertAllocationId, assertCommitmentId, assertCoordinationPlanId, assertEndeavorId, assertEndeavorRequestId, assertParticipationId, assertPlanStepId, assertProposalId, assertRecommendationId, makeAllocationId, makeCommitmentId, makeCoordinationPlanId, makeEndeavorId, makeEndeavorRequestId, makeParticipationId, makePlanStepId, makeProposalId, makeRecommendationId, } from './ids.js';
|
|
3
|
+
export type { ContextRef, CoordinationContextSnapshotV1, EndeavorEntryPoint, EndeavorLifecycle, EndeavorRelationKind, EndeavorRelationV1, EndeavorRequestV1, EndeavorV1, ExternalObjectBindingV1, ExternalSyncMode, OutcomeCriterionKind, OutcomeCriterionV1, OutcomeSpecificationV1, } from './types.js';
|
|
4
|
+
export { COORDINATION_CLASS_IRIS } from './types.js';
|
|
5
|
+
export type { CoordinationCommandV1 } from './commands.js';
|
|
6
|
+
export { COORDINATION_COMMAND_KINDS } from './commands.js';
|
|
7
|
+
export type { CoordinationEventV1 } from './events.js';
|
|
8
|
+
export type { CommandValidationResult, CoordinationStateV1, EndeavorRequestStatus, SatisfiedStepV1, } from './reducer.js';
|
|
9
|
+
export { CoordinationEventError, applyCoordinationEvent, initialCoordinationState, planKey, validateCoordinationCommand, } from './reducer.js';
|
|
10
|
+
export type { ProvenanceActivitySummary, ProvenanceCorrespondenceSummary, ProvenanceEntitySummary, ProvenanceInputsV1, } from './provenance.js';
|
|
11
|
+
export { deriveProvenanceInputs } from './provenance.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,YAAY,EAC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llocationId, assertCommitmentId, assertCoordinationPlanId, assertEndeavorId, assertEndeavorRequestId, assertParticipationId, assertPlanStepId, assertProposalId, assertRecommendationId, makeAllocationId, makeCommitmentId, makeCoordinationPlanId, makeEndeavorId, makeEndeavorRequestId, makeParticipationId, makePlanStepId, makeProposalId, makeRecommendationId, } from './ids.js';
|
|
2
|
+
export { COORDINATION_CLASS_IRIS } from './types.js';
|
|
3
|
+
export { COORDINATION_COMMAND_KINDS } from './commands.js';
|
|
4
|
+
export { CoordinationEventError, applyCoordinationEvent, initialCoordinationState, planKey, validateCoordinationCommand, } from './reducer.js';
|
|
5
|
+
export { deriveProvenanceInputs } from './provenance.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAiBlB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAS3D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,OAAO,EACP,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAQtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CoordinationEventV1 } from './events.js';
|
|
2
|
+
export interface ProvenanceEntitySummary {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: string;
|
|
5
|
+
wasRevisionOf?: string;
|
|
6
|
+
generatedBy?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ProvenanceActivitySummary {
|
|
9
|
+
id: string;
|
|
10
|
+
kind: string;
|
|
11
|
+
agent?: string;
|
|
12
|
+
used?: string[];
|
|
13
|
+
generated?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ProvenanceCorrespondenceSummary {
|
|
16
|
+
activityId: string;
|
|
17
|
+
planId: string;
|
|
18
|
+
planRevision: number;
|
|
19
|
+
planHash: string;
|
|
20
|
+
stepId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ProvenanceInputsV1 {
|
|
23
|
+
entities: ProvenanceEntitySummary[];
|
|
24
|
+
activities: ProvenanceActivitySummary[];
|
|
25
|
+
agents: string[];
|
|
26
|
+
correspondences: ProvenanceCorrespondenceSummary[];
|
|
27
|
+
}
|
|
28
|
+
export declare function deriveProvenanceInputs(events: CoordinationEventV1[]): ProvenanceInputsV1;
|
|
29
|
+
//# sourceMappingURL=provenance.d.ts.map
|