@useorgx/openclaw-plugin 0.4.9 → 0.7.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/README.md +77 -11
- package/dashboard/dist/assets/6mILZQ2a.js +1 -0
- package/dashboard/dist/assets/6mILZQ2a.js.br +0 -0
- package/dashboard/dist/assets/6mILZQ2a.js.gz +0 -0
- package/dashboard/dist/assets/8dksYiq4.js +2 -0
- package/dashboard/dist/assets/8dksYiq4.js.br +0 -0
- package/dashboard/dist/assets/8dksYiq4.js.gz +0 -0
- package/dashboard/dist/assets/B5zYRHc3.js +1 -0
- package/dashboard/dist/assets/B5zYRHc3.js.br +0 -0
- package/dashboard/dist/assets/B5zYRHc3.js.gz +0 -0
- package/dashboard/dist/assets/B6wPWJ35.js +1 -0
- package/dashboard/dist/assets/B6wPWJ35.js.br +0 -0
- package/dashboard/dist/assets/B6wPWJ35.js.gz +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js +53 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
- package/dashboard/dist/assets/BWEwjt1W.js +1 -0
- package/dashboard/dist/assets/BWEwjt1W.js.br +0 -0
- package/dashboard/dist/assets/BWEwjt1W.js.gz +0 -0
- package/dashboard/dist/assets/BgOYB78t.js +4 -0
- package/dashboard/dist/assets/BgOYB78t.js.br +0 -0
- package/dashboard/dist/assets/BgOYB78t.js.gz +0 -0
- package/dashboard/dist/assets/BzRbDCAD.css +1 -0
- package/dashboard/dist/assets/BzRbDCAD.css.br +0 -0
- package/dashboard/dist/assets/BzRbDCAD.css.gz +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
- package/dashboard/dist/assets/C8uM3AX8.js +1 -0
- package/dashboard/dist/assets/C8uM3AX8.js.br +0 -0
- package/dashboard/dist/assets/C8uM3AX8.js.gz +0 -0
- package/dashboard/dist/assets/C9jy61eu.js +212 -0
- package/dashboard/dist/assets/C9jy61eu.js.br +0 -0
- package/dashboard/dist/assets/C9jy61eu.js.gz +0 -0
- package/dashboard/dist/assets/CC63EwFD.js +1 -0
- package/dashboard/dist/assets/CC63EwFD.js.br +0 -0
- package/dashboard/dist/assets/CC63EwFD.js.gz +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js +1 -0
- package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
- package/dashboard/dist/assets/CZaT3ob_.js +1 -0
- package/dashboard/dist/assets/CZaT3ob_.js.br +0 -0
- package/dashboard/dist/assets/CZaT3ob_.js.gz +0 -0
- package/dashboard/dist/assets/CgaottFX.js +1 -0
- package/dashboard/dist/assets/CgaottFX.js.br +0 -0
- package/dashboard/dist/assets/CgaottFX.js.gz +0 -0
- package/dashboard/dist/assets/{CpJsfbXo.js → CxQ08qFN.js} +2 -2
- package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
- package/dashboard/dist/assets/CzCxAZlW.js +1 -0
- package/dashboard/dist/assets/CzCxAZlW.js.br +0 -0
- package/dashboard/dist/assets/CzCxAZlW.js.gz +0 -0
- package/dashboard/dist/assets/D3iMTYEj.js +1 -0
- package/dashboard/dist/assets/D3iMTYEj.js.br +0 -0
- package/dashboard/dist/assets/D3iMTYEj.js.gz +0 -0
- package/dashboard/dist/assets/D8JNX8kq.js +2 -0
- package/dashboard/dist/assets/D8JNX8kq.js.br +0 -0
- package/dashboard/dist/assets/D8JNX8kq.js.gz +0 -0
- package/dashboard/dist/assets/DnA8dpj6.js +1 -0
- package/dashboard/dist/assets/DnA8dpj6.js.br +0 -0
- package/dashboard/dist/assets/DnA8dpj6.js.gz +0 -0
- package/dashboard/dist/assets/IUexzymk.js +1 -0
- package/dashboard/dist/assets/IUexzymk.js.br +0 -0
- package/dashboard/dist/assets/IUexzymk.js.gz +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js +8 -0
- package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js +1 -0
- package/dashboard/dist/assets/ic2FaMnh.js.br +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js.gz +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css +1 -0
- package/dashboard/dist/assets/qm8xLgv-.css.br +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css.gz +0 -0
- package/dashboard/dist/assets/rttbDbEx.js +1 -0
- package/dashboard/dist/assets/rttbDbEx.js.br +0 -0
- package/dashboard/dist/assets/rttbDbEx.js.gz +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.br +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openai-mark.svg.br +0 -0
- package/dashboard/dist/brand/openai-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.br +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.gz +0 -0
- package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
- package/dashboard/dist/index.html +7 -5
- package/dashboard/dist/index.html.br +0 -0
- package/dashboard/dist/index.html.gz +0 -0
- package/dist/activity-actor-fields.js +26 -4
- package/dist/activity-store.js +34 -8
- package/dist/agent-context-store.js +79 -17
- package/dist/agent-run-store.js +44 -3
- package/dist/agent-suite.d.ts +9 -0
- package/dist/agent-suite.js +149 -9
- package/dist/artifacts/artifact-domain-schemas.d.ts +66 -0
- package/dist/artifacts/artifact-domain-schemas.js +357 -0
- package/dist/artifacts/register-artifact.d.ts +4 -3
- package/dist/artifacts/register-artifact.js +170 -57
- package/dist/chat-store.d.ts +157 -0
- package/dist/chat-store.js +586 -0
- package/dist/cli/orgx.js +11 -0
- package/dist/contracts/client.d.ts +43 -3
- package/dist/contracts/client.js +159 -30
- package/dist/contracts/practice-exercise-schema.d.ts +216 -0
- package/dist/contracts/practice-exercise-schema.js +314 -0
- package/dist/contracts/retro-schema.d.ts +81 -0
- package/dist/contracts/retro-schema.js +80 -0
- package/dist/contracts/shared-types.d.ts +159 -0
- package/dist/contracts/shared-types.js +199 -1
- package/dist/contracts/skill-pack-schema.d.ts +192 -0
- package/dist/contracts/skill-pack-schema.js +180 -0
- package/dist/contracts/types.d.ts +247 -2
- package/dist/entities/auto-assignment.js +43 -17
- package/dist/event-sanitization.d.ts +11 -0
- package/dist/event-sanitization.js +113 -0
- package/dist/gateway-watchdog.d.ts +5 -0
- package/dist/gateway-watchdog.js +50 -0
- package/dist/hooks/post-reporting-event.mjs +1 -5
- package/dist/http/helpers/activity-headline.js +13 -132
- package/dist/http/helpers/auto-continue-engine.d.ts +198 -10
- package/dist/http/helpers/auto-continue-engine.js +3145 -186
- package/dist/http/helpers/autopilot-operations.d.ts +19 -0
- package/dist/http/helpers/autopilot-operations.js +182 -31
- package/dist/http/helpers/autopilot-runtime.d.ts +1 -0
- package/dist/http/helpers/autopilot-runtime.js +328 -25
- package/dist/http/helpers/autopilot-slice-utils.d.ts +18 -0
- package/dist/http/helpers/autopilot-slice-utils.js +514 -93
- package/dist/http/helpers/decision-mapper.d.ts +40 -0
- package/dist/http/helpers/decision-mapper.js +223 -7
- package/dist/http/helpers/dispatch-lifecycle.d.ts +19 -2
- package/dist/http/helpers/dispatch-lifecycle.js +242 -37
- package/dist/http/helpers/kickoff-context.js +104 -0
- package/dist/http/helpers/llm-client.d.ts +47 -0
- package/dist/http/helpers/llm-client.js +256 -0
- package/dist/http/helpers/mission-control.d.ts +102 -3
- package/dist/http/helpers/mission-control.js +498 -9
- package/dist/http/helpers/sentinel-catalog.d.ts +23 -0
- package/dist/http/helpers/sentinel-catalog.js +193 -0
- package/dist/http/helpers/session-classification.d.ts +9 -0
- package/dist/http/helpers/session-classification.js +564 -0
- package/dist/http/helpers/slice-experience-v2.d.ts +137 -0
- package/dist/http/helpers/slice-experience-v2.js +677 -0
- package/dist/http/helpers/slice-run-projections.d.ts +72 -0
- package/dist/http/helpers/slice-run-projections.js +877 -0
- package/dist/http/helpers/triage-mapper.d.ts +43 -0
- package/dist/http/helpers/triage-mapper.js +549 -0
- package/dist/http/helpers/value-utils.js +7 -2
- package/dist/http/helpers/workspace-scope.d.ts +15 -0
- package/dist/http/helpers/workspace-scope.js +170 -0
- package/dist/http/index.js +1420 -105
- package/dist/http/routes/agent-suite.d.ts +9 -0
- package/dist/http/routes/agent-suite.js +294 -8
- package/dist/http/routes/agents-catalog.js +64 -19
- package/dist/http/routes/chat.d.ts +19 -0
- package/dist/http/routes/chat.js +522 -0
- package/dist/http/routes/decision-actions.d.ts +8 -1
- package/dist/http/routes/decision-actions.js +42 -5
- package/dist/http/routes/dispatch-gateway-envelope.d.ts +25 -0
- package/dist/http/routes/dispatch-gateway-envelope.js +26 -0
- package/dist/http/routes/entities.d.ts +16 -0
- package/dist/http/routes/entities.js +232 -6
- package/dist/http/routes/live-legacy.d.ts +5 -0
- package/dist/http/routes/live-legacy.js +23 -509
- package/dist/http/routes/live-misc.d.ts +12 -0
- package/dist/http/routes/live-misc.js +251 -31
- package/dist/http/routes/live-snapshot.d.ts +49 -2
- package/dist/http/routes/live-snapshot.js +653 -23
- package/dist/http/routes/live-terminal.d.ts +11 -0
- package/dist/http/routes/live-terminal.js +154 -0
- package/dist/http/routes/live-triage.d.ts +61 -0
- package/dist/http/routes/live-triage.js +192 -0
- package/dist/http/routes/mission-control-actions.d.ts +49 -1
- package/dist/http/routes/mission-control-actions.js +1246 -84
- package/dist/http/routes/mission-control-read.d.ts +48 -3
- package/dist/http/routes/mission-control-read.js +1658 -20
- package/dist/http/routes/realtime-orchestrator.d.ts +10 -0
- package/dist/http/routes/realtime-orchestrator.js +74 -0
- package/dist/http/routes/run-control.d.ts +5 -2
- package/dist/http/routes/run-control.js +10 -0
- package/dist/http/routes/sentinels-catalog.d.ts +7 -0
- package/dist/http/routes/sentinels-catalog.js +24 -0
- package/dist/http/routes/summary.js +10 -3
- package/dist/http/routes/usage.d.ts +24 -0
- package/dist/http/routes/usage.js +362 -0
- package/dist/http/routes/work-artifacts.js +28 -9
- package/dist/index.js +165 -27
- package/dist/local-openclaw.js +29 -6
- package/dist/mcp-client-setup.js +3 -3
- package/dist/mcp-http-handler.d.ts +3 -0
- package/dist/mcp-http-handler.js +34 -60
- package/dist/next-up-queue-store.d.ts +16 -1
- package/dist/next-up-queue-store.js +89 -7
- package/dist/outbox.d.ts +5 -0
- package/dist/outbox.js +113 -9
- package/dist/paths.js +36 -5
- package/dist/reporting/rollups.d.ts +41 -0
- package/dist/reporting/rollups.js +113 -0
- package/dist/retro/domain-templates.d.ts +45 -0
- package/dist/retro/domain-templates.js +297 -0
- package/dist/retro/quality-rubric.d.ts +33 -0
- package/dist/retro/quality-rubric.js +213 -0
- package/dist/runtime-cleanup.d.ts +18 -0
- package/dist/runtime-cleanup.js +87 -0
- package/dist/services/background.d.ts +11 -0
- package/dist/services/background.js +22 -0
- package/dist/services/experiment-randomization.d.ts +21 -0
- package/dist/services/experiment-randomization.js +63 -0
- package/dist/skill-pack-state.d.ts +36 -5
- package/dist/skill-pack-state.js +273 -29
- package/dist/sync/local-agent-telemetry.d.ts +13 -0
- package/dist/sync/local-agent-telemetry.js +128 -0
- package/dist/sync/outbox-replay.js +131 -24
- package/dist/team-context-store.d.ts +23 -0
- package/dist/team-context-store.js +116 -0
- package/dist/telemetry/posthog.js +4 -2
- package/dist/tools/core-tools.d.ts +10 -14
- package/dist/tools/core-tools.js +1289 -24
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -0
- package/dist/worker-supervisor.js +23 -0
- package/package.json +20 -6
- package/dashboard/dist/assets/B3ziCA02.js +0 -8
- package/dashboard/dist/assets/B5NEElEI.css +0 -1
- package/dashboard/dist/assets/BhapSNAs.js +0 -215
- package/dashboard/dist/assets/iFdvE7lx.js +0 -1
- package/dashboard/dist/assets/jRJsmpYM.js +0 -1
- package/dashboard/dist/assets/sAhvFnpk.js +0 -4
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Uses native fetch — no external dependencies.
|
|
8
8
|
*/
|
|
9
|
-
import type { OrgSnapshot, SyncPayload, SyncResponse, SpawnGuardResult, QualityScore, Entity, EntityListFilters, EmitActivityRequest, EmitActivityResponse, ApplyChangesetRequest, ApplyChangesetResponse, RecordRunOutcomeRequest, RecordRunOutcomeResponse, RecordRunRetroRequest, RecordRunRetroResponse, LiveActivityItem, SessionTreeResponse, HandoffSummary, CheckpointSummary, RestoreRequest, DelegationPreflightResult, BillingStatus, BillingCheckoutRequest, BillingUrlResult, KickoffContextRequest, KickoffContextResponse, SkillPack } from "./types.js";
|
|
9
|
+
import type { OrgSnapshot, SyncPayload, SyncResponse, SpawnGuardResult, QualityScore, Entity, EntityListFilters, EmitActivityRequest, EmitActivityResponse, ApplyChangesetRequest, ApplyChangesetResponse, RecordRunOutcomeRequest, RecordRunOutcomeResponse, RecordRunRetroRequest, RecordRunRetroResponse, LiveActivityItem, SessionTreeResponse, HandoffSummary, EntityUpdateResult, CheckpointSummary, RestoreRequest, DelegationPreflightResult, BillingStatus, BillingCheckoutRequest, BillingUrlResult, UsageControlPlaneSummary, KickoffContextRequest, KickoffContextResponse, SkillPack, ClientRuntimeSettingsResponse, ClientRuntimeSettingsUpdateRequest } from "./types.js";
|
|
10
10
|
export type DecisionAction = "approve" | "reject";
|
|
11
11
|
export type RunAction = "pause" | "resume" | "cancel" | "rollback";
|
|
12
12
|
export interface DecisionActionResult {
|
|
@@ -15,6 +15,10 @@ export interface DecisionActionResult {
|
|
|
15
15
|
entity?: Entity;
|
|
16
16
|
error?: string;
|
|
17
17
|
}
|
|
18
|
+
export interface DecisionMutationInput {
|
|
19
|
+
note?: string;
|
|
20
|
+
optionId?: string;
|
|
21
|
+
}
|
|
18
22
|
export declare class OrgXClient {
|
|
19
23
|
private apiKey;
|
|
20
24
|
private baseUrl;
|
|
@@ -40,6 +44,7 @@ export declare class OrgXClient {
|
|
|
40
44
|
private post;
|
|
41
45
|
private patch;
|
|
42
46
|
private buildQuery;
|
|
47
|
+
private unwrapSyncResponse;
|
|
43
48
|
getOrgSnapshot(): Promise<OrgSnapshot>;
|
|
44
49
|
syncMemory(payload: SyncPayload): Promise<SyncResponse>;
|
|
45
50
|
getKickoffContext(payload: KickoffContextRequest): Promise<KickoffContextResponse>;
|
|
@@ -61,6 +66,12 @@ export declare class OrgXClient {
|
|
|
61
66
|
status: number;
|
|
62
67
|
error: string;
|
|
63
68
|
}>;
|
|
69
|
+
getClientAgentRuntimeSettings(input?: {
|
|
70
|
+
workspaceId?: string | null;
|
|
71
|
+
/** Legacy alias retained for backward compatibility */
|
|
72
|
+
projectId?: string | null;
|
|
73
|
+
}): Promise<ClientRuntimeSettingsResponse>;
|
|
74
|
+
updateClientAgentRuntimeSettings(payload: ClientRuntimeSettingsUpdateRequest): Promise<ClientRuntimeSettingsResponse>;
|
|
64
75
|
delegationPreflight(payload: {
|
|
65
76
|
intent: string;
|
|
66
77
|
acceptanceCriteria?: string[];
|
|
@@ -84,6 +95,11 @@ export declare class OrgXClient {
|
|
|
84
95
|
* PATCH /api/entities { type, id, ...updates }
|
|
85
96
|
*/
|
|
86
97
|
updateEntity(type: string, id: string, updates: Record<string, unknown>): Promise<Entity>;
|
|
98
|
+
/**
|
|
99
|
+
* Update an OrgX entity and preserve reassignment metadata when present.
|
|
100
|
+
* PATCH /api/entities { type, id, ...updates }
|
|
101
|
+
*/
|
|
102
|
+
updateEntityDetailed(type: string, id: string, updates: Record<string, unknown>): Promise<EntityUpdateResult>;
|
|
87
103
|
/**
|
|
88
104
|
* List OrgX entities.
|
|
89
105
|
* GET /api/entities?type={type}&status={status}&limit={n}
|
|
@@ -98,6 +114,9 @@ export declare class OrgXClient {
|
|
|
98
114
|
getBillingStatus(): Promise<BillingStatus>;
|
|
99
115
|
createBillingCheckout(payload: BillingCheckoutRequest): Promise<BillingUrlResult>;
|
|
100
116
|
createBillingPortal(): Promise<BillingUrlResult>;
|
|
117
|
+
getUsageControlPlaneSummary(): Promise<UsageControlPlaneSummary>;
|
|
118
|
+
getUsageUnified(): Promise<UsageControlPlaneSummary>;
|
|
119
|
+
getUsageForecast(): Promise<Pick<UsageControlPlaneSummary, "generatedAt" | "period" | "predicted" | "risk" | "headroom" | "utilization">>;
|
|
101
120
|
emitActivity(payload: EmitActivityRequest): Promise<EmitActivityResponse>;
|
|
102
121
|
applyChangeset(payload: ApplyChangesetRequest): Promise<ApplyChangesetResponse>;
|
|
103
122
|
recordRunOutcome(payload: RecordRunOutcomeRequest): Promise<RecordRunOutcomeResponse>;
|
|
@@ -105,11 +124,17 @@ export declare class OrgXClient {
|
|
|
105
124
|
getLiveSessions(params?: {
|
|
106
125
|
limit?: number;
|
|
107
126
|
initiative?: string | null;
|
|
127
|
+
workspaceId?: string | null;
|
|
128
|
+
/** @deprecated Use workspaceId */
|
|
129
|
+
projectId?: string | null;
|
|
108
130
|
}): Promise<SessionTreeResponse>;
|
|
109
131
|
getLiveActivity(params?: {
|
|
110
132
|
limit?: number;
|
|
111
133
|
run?: string | null;
|
|
112
134
|
since?: string | null;
|
|
135
|
+
workspaceId?: string | null;
|
|
136
|
+
/** @deprecated Use workspaceId */
|
|
137
|
+
projectId?: string | null;
|
|
113
138
|
}): Promise<{
|
|
114
139
|
activities: LiveActivityItem[];
|
|
115
140
|
total: number;
|
|
@@ -117,6 +142,9 @@ export declare class OrgXClient {
|
|
|
117
142
|
getLiveAgents(params?: {
|
|
118
143
|
initiative?: string | null;
|
|
119
144
|
includeIdle?: boolean;
|
|
145
|
+
workspaceId?: string | null;
|
|
146
|
+
/** @deprecated Use workspaceId */
|
|
147
|
+
projectId?: string | null;
|
|
120
148
|
}): Promise<{
|
|
121
149
|
agents: unknown[];
|
|
122
150
|
summary: Record<string, number>;
|
|
@@ -124,9 +152,18 @@ export declare class OrgXClient {
|
|
|
124
152
|
getLiveInitiatives(params?: {
|
|
125
153
|
id?: string | null;
|
|
126
154
|
limit?: number;
|
|
155
|
+
offset?: number;
|
|
156
|
+
workspaceId?: string | null;
|
|
157
|
+
/** @deprecated Use workspaceId */
|
|
158
|
+
projectId?: string | null;
|
|
127
159
|
}): Promise<{
|
|
128
160
|
initiatives: unknown[];
|
|
129
161
|
total: number;
|
|
162
|
+
pagination?: {
|
|
163
|
+
limit?: number;
|
|
164
|
+
offset?: number;
|
|
165
|
+
has_more?: boolean;
|
|
166
|
+
};
|
|
130
167
|
}>;
|
|
131
168
|
getHandoffs(): Promise<{
|
|
132
169
|
handoffs: HandoffSummary[];
|
|
@@ -166,10 +203,13 @@ export declare class OrgXClient {
|
|
|
166
203
|
getLiveDecisions(params?: {
|
|
167
204
|
status?: string;
|
|
168
205
|
limit?: number;
|
|
206
|
+
workspaceId?: string | null;
|
|
207
|
+
/** @deprecated Use workspaceId */
|
|
208
|
+
projectId?: string | null;
|
|
169
209
|
}): Promise<{
|
|
170
210
|
decisions: Entity[];
|
|
171
211
|
total: number;
|
|
172
212
|
}>;
|
|
173
|
-
decideDecision(id: string, action: DecisionAction,
|
|
174
|
-
bulkDecideDecisions(ids: string[], action: DecisionAction,
|
|
213
|
+
decideDecision(id: string, action: DecisionAction, input?: DecisionMutationInput): Promise<Entity>;
|
|
214
|
+
bulkDecideDecisions(ids: string[], action: DecisionAction, input?: DecisionMutationInput): Promise<DecisionActionResult[]>;
|
|
175
215
|
}
|
package/dist/contracts/client.js
CHANGED
|
@@ -12,6 +12,12 @@ const DEFAULT_SYNC_TIMEOUT_MS = 45_000;
|
|
|
12
12
|
const USER_AGENT = "OrgX-Clawdbot-Plugin/1.0";
|
|
13
13
|
const DECISION_MUTATION_CONCURRENCY = 6;
|
|
14
14
|
const DEFAULT_CLIENT_BASE_URL = "https://www.useorgx.com";
|
|
15
|
+
function normalizeAgentStatus(value) {
|
|
16
|
+
if (value === "active" || value === "idle" || value === "throttled") {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
return "idle";
|
|
20
|
+
}
|
|
15
21
|
function isUserScopedApiKey(apiKey) {
|
|
16
22
|
return apiKey.trim().toLowerCase().startsWith("oxk_");
|
|
17
23
|
}
|
|
@@ -184,21 +190,42 @@ export class OrgXClient {
|
|
|
184
190
|
}
|
|
185
191
|
return `?${search.toString()}`;
|
|
186
192
|
}
|
|
193
|
+
unwrapSyncResponse(response) {
|
|
194
|
+
if (response &&
|
|
195
|
+
typeof response === "object" &&
|
|
196
|
+
"data" in response &&
|
|
197
|
+
response.data) {
|
|
198
|
+
return response.data;
|
|
199
|
+
}
|
|
200
|
+
return response;
|
|
201
|
+
}
|
|
187
202
|
// ===========================================================================
|
|
188
203
|
// Org Snapshot
|
|
189
204
|
// ===========================================================================
|
|
190
205
|
async getOrgSnapshot() {
|
|
191
206
|
// Use the sync endpoint with POST (empty body = pull only)
|
|
192
207
|
const resp = await this.post("/api/client/sync", {});
|
|
193
|
-
const data = resp
|
|
208
|
+
const data = this.unwrapSyncResponse(resp);
|
|
194
209
|
// Transform SyncResponse to OrgSnapshot format
|
|
210
|
+
const syncAgents = Array.isArray(data.agents) ? data.agents : [];
|
|
195
211
|
return {
|
|
196
212
|
initiatives: data.initiatives.map(i => ({
|
|
197
213
|
id: i.id,
|
|
198
214
|
title: i.title,
|
|
199
215
|
status: i.status,
|
|
200
216
|
})),
|
|
201
|
-
agents:
|
|
217
|
+
agents: syncAgents.map((agent) => ({
|
|
218
|
+
id: String(agent.id ?? ""),
|
|
219
|
+
name: String(agent.name ?? ""),
|
|
220
|
+
domain: String(agent.domain ?? ""),
|
|
221
|
+
status: normalizeAgentStatus(agent.status),
|
|
222
|
+
currentTask: typeof agent.currentTask === "string" && agent.currentTask.trim().length > 0
|
|
223
|
+
? agent.currentTask
|
|
224
|
+
: undefined,
|
|
225
|
+
lastActive: typeof agent.lastActive === "string" && agent.lastActive.trim().length > 0
|
|
226
|
+
? agent.lastActive
|
|
227
|
+
: undefined,
|
|
228
|
+
})),
|
|
202
229
|
activeTasks: data.activeTasks.map(t => ({
|
|
203
230
|
id: t.id,
|
|
204
231
|
title: t.title,
|
|
@@ -219,13 +246,7 @@ export class OrgXClient {
|
|
|
219
246
|
// ===========================================================================
|
|
220
247
|
async syncMemory(payload) {
|
|
221
248
|
const response = await this.post("/api/client/sync", payload);
|
|
222
|
-
|
|
223
|
-
typeof response === "object" &&
|
|
224
|
-
"data" in response &&
|
|
225
|
-
response.data) {
|
|
226
|
-
return response.data;
|
|
227
|
-
}
|
|
228
|
-
return response;
|
|
249
|
+
return this.unwrapSyncResponse(response);
|
|
229
250
|
}
|
|
230
251
|
// ===========================================================================
|
|
231
252
|
// Kickoff Context
|
|
@@ -293,6 +314,20 @@ export class OrgXClient {
|
|
|
293
314
|
clearTimeout(timeout);
|
|
294
315
|
}
|
|
295
316
|
}
|
|
317
|
+
// ===========================================================================
|
|
318
|
+
// Client Agent Runtime Settings
|
|
319
|
+
// ===========================================================================
|
|
320
|
+
async getClientAgentRuntimeSettings(input) {
|
|
321
|
+
const workspaceScope = input?.workspaceId ?? input?.projectId ?? null;
|
|
322
|
+
const query = this.buildQuery({
|
|
323
|
+
workspace_id: workspaceScope,
|
|
324
|
+
command_center_id: workspaceScope,
|
|
325
|
+
});
|
|
326
|
+
return this.get(`/api/client/agents/runtime-settings${query}`);
|
|
327
|
+
}
|
|
328
|
+
async updateClientAgentRuntimeSettings(payload) {
|
|
329
|
+
return this.patch("/api/client/agents/runtime-settings", payload);
|
|
330
|
+
}
|
|
296
331
|
async delegationPreflight(payload) {
|
|
297
332
|
return this.post("/api/client/delegation/preflight", payload);
|
|
298
333
|
}
|
|
@@ -351,12 +386,34 @@ export class OrgXClient {
|
|
|
351
386
|
* PATCH /api/entities { type, id, ...updates }
|
|
352
387
|
*/
|
|
353
388
|
async updateEntity(type, id, updates) {
|
|
389
|
+
const result = await this.updateEntityDetailed(type, id, updates);
|
|
390
|
+
return result.entity;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Update an OrgX entity and preserve reassignment metadata when present.
|
|
394
|
+
* PATCH /api/entities { type, id, ...updates }
|
|
395
|
+
*/
|
|
396
|
+
async updateEntityDetailed(type, id, updates) {
|
|
354
397
|
const resp = await this.patch("/api/entities", {
|
|
355
398
|
type,
|
|
356
399
|
id,
|
|
357
400
|
...updates,
|
|
358
401
|
});
|
|
359
|
-
|
|
402
|
+
if (resp && typeof resp === "object") {
|
|
403
|
+
const envelope = resp;
|
|
404
|
+
const entity = envelope.entity ?? envelope.data ?? resp;
|
|
405
|
+
return {
|
|
406
|
+
entity,
|
|
407
|
+
reassignment: envelope.reassignment && typeof envelope.reassignment === "object"
|
|
408
|
+
? envelope.reassignment
|
|
409
|
+
: null,
|
|
410
|
+
initiative_reassignment: envelope.initiative_reassignment &&
|
|
411
|
+
typeof envelope.initiative_reassignment === "object"
|
|
412
|
+
? envelope.initiative_reassignment
|
|
413
|
+
: null,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
return { entity: resp };
|
|
360
417
|
}
|
|
361
418
|
/**
|
|
362
419
|
* List OrgX entities.
|
|
@@ -366,10 +423,49 @@ export class OrgXClient {
|
|
|
366
423
|
const params = new URLSearchParams({ type });
|
|
367
424
|
if (filters?.status)
|
|
368
425
|
params.set("status", filters.status);
|
|
426
|
+
if (typeof filters?.offset === "number" && Number.isFinite(filters.offset)) {
|
|
427
|
+
params.set("offset", String(Math.max(0, Math.floor(filters.offset))));
|
|
428
|
+
}
|
|
429
|
+
if (filters?.search)
|
|
430
|
+
params.set("search", String(filters.search));
|
|
431
|
+
if (filters?.id)
|
|
432
|
+
params.set("id", String(filters.id));
|
|
433
|
+
if (filters?.ids) {
|
|
434
|
+
const values = Array.isArray(filters.ids)
|
|
435
|
+
? filters.ids
|
|
436
|
+
: String(filters.ids)
|
|
437
|
+
.split(",")
|
|
438
|
+
.map((value) => value.trim())
|
|
439
|
+
.filter((value) => value.length > 0);
|
|
440
|
+
if (values.length > 0) {
|
|
441
|
+
params.set("ids", values.join(","));
|
|
442
|
+
}
|
|
443
|
+
}
|
|
369
444
|
if (filters?.limit)
|
|
370
445
|
params.set("limit", String(filters.limit));
|
|
371
446
|
if (filters?.initiative_id)
|
|
372
447
|
params.set("initiative_id", String(filters.initiative_id));
|
|
448
|
+
const legacyProjectIdRaw = filters?.project_id != null ? String(filters.project_id) : null;
|
|
449
|
+
const workspaceIdRaw = filters?.workspace_id != null ? String(filters.workspace_id) : null;
|
|
450
|
+
const commandCenterIdRaw = filters?.command_center_id != null
|
|
451
|
+
? String(filters.command_center_id)
|
|
452
|
+
: null;
|
|
453
|
+
if (workspaceIdRaw &&
|
|
454
|
+
commandCenterIdRaw &&
|
|
455
|
+
workspaceIdRaw.trim() !== commandCenterIdRaw.trim()) {
|
|
456
|
+
throw new Error("workspace_id and command_center_id must match when both are provided");
|
|
457
|
+
}
|
|
458
|
+
if (legacyProjectIdRaw &&
|
|
459
|
+
workspaceIdRaw &&
|
|
460
|
+
legacyProjectIdRaw.trim() !== workspaceIdRaw.trim()) {
|
|
461
|
+
throw new Error("project_id cannot differ from workspace_id; use workspace_id as canonical scope");
|
|
462
|
+
}
|
|
463
|
+
const workspaceId = workspaceIdRaw ?? commandCenterIdRaw ?? legacyProjectIdRaw;
|
|
464
|
+
if (workspaceId) {
|
|
465
|
+
// Canonical scope param. Keep legacy alias for backward compatibility.
|
|
466
|
+
params.set("workspace_id", workspaceId);
|
|
467
|
+
params.set("command_center_id", workspaceId);
|
|
468
|
+
}
|
|
373
469
|
return this.get(`/api/entities?${params.toString()}`);
|
|
374
470
|
}
|
|
375
471
|
// ===========================================================================
|
|
@@ -397,6 +493,18 @@ export class OrgXClient {
|
|
|
397
493
|
return response;
|
|
398
494
|
}
|
|
399
495
|
// ===========================================================================
|
|
496
|
+
// Usage (Control Plane + Forecast)
|
|
497
|
+
// ===========================================================================
|
|
498
|
+
async getUsageControlPlaneSummary() {
|
|
499
|
+
return this.get("/api/usage/control-plane/summary");
|
|
500
|
+
}
|
|
501
|
+
async getUsageUnified() {
|
|
502
|
+
return this.get("/api/usage/unified");
|
|
503
|
+
}
|
|
504
|
+
async getUsageForecast() {
|
|
505
|
+
return this.get("/api/usage/forecast");
|
|
506
|
+
}
|
|
507
|
+
// ===========================================================================
|
|
400
508
|
// Reporting Control Plane
|
|
401
509
|
// ===========================================================================
|
|
402
510
|
async emitActivity(payload) {
|
|
@@ -443,31 +551,44 @@ export class OrgXClient {
|
|
|
443
551
|
// Live Sessions + Activity + Handoffs
|
|
444
552
|
// ===========================================================================
|
|
445
553
|
async getLiveSessions(params) {
|
|
554
|
+
const workspaceScope = params?.workspaceId ?? params?.projectId ?? null;
|
|
446
555
|
const query = this.buildQuery({
|
|
447
556
|
limit: params?.limit,
|
|
448
557
|
initiative: params?.initiative ?? null,
|
|
558
|
+
workspace_id: workspaceScope,
|
|
559
|
+
command_center_id: workspaceScope,
|
|
449
560
|
});
|
|
450
561
|
return this.get(`/api/client/live/sessions${query}`);
|
|
451
562
|
}
|
|
452
563
|
async getLiveActivity(params) {
|
|
564
|
+
const workspaceScope = params?.workspaceId ?? params?.projectId ?? null;
|
|
453
565
|
const query = this.buildQuery({
|
|
454
566
|
limit: params?.limit,
|
|
455
567
|
run: params?.run ?? null,
|
|
456
568
|
since: params?.since ?? null,
|
|
569
|
+
workspace_id: workspaceScope,
|
|
570
|
+
command_center_id: workspaceScope,
|
|
457
571
|
});
|
|
458
572
|
return this.get(`/api/client/live/activity${query}`);
|
|
459
573
|
}
|
|
460
574
|
async getLiveAgents(params) {
|
|
575
|
+
const workspaceScope = params?.workspaceId ?? params?.projectId ?? null;
|
|
461
576
|
const query = this.buildQuery({
|
|
462
577
|
initiative: params?.initiative ?? null,
|
|
463
578
|
include_idle: params?.includeIdle ?? undefined,
|
|
579
|
+
workspace_id: workspaceScope,
|
|
580
|
+
command_center_id: workspaceScope,
|
|
464
581
|
});
|
|
465
582
|
return this.get(`/api/client/live/agents${query}`);
|
|
466
583
|
}
|
|
467
584
|
async getLiveInitiatives(params) {
|
|
585
|
+
const workspaceScope = params?.workspaceId ?? params?.projectId ?? null;
|
|
468
586
|
const query = this.buildQuery({
|
|
469
587
|
id: params?.id ?? null,
|
|
470
588
|
limit: params?.limit ?? null,
|
|
589
|
+
offset: params?.offset ?? null,
|
|
590
|
+
workspace_id: workspaceScope,
|
|
591
|
+
command_center_id: workspaceScope,
|
|
471
592
|
});
|
|
472
593
|
return this.get(`/api/client/live/initiatives${query}`);
|
|
473
594
|
}
|
|
@@ -493,9 +614,12 @@ export class OrgXClient {
|
|
|
493
614
|
return this.post(`/api/client/runs/${encodedRunId}/checkpoints/${encodedCheckpointId}/restore`, { reason: request.reason });
|
|
494
615
|
}
|
|
495
616
|
async getLiveDecisions(params) {
|
|
617
|
+
const workspaceScope = params?.workspaceId ?? params?.projectId ?? undefined;
|
|
496
618
|
const response = await this.listEntities("decision", {
|
|
497
619
|
status: params?.status,
|
|
498
620
|
limit: params?.limit,
|
|
621
|
+
workspace_id: workspaceScope,
|
|
622
|
+
command_center_id: workspaceScope,
|
|
499
623
|
});
|
|
500
624
|
const decisions = Array.isArray(response.data) ? response.data : [];
|
|
501
625
|
return {
|
|
@@ -503,32 +627,37 @@ export class OrgXClient {
|
|
|
503
627
|
total: response.pagination?.total ?? decisions.length,
|
|
504
628
|
};
|
|
505
629
|
}
|
|
506
|
-
async decideDecision(id, action,
|
|
507
|
-
const
|
|
508
|
-
const
|
|
630
|
+
async decideDecision(id, action, input) {
|
|
631
|
+
const note = input?.note?.trim() || null;
|
|
632
|
+
const optionId = input?.optionId?.trim() || null;
|
|
633
|
+
const resolvedStatus = action === "approve" ? "approved" : "declined";
|
|
634
|
+
const primaryPatch = {
|
|
635
|
+
status: resolvedStatus,
|
|
636
|
+
...(note ? { resolution_summary: note } : {}),
|
|
637
|
+
...(optionId ? { option_id: optionId } : {}),
|
|
638
|
+
};
|
|
509
639
|
try {
|
|
510
|
-
return await this.updateEntity("decision", id,
|
|
511
|
-
status: resolvedStatus,
|
|
512
|
-
resolution: resolvedStatus,
|
|
513
|
-
resolved_at: resolvedAt,
|
|
514
|
-
decided_at: resolvedAt,
|
|
515
|
-
decided_by: this.userId || undefined,
|
|
516
|
-
note: note ?? undefined,
|
|
517
|
-
});
|
|
640
|
+
return await this.updateEntity("decision", id, primaryPatch);
|
|
518
641
|
}
|
|
519
642
|
catch {
|
|
520
|
-
//
|
|
643
|
+
// Keep fallback payload schema-safe for strict entity routes.
|
|
521
644
|
return this.updateEntity("decision", id, {
|
|
522
|
-
status:
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
645
|
+
status: resolvedStatus,
|
|
646
|
+
...(note
|
|
647
|
+
? {
|
|
648
|
+
metadata: {
|
|
649
|
+
resolution: {
|
|
650
|
+
summary: note,
|
|
651
|
+
note,
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
}
|
|
655
|
+
: {}),
|
|
656
|
+
...(optionId ? { option_id: optionId } : {}),
|
|
528
657
|
});
|
|
529
658
|
}
|
|
530
659
|
}
|
|
531
|
-
async bulkDecideDecisions(ids, action,
|
|
660
|
+
async bulkDecideDecisions(ids, action, input) {
|
|
532
661
|
const uniqueIds = Array.from(new Set(ids.filter(Boolean)));
|
|
533
662
|
const results = new Array(uniqueIds.length);
|
|
534
663
|
let cursor = 0;
|
|
@@ -541,7 +670,7 @@ export class OrgXClient {
|
|
|
541
670
|
}
|
|
542
671
|
const id = uniqueIds[index];
|
|
543
672
|
try {
|
|
544
|
-
const entity = await this.decideDecision(id, action,
|
|
673
|
+
const entity = await this.decideDecision(id, action, input);
|
|
545
674
|
results[index] = { id, ok: true, entity };
|
|
546
675
|
}
|
|
547
676
|
catch (err) {
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
export declare const PRACTICE_EXERCISE_TEMPLATE_SCHEMA_VERSION: "practice-exercise-template.v1";
|
|
2
|
+
export type PracticeExerciseTemplateSchemaVersion = typeof PRACTICE_EXERCISE_TEMPLATE_SCHEMA_VERSION;
|
|
3
|
+
export type PracticeConstraintSeverity = "hard" | "soft";
|
|
4
|
+
export type PracticeTaskType = "analysis" | "implementation" | "review" | "debugging" | "planning";
|
|
5
|
+
export type PracticeOutputFormat = "json_object" | "markdown" | "text";
|
|
6
|
+
export interface PracticeConstraint {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
severity: PracticeConstraintSeverity;
|
|
11
|
+
rationale?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PracticeScenario {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
input: Record<string, unknown>;
|
|
17
|
+
context?: string;
|
|
18
|
+
success_criteria: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface PracticeExpectedOutputField {
|
|
21
|
+
path: string;
|
|
22
|
+
type: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PracticeExpectedOutputShape {
|
|
27
|
+
format: PracticeOutputFormat;
|
|
28
|
+
fields: PracticeExpectedOutputField[];
|
|
29
|
+
example?: Record<string, unknown> | string;
|
|
30
|
+
}
|
|
31
|
+
export interface PracticeExerciseTemplate {
|
|
32
|
+
schema_version: PracticeExerciseTemplateSchemaVersion;
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
summary: string;
|
|
36
|
+
task_type: PracticeTaskType;
|
|
37
|
+
scenarios: PracticeScenario[];
|
|
38
|
+
constraints: PracticeConstraint[];
|
|
39
|
+
expected_output_shape: PracticeExpectedOutputShape;
|
|
40
|
+
tags?: string[];
|
|
41
|
+
}
|
|
42
|
+
export declare function validatePracticeExerciseTemplate(input: unknown): {
|
|
43
|
+
ok: boolean;
|
|
44
|
+
errors: string[];
|
|
45
|
+
template: PracticeExerciseTemplate | null;
|
|
46
|
+
};
|
|
47
|
+
export declare const PRACTICE_EXERCISE_TEMPLATE_JSON_SCHEMA: {
|
|
48
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
49
|
+
readonly $id: "https://schemas.useorgx.com/practice-exercise-template/v1.json";
|
|
50
|
+
readonly title: "OrgX Practice Exercise Template v1";
|
|
51
|
+
readonly description: "Structured exercise template for practice loops with scenarios, constraints, and expected output shape.";
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly additionalProperties: false;
|
|
54
|
+
readonly required: readonly ["schema_version", "id", "title", "summary", "task_type", "scenarios", "constraints", "expected_output_shape"];
|
|
55
|
+
readonly properties: {
|
|
56
|
+
readonly schema_version: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly const: "practice-exercise-template.v1";
|
|
59
|
+
};
|
|
60
|
+
readonly id: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly minLength: 1;
|
|
63
|
+
readonly maxLength: 120;
|
|
64
|
+
};
|
|
65
|
+
readonly title: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
readonly minLength: 1;
|
|
68
|
+
readonly maxLength: 300;
|
|
69
|
+
};
|
|
70
|
+
readonly summary: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly minLength: 1;
|
|
73
|
+
readonly maxLength: 3000;
|
|
74
|
+
};
|
|
75
|
+
readonly task_type: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly enum: readonly ["analysis", "implementation", "review", "debugging", "planning"];
|
|
78
|
+
};
|
|
79
|
+
readonly scenarios: {
|
|
80
|
+
readonly type: "array";
|
|
81
|
+
readonly minItems: 1;
|
|
82
|
+
readonly maxItems: 25;
|
|
83
|
+
readonly items: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly additionalProperties: false;
|
|
86
|
+
readonly required: readonly ["id", "title", "input", "success_criteria"];
|
|
87
|
+
readonly properties: {
|
|
88
|
+
readonly id: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly minLength: 1;
|
|
91
|
+
readonly maxLength: 120;
|
|
92
|
+
};
|
|
93
|
+
readonly title: {
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
readonly minLength: 1;
|
|
96
|
+
readonly maxLength: 300;
|
|
97
|
+
};
|
|
98
|
+
readonly input: {
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly additionalProperties: true;
|
|
101
|
+
};
|
|
102
|
+
readonly context: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly minLength: 1;
|
|
105
|
+
readonly maxLength: 4000;
|
|
106
|
+
};
|
|
107
|
+
readonly success_criteria: {
|
|
108
|
+
readonly type: "array";
|
|
109
|
+
readonly minItems: 1;
|
|
110
|
+
readonly maxItems: 20;
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
readonly minLength: 1;
|
|
114
|
+
readonly maxLength: 1000;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly constraints: {
|
|
121
|
+
readonly type: "array";
|
|
122
|
+
readonly maxItems: 25;
|
|
123
|
+
readonly items: {
|
|
124
|
+
readonly type: "object";
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
readonly required: readonly ["id", "title", "description", "severity"];
|
|
127
|
+
readonly properties: {
|
|
128
|
+
readonly id: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly minLength: 1;
|
|
131
|
+
readonly maxLength: 120;
|
|
132
|
+
};
|
|
133
|
+
readonly title: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly minLength: 1;
|
|
136
|
+
readonly maxLength: 300;
|
|
137
|
+
};
|
|
138
|
+
readonly description: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly minLength: 1;
|
|
141
|
+
readonly maxLength: 2000;
|
|
142
|
+
};
|
|
143
|
+
readonly severity: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly enum: readonly ["hard", "soft"];
|
|
146
|
+
};
|
|
147
|
+
readonly rationale: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly minLength: 1;
|
|
150
|
+
readonly maxLength: 2000;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly expected_output_shape: {
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly additionalProperties: false;
|
|
158
|
+
readonly required: readonly ["format", "fields"];
|
|
159
|
+
readonly properties: {
|
|
160
|
+
readonly format: {
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
readonly enum: readonly ["json_object", "markdown", "text"];
|
|
163
|
+
};
|
|
164
|
+
readonly fields: {
|
|
165
|
+
readonly type: "array";
|
|
166
|
+
readonly minItems: 1;
|
|
167
|
+
readonly maxItems: 50;
|
|
168
|
+
readonly items: {
|
|
169
|
+
readonly type: "object";
|
|
170
|
+
readonly additionalProperties: false;
|
|
171
|
+
readonly required: readonly ["path", "type", "required", "description"];
|
|
172
|
+
readonly properties: {
|
|
173
|
+
readonly path: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly minLength: 1;
|
|
176
|
+
readonly maxLength: 400;
|
|
177
|
+
};
|
|
178
|
+
readonly type: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly minLength: 1;
|
|
181
|
+
readonly maxLength: 120;
|
|
182
|
+
};
|
|
183
|
+
readonly required: {
|
|
184
|
+
readonly type: "boolean";
|
|
185
|
+
};
|
|
186
|
+
readonly description: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly minLength: 1;
|
|
189
|
+
readonly maxLength: 2000;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly example: {
|
|
195
|
+
readonly oneOf: readonly [{
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly minLength: 1;
|
|
198
|
+
readonly maxLength: 20000;
|
|
199
|
+
}, {
|
|
200
|
+
readonly type: "object";
|
|
201
|
+
readonly additionalProperties: true;
|
|
202
|
+
}];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly tags: {
|
|
207
|
+
readonly type: "array";
|
|
208
|
+
readonly maxItems: 30;
|
|
209
|
+
readonly items: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly minLength: 1;
|
|
212
|
+
readonly maxLength: 80;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|