@jami-studio/orchestra 0.1.0
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 +159 -0
- package/README.md +21 -0
- package/package.json +33 -0
- package/src/drizzle.mjs +321 -0
- package/src/index.mjs +897 -0
- package/src/oauth.mjs +731 -0
- package/src/schema.mjs +132 -0
package/src/schema.mjs
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export const ORCHESTRA_SCHEMA_VERSION = "2026-06-22.orchestra-control-plane";
|
|
2
|
+
|
|
3
|
+
export const ORCHESTRA_TABLES = [
|
|
4
|
+
table("orchestra_org_directory", "Directory entries for people, agents, squads, and service actors.", [
|
|
5
|
+
"actor_id",
|
|
6
|
+
"actor_type",
|
|
7
|
+
"display_name",
|
|
8
|
+
"status",
|
|
9
|
+
"metadata",
|
|
10
|
+
"created_at",
|
|
11
|
+
"updated_at",
|
|
12
|
+
]),
|
|
13
|
+
table("orchestra_agents", "Dispatch-capable agent identities and capability manifests.", [
|
|
14
|
+
"agent_id",
|
|
15
|
+
"directory_actor_id",
|
|
16
|
+
"model_family",
|
|
17
|
+
"capabilities",
|
|
18
|
+
"status",
|
|
19
|
+
"created_at",
|
|
20
|
+
"updated_at",
|
|
21
|
+
]),
|
|
22
|
+
table("orchestra_dreams", "Goal records that can be decomposed into tasks and runs.", [
|
|
23
|
+
"dream_id",
|
|
24
|
+
"title",
|
|
25
|
+
"status",
|
|
26
|
+
"owner_actor_id",
|
|
27
|
+
"priority",
|
|
28
|
+
"metadata",
|
|
29
|
+
"created_at",
|
|
30
|
+
"updated_at",
|
|
31
|
+
]),
|
|
32
|
+
table("orchestra_tasks", "Dispatch task envelopes derived from dreams or direct operator input.", [
|
|
33
|
+
"task_id",
|
|
34
|
+
"dream_id",
|
|
35
|
+
"assignee_agent_id",
|
|
36
|
+
"status",
|
|
37
|
+
"input",
|
|
38
|
+
"required_scopes",
|
|
39
|
+
"created_at",
|
|
40
|
+
"updated_at",
|
|
41
|
+
]),
|
|
42
|
+
table("orchestra_runs", "Attempt-level execution records for tasks.", [
|
|
43
|
+
"run_id",
|
|
44
|
+
"task_id",
|
|
45
|
+
"agent_id",
|
|
46
|
+
"status",
|
|
47
|
+
"attempt",
|
|
48
|
+
"started_at",
|
|
49
|
+
"completed_at",
|
|
50
|
+
"metadata",
|
|
51
|
+
]),
|
|
52
|
+
table("orchestra_run_events", "Append-only run timeline events.", [
|
|
53
|
+
"event_id",
|
|
54
|
+
"run_id",
|
|
55
|
+
"event_type",
|
|
56
|
+
"sequence",
|
|
57
|
+
"payload",
|
|
58
|
+
"recorded_at",
|
|
59
|
+
]),
|
|
60
|
+
table("orchestra_tool_calls", "Policy-visible tool call envelopes and outcomes.", [
|
|
61
|
+
"tool_call_id",
|
|
62
|
+
"run_id",
|
|
63
|
+
"tool_name",
|
|
64
|
+
"risk",
|
|
65
|
+
"status",
|
|
66
|
+
"input_ref",
|
|
67
|
+
"output_ref",
|
|
68
|
+
"created_at",
|
|
69
|
+
]),
|
|
70
|
+
table("orchestra_artifacts", "Produced artifact references owned by a run.", [
|
|
71
|
+
"artifact_id",
|
|
72
|
+
"run_id",
|
|
73
|
+
"kind",
|
|
74
|
+
"uri",
|
|
75
|
+
"provenance",
|
|
76
|
+
"created_at",
|
|
77
|
+
]),
|
|
78
|
+
table("orchestra_grants", "Actor or agent grants for scopes, resources, and expiry windows.", [
|
|
79
|
+
"grant_id",
|
|
80
|
+
"subject_actor_id",
|
|
81
|
+
"scope",
|
|
82
|
+
"resource_ref",
|
|
83
|
+
"status",
|
|
84
|
+
"expires_at",
|
|
85
|
+
"created_at",
|
|
86
|
+
]),
|
|
87
|
+
table("orchestra_approvals", "Human or owner approval decisions bound to actions and runs.", [
|
|
88
|
+
"approval_id",
|
|
89
|
+
"run_id",
|
|
90
|
+
"action_id",
|
|
91
|
+
"requested_by",
|
|
92
|
+
"decided_by",
|
|
93
|
+
"status",
|
|
94
|
+
"required_scopes",
|
|
95
|
+
"requested_at",
|
|
96
|
+
"decided_at",
|
|
97
|
+
"expires_at",
|
|
98
|
+
]),
|
|
99
|
+
table("orchestra_secrets", "Sealed-at-rest secret envelopes; plaintext is never stored.", [
|
|
100
|
+
"secret_id",
|
|
101
|
+
"name",
|
|
102
|
+
"key_version_id",
|
|
103
|
+
"sealed_payload",
|
|
104
|
+
"metadata",
|
|
105
|
+
"created_at",
|
|
106
|
+
"rotated_at",
|
|
107
|
+
]),
|
|
108
|
+
table("orchestra_secret_key_versions", "Vault key-version ledger and rotation policy.", [
|
|
109
|
+
"key_version_id",
|
|
110
|
+
"status",
|
|
111
|
+
"algorithm",
|
|
112
|
+
"created_at",
|
|
113
|
+
"retired_at",
|
|
114
|
+
"rotation_policy",
|
|
115
|
+
]),
|
|
116
|
+
table("orchestra_audit_logs", "Append-only audit decisions and control-plane mutations.", [
|
|
117
|
+
"audit_id",
|
|
118
|
+
"actor_id",
|
|
119
|
+
"event_type",
|
|
120
|
+
"resource_ref",
|
|
121
|
+
"outcome",
|
|
122
|
+
"summary",
|
|
123
|
+
"recorded_at",
|
|
124
|
+
"metadata",
|
|
125
|
+
]),
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
export const ORCHESTRA_TABLE_NAMES = ORCHESTRA_TABLES.map((entry) => entry.name);
|
|
129
|
+
|
|
130
|
+
function table(name, purpose, columns) {
|
|
131
|
+
return { name, purpose, columns };
|
|
132
|
+
}
|