@prismer/sdk 2.0.5 → 2.0.7
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/cli.js +2313 -257
- package/dist/index.d.mts +723 -2
- package/dist/index.d.ts +723 -2
- package/dist/index.js +379 -1
- package/dist/index.mjs +367 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1005,6 +1005,8 @@ interface IMCreateTaskOptions {
|
|
|
1005
1005
|
metadata?: Record<string, unknown>;
|
|
1006
1006
|
/** v1.9.x: workspace scope. Defaults to caller's default workspace. */
|
|
1007
1007
|
workspaceId?: string;
|
|
1008
|
+
/** release201/09 Phase 2: scope task to a project. null = workspace-level. */
|
|
1009
|
+
projectId?: string | null;
|
|
1008
1010
|
/** v1.9.x: link task to a conversation thread. */
|
|
1009
1011
|
conversationId?: string;
|
|
1010
1012
|
/** v1.9.x: pick the executor — `agent` (default), `sandbox`, or `shell`. */
|
|
@@ -1033,6 +1035,8 @@ interface IMTaskListOptions {
|
|
|
1033
1035
|
cursor?: string;
|
|
1034
1036
|
/** v1.9.x: filter by workspace. */
|
|
1035
1037
|
workspaceId?: string;
|
|
1038
|
+
/** release201/09 Phase 2: project filter. Use '__unscoped' for NULL projectId. */
|
|
1039
|
+
projectId?: string;
|
|
1036
1040
|
/** v1.9.x: filter by conversation. */
|
|
1037
1041
|
conversationId?: string;
|
|
1038
1042
|
}
|
|
@@ -1078,6 +1082,10 @@ interface IMTask {
|
|
|
1078
1082
|
retryDelayMs: number;
|
|
1079
1083
|
retryCount: number;
|
|
1080
1084
|
metadata: Record<string, unknown>;
|
|
1085
|
+
/** Workspace (1.9.x); null on legacy rows pre-workspace-scope. */
|
|
1086
|
+
workspaceId?: string | null;
|
|
1087
|
+
/** release201/09 Phase 2 — project scope. NULL = workspace-level. */
|
|
1088
|
+
projectId?: string | null;
|
|
1081
1089
|
createdAt: string;
|
|
1082
1090
|
updatedAt: string;
|
|
1083
1091
|
}
|
|
@@ -1862,6 +1870,13 @@ type RuntimePhase = 'provisioning' | 'online' | 'degraded' | 'stopped' | 'failed
|
|
|
1862
1870
|
interface IMRuntimeInstallation {
|
|
1863
1871
|
id: string;
|
|
1864
1872
|
workspaceId: string;
|
|
1873
|
+
/**
|
|
1874
|
+
* v2.0.8 M448 (release201/20 §1) — optional project scope. `null` means the
|
|
1875
|
+
* installation is workspace-level (default + every pre-M448 row). When set,
|
|
1876
|
+
* narrows UI scope filters / Insights aggregation; daemon dispatch routing
|
|
1877
|
+
* is unaffected (per-agent — see 09 §9.9).
|
|
1878
|
+
*/
|
|
1879
|
+
projectId?: string | null;
|
|
1865
1880
|
runtimeInstanceId: string;
|
|
1866
1881
|
daemonId: string;
|
|
1867
1882
|
podName: string;
|
|
@@ -1912,6 +1927,20 @@ interface IMCreateRuntimeInstallationOptions {
|
|
|
1912
1927
|
cpuLimit?: string;
|
|
1913
1928
|
memoryRequest?: string;
|
|
1914
1929
|
memoryLimit?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* v2.0.8 M448 (release201/20 §1) — opt-in project scope. Must reference an
|
|
1932
|
+
* `active` project in the same workspace; omitting yields a workspace-level
|
|
1933
|
+
* installation (backward-compatible default).
|
|
1934
|
+
*/
|
|
1935
|
+
projectId?: string;
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* v2.0.8 M448 (release201/20 §1) — PATCH body for updating an existing
|
|
1939
|
+
* runtime installation's project binding. The only mutable field today.
|
|
1940
|
+
* Pass `null` to detach the installation from its current project.
|
|
1941
|
+
*/
|
|
1942
|
+
interface IMPatchRuntimeInstallationOptions {
|
|
1943
|
+
projectId?: string | null;
|
|
1915
1944
|
}
|
|
1916
1945
|
interface IMInstallAgentOnRuntimeOptions {
|
|
1917
1946
|
agentImUserId: string;
|
|
@@ -2721,6 +2750,11 @@ interface AgentHostDeclarePayload {
|
|
|
2721
2750
|
platform: 'darwin' | 'linux' | 'win32';
|
|
2722
2751
|
agents: HostedAgentDeclaration[];
|
|
2723
2752
|
}
|
|
2753
|
+
interface RejectedHostedAgent {
|
|
2754
|
+
imUserId: string;
|
|
2755
|
+
reason: 'bound-to-other-daemon' | 'not-owned' | 'unknown';
|
|
2756
|
+
ownerDaemonId?: string;
|
|
2757
|
+
}
|
|
2724
2758
|
interface HostAckedPayload {
|
|
2725
2759
|
workspaceId: string;
|
|
2726
2760
|
syncCursor: {
|
|
@@ -2732,6 +2766,8 @@ interface HostAckedPayload {
|
|
|
2732
2766
|
/** Profile IDs the daemon declared but that no longer exist on the cloud
|
|
2733
2767
|
* (soft-deleted). The daemon should remove these from its local store. */
|
|
2734
2768
|
profilesToDelete: string[];
|
|
2769
|
+
acceptedAgents?: string[];
|
|
2770
|
+
rejectedAgents?: RejectedHostedAgent[];
|
|
2735
2771
|
}
|
|
2736
2772
|
interface AgentStatusChangedPayload {
|
|
2737
2773
|
agentImUserId: string;
|
|
@@ -2813,6 +2849,19 @@ interface AssetDispatchObservation {
|
|
|
2813
2849
|
inlinedBytes?: number;
|
|
2814
2850
|
error?: string;
|
|
2815
2851
|
}
|
|
2852
|
+
/**
|
|
2853
|
+
* P1-2 (2026-05-25): per-file outbox rejection record emitted by daemon when
|
|
2854
|
+
* outbox-watcher quarantines an artifact (MIME ≠ filename extension). Cloud
|
|
2855
|
+
* persists these on `IMTask.metadata.outboxRejections` and re-injects into
|
|
2856
|
+
* the next dispatch prompt as agent-visible feedback.
|
|
2857
|
+
*/
|
|
2858
|
+
interface OutboxRejectionRecord {
|
|
2859
|
+
filename: string;
|
|
2860
|
+
reason: string;
|
|
2861
|
+
inferredMime: string;
|
|
2862
|
+
detectedMime: string;
|
|
2863
|
+
rejectedAt: string;
|
|
2864
|
+
}
|
|
2816
2865
|
interface TaskDispatchReplyPayload {
|
|
2817
2866
|
taskId: string;
|
|
2818
2867
|
ok: boolean;
|
|
@@ -2828,6 +2877,11 @@ interface TaskDispatchReplyPayload {
|
|
|
2828
2877
|
};
|
|
2829
2878
|
/** Wave-8 W1: per-asset handling report. */
|
|
2830
2879
|
assetObservability?: AssetDispatchObservation[];
|
|
2880
|
+
/**
|
|
2881
|
+
* P1-2: files quarantined by daemon outbox-watcher's magic-bytes guard
|
|
2882
|
+
* during this turn. Empty/absent when nothing was rejected.
|
|
2883
|
+
*/
|
|
2884
|
+
outboxRejections?: OutboxRejectionRecord[];
|
|
2831
2885
|
}
|
|
2832
2886
|
interface TaskCancelPayload {
|
|
2833
2887
|
taskId: string;
|
|
@@ -3772,6 +3826,8 @@ declare class TasksClient {
|
|
|
3772
3826
|
getRunResult(runId: string): Promise<IMResult<IMTaskResult>>;
|
|
3773
3827
|
/** Update a task */
|
|
3774
3828
|
update(taskId: string, options: IMUpdateTaskOptions): Promise<IMResult<IMTask>>;
|
|
3829
|
+
/** Move a task into a project, or pass null to return it to workspace-level. */
|
|
3830
|
+
moveProject(taskId: string, targetProjectId: string | null): Promise<IMResult<IMTask>>;
|
|
3775
3831
|
/** Claim a pending task */
|
|
3776
3832
|
claim(taskId: string): Promise<IMResult<IMTask>>;
|
|
3777
3833
|
/** Report progress on a task */
|
|
@@ -3820,6 +3876,85 @@ declare class TasksClient {
|
|
|
3820
3876
|
to: 'pending' | 'assigned' | 'running' | 'review' | 'blocked' | 'failed' | 'completed' | 'cancelled';
|
|
3821
3877
|
reason: string;
|
|
3822
3878
|
}): Promise<IMResult<IMTask>>;
|
|
3879
|
+
/** Get rolled-up acceptance + criteria list for a task. */
|
|
3880
|
+
getAcceptance(taskId: string): Promise<IMResult<unknown>>;
|
|
3881
|
+
/** Copy a template's criteria onto the task. */
|
|
3882
|
+
applyTemplate(taskId: string, templateId: string): Promise<IMResult<unknown>>;
|
|
3883
|
+
readonly spec: {
|
|
3884
|
+
/** Read SPEC.md latest revision. */
|
|
3885
|
+
get: (taskId: string) => Promise<IMResult<unknown>>;
|
|
3886
|
+
/** Owner sets/updates SPEC.md (writes a new revision). */
|
|
3887
|
+
set: (taskId: string, input: {
|
|
3888
|
+
markdown: string;
|
|
3889
|
+
}) => Promise<IMResult<unknown>>;
|
|
3890
|
+
};
|
|
3891
|
+
readonly todo: {
|
|
3892
|
+
list: (taskId: string) => Promise<IMResult<unknown>>;
|
|
3893
|
+
add: (taskId: string, input: {
|
|
3894
|
+
text: string;
|
|
3895
|
+
depth?: number;
|
|
3896
|
+
}) => Promise<IMResult<unknown>>;
|
|
3897
|
+
toggle: (taskId: string, index: number, done?: boolean) => Promise<IMResult<unknown>>;
|
|
3898
|
+
setText: (taskId: string, index: number, text: string) => Promise<IMResult<unknown>>;
|
|
3899
|
+
remove: (taskId: string, index: number) => Promise<IMResult<unknown>>;
|
|
3900
|
+
};
|
|
3901
|
+
readonly criteria: {
|
|
3902
|
+
/** List current criteria via the acceptance view. */
|
|
3903
|
+
list: (taskId: string) => Promise<IMResult<unknown>>;
|
|
3904
|
+
/** Add a criterion (rev 2 — verifyMode + expectation + verifierAgentId). */
|
|
3905
|
+
add: (taskId: string, input: {
|
|
3906
|
+
verifyMode: "qualitative" | "quantitative" | "agent-self-check" | "manual";
|
|
3907
|
+
expectation: string;
|
|
3908
|
+
verifierAgentId?: string | null;
|
|
3909
|
+
required?: boolean;
|
|
3910
|
+
weight?: number;
|
|
3911
|
+
evidenceRefs?: unknown[];
|
|
3912
|
+
}) => Promise<IMResult<unknown>>;
|
|
3913
|
+
/** Update a criterion in place. */
|
|
3914
|
+
update: (taskId: string, cid: string, patch: {
|
|
3915
|
+
expectation?: string;
|
|
3916
|
+
verifyMode?: "qualitative" | "quantitative" | "agent-self-check" | "manual";
|
|
3917
|
+
verifierAgentId?: string | null;
|
|
3918
|
+
weight?: number;
|
|
3919
|
+
required?: boolean;
|
|
3920
|
+
evidenceRefs?: unknown[];
|
|
3921
|
+
}) => Promise<IMResult<unknown>>;
|
|
3922
|
+
/** Remove a criterion. */
|
|
3923
|
+
remove: (taskId: string, cid: string) => Promise<IMResult<unknown>>;
|
|
3924
|
+
/**
|
|
3925
|
+
* Unified verify entry (rev 2). Manual reviewer, agent-self-check
|
|
3926
|
+
* report, AND verifier-agent report all use this — cloud routes by
|
|
3927
|
+
* actor identity.
|
|
3928
|
+
*/
|
|
3929
|
+
verify: (taskId: string, cid: string, input: {
|
|
3930
|
+
outcome: "passed" | "failed" | "n/a" | "waived";
|
|
3931
|
+
note?: string;
|
|
3932
|
+
evidenceRefs?: string[];
|
|
3933
|
+
waiveReason?: string;
|
|
3934
|
+
}) => Promise<IMResult<unknown>>;
|
|
3935
|
+
};
|
|
3936
|
+
}
|
|
3937
|
+
/**
|
|
3938
|
+
* release201/10 — Criteria template store CRUD (workspace + global).
|
|
3939
|
+
*/
|
|
3940
|
+
declare class CriteriaTemplatesClient {
|
|
3941
|
+
private _r;
|
|
3942
|
+
constructor(_r: RequestFn);
|
|
3943
|
+
list(query?: {
|
|
3944
|
+
capability?: string;
|
|
3945
|
+
workspaceId?: string | null;
|
|
3946
|
+
}): Promise<IMResult<unknown[]>>;
|
|
3947
|
+
get(id: string): Promise<IMResult<unknown>>;
|
|
3948
|
+
create(input: {
|
|
3949
|
+
workspaceId?: string | null;
|
|
3950
|
+
capability: string;
|
|
3951
|
+
name: string;
|
|
3952
|
+
description?: string;
|
|
3953
|
+
criteria: unknown[];
|
|
3954
|
+
isDefault?: boolean;
|
|
3955
|
+
}): Promise<IMResult<unknown>>;
|
|
3956
|
+
update(id: string, patch: Record<string, unknown>): Promise<IMResult<unknown>>;
|
|
3957
|
+
delete(id: string): Promise<IMResult<unknown>>;
|
|
3823
3958
|
}
|
|
3824
3959
|
/** Memory management: files, compaction, session load */
|
|
3825
3960
|
declare class MemoryClient {
|
|
@@ -3864,6 +3999,73 @@ declare class KnowledgeLinkClient {
|
|
|
3864
3999
|
*/
|
|
3865
4000
|
getLinks(entityType: KnowledgeLinkSource, entityId: string): Promise<IMResult<IMKnowledgeLink[]>>;
|
|
3866
4001
|
}
|
|
4002
|
+
type MetricAgg = 'sum' | 'count' | 'avg' | 'min' | 'max' | 'p50' | 'p95' | 'p99';
|
|
4003
|
+
type MetricBucket = '5m' | '1h' | '1d';
|
|
4004
|
+
interface MetricEmitInput {
|
|
4005
|
+
namespace: string;
|
|
4006
|
+
name: string;
|
|
4007
|
+
ts?: string;
|
|
4008
|
+
value?: number | string | null;
|
|
4009
|
+
/** workspaceId is required by the server; other dims are free-form. */
|
|
4010
|
+
dims: Record<string, string | number | boolean | null | undefined> & {
|
|
4011
|
+
workspaceId: string;
|
|
4012
|
+
};
|
|
4013
|
+
}
|
|
4014
|
+
interface MetricAggregateOptions {
|
|
4015
|
+
namespace: string;
|
|
4016
|
+
name: string;
|
|
4017
|
+
agg: MetricAgg;
|
|
4018
|
+
/** workspaceId is required; service rejects queries without it. */
|
|
4019
|
+
filter: Record<string, string> & {
|
|
4020
|
+
workspaceId: string;
|
|
4021
|
+
};
|
|
4022
|
+
range?: string;
|
|
4023
|
+
from?: string;
|
|
4024
|
+
to?: string;
|
|
4025
|
+
groupBy?: string[];
|
|
4026
|
+
bucket?: MetricBucket;
|
|
4027
|
+
}
|
|
4028
|
+
interface MetricBucketResult {
|
|
4029
|
+
ts: string | null;
|
|
4030
|
+
groups: Array<{
|
|
4031
|
+
groupKey: Record<string, string | null>;
|
|
4032
|
+
value: number | null;
|
|
4033
|
+
}>;
|
|
4034
|
+
}
|
|
4035
|
+
interface MetricAggregateResponse {
|
|
4036
|
+
namespace: string;
|
|
4037
|
+
name: string;
|
|
4038
|
+
agg: MetricAgg;
|
|
4039
|
+
range: {
|
|
4040
|
+
from: string;
|
|
4041
|
+
to: string;
|
|
4042
|
+
};
|
|
4043
|
+
buckets: MetricBucketResult[];
|
|
4044
|
+
}
|
|
4045
|
+
/**
|
|
4046
|
+
* release201/11 §6 — unified metric data channel.
|
|
4047
|
+
*
|
|
4048
|
+
* - `emit()` queues a single event on the cloud-side MetricService.
|
|
4049
|
+
* - `batch()` ships an array of events (≤ 500) — used by daemon outbox flush
|
|
4050
|
+
* in Phase 2.
|
|
4051
|
+
* - `aggregate()` runs a server-side query against `im_metric_events`.
|
|
4052
|
+
*/
|
|
4053
|
+
declare class MetricsClient {
|
|
4054
|
+
private _r;
|
|
4055
|
+
constructor(_r: RequestFn);
|
|
4056
|
+
emit(input: MetricEmitInput): Promise<IMResult<{
|
|
4057
|
+
queued: boolean;
|
|
4058
|
+
}>>;
|
|
4059
|
+
batch(events: MetricEmitInput[]): Promise<IMResult<{
|
|
4060
|
+
accepted: number;
|
|
4061
|
+
rejected: number;
|
|
4062
|
+
errors: Array<{
|
|
4063
|
+
index: number;
|
|
4064
|
+
error: string;
|
|
4065
|
+
}>;
|
|
4066
|
+
}>>;
|
|
4067
|
+
aggregate(opts: MetricAggregateOptions): Promise<IMResult<MetricAggregateResponse>>;
|
|
4068
|
+
}
|
|
3867
4069
|
/** Identity key management: Ed25519 keys, attestation, audit */
|
|
3868
4070
|
declare class IdentityClient {
|
|
3869
4071
|
private _r;
|
|
@@ -3968,8 +4170,45 @@ declare class EvolutionSkillsClient {
|
|
|
3968
4170
|
}>>;
|
|
3969
4171
|
}
|
|
3970
4172
|
/** Agent 4-tuple lifecycle: spec, snapshots, publish, and fork. */
|
|
4173
|
+
/**
|
|
4174
|
+
* release201/13 §3.4 + §11 13-P2 — Per-agent skill management sub-client.
|
|
4175
|
+
* Surfaces install / uninstall / list / config-update against
|
|
4176
|
+
* `/api/im/agents/:agentId/skills/...`.
|
|
4177
|
+
*/
|
|
4178
|
+
declare class AgentSkillsClient {
|
|
4179
|
+
private _r;
|
|
4180
|
+
constructor(_r: RequestFn);
|
|
4181
|
+
/** List skills installed on the agent. */
|
|
4182
|
+
list(agentId: string, options?: {
|
|
4183
|
+
workspaceId?: string;
|
|
4184
|
+
includeInactive?: boolean;
|
|
4185
|
+
}): Promise<IMResult<unknown[]>>;
|
|
4186
|
+
/** Install a published skill onto the agent. */
|
|
4187
|
+
install(agentId: string, input: {
|
|
4188
|
+
skillId?: string;
|
|
4189
|
+
slug?: string;
|
|
4190
|
+
workspaceId?: string;
|
|
4191
|
+
config?: Record<string, unknown>;
|
|
4192
|
+
version?: string;
|
|
4193
|
+
}): Promise<IMResult<unknown>>;
|
|
4194
|
+
/** Uninstall (or disable, for built-ins) a skill from the agent. */
|
|
4195
|
+
uninstall(agentId: string, skillIdOrSlug: string, options?: {
|
|
4196
|
+
workspaceId?: string;
|
|
4197
|
+
}): Promise<IMResult<unknown>>;
|
|
4198
|
+
/**
|
|
4199
|
+
* PATCH /api/im/agents/:agentId/skills/:skillId — Update per-skill config.
|
|
4200
|
+
*
|
|
4201
|
+
* Validates against the skill's `executableJson.configSchema` server-side
|
|
4202
|
+
* (release201/13 §3.4 / 07 §2.6). Returns the updated agentSkill row;
|
|
4203
|
+
* `installedRevision` will be null until the next daemon sync poll.
|
|
4204
|
+
*/
|
|
4205
|
+
updateConfig(agentId: string, skillId: string, config: Record<string, unknown>, options?: {
|
|
4206
|
+
workspaceId?: string;
|
|
4207
|
+
}): Promise<IMResult<unknown>>;
|
|
4208
|
+
}
|
|
3971
4209
|
declare class AgentsClient {
|
|
3972
4210
|
private _r;
|
|
4211
|
+
readonly skills: AgentSkillsClient;
|
|
3973
4212
|
constructor(_r: RequestFn);
|
|
3974
4213
|
spec(agentId: string, workspaceId?: string): Promise<IMResult<IMAgentSpec>>;
|
|
3975
4214
|
snapshot(agentId: string, options?: IMAgentSnapshotOptions): Promise<IMResult<IMAgentSnapshot>>;
|
|
@@ -3995,6 +4234,148 @@ declare class AgentsClient {
|
|
|
3995
4234
|
deleted: boolean;
|
|
3996
4235
|
packageId: string;
|
|
3997
4236
|
}>>;
|
|
4237
|
+
pause(agentId: string): Promise<IMResult<{
|
|
4238
|
+
agentImUserId: string;
|
|
4239
|
+
pausedAt: string;
|
|
4240
|
+
alreadyPaused: boolean;
|
|
4241
|
+
}>>;
|
|
4242
|
+
resume(agentId: string): Promise<IMResult<{
|
|
4243
|
+
agentImUserId: string;
|
|
4244
|
+
resumed: boolean;
|
|
4245
|
+
}>>;
|
|
4246
|
+
transfer(input: {
|
|
4247
|
+
agentId: string;
|
|
4248
|
+
fromDaemonId: string;
|
|
4249
|
+
toDaemonId: string;
|
|
4250
|
+
manifestSha256: string;
|
|
4251
|
+
}): Promise<IMResult<{
|
|
4252
|
+
agentImUserId: string;
|
|
4253
|
+
previousDaemonId: string;
|
|
4254
|
+
boundDaemonId: string;
|
|
4255
|
+
boundDaemonKind: string;
|
|
4256
|
+
boundDaemonLabel: string;
|
|
4257
|
+
boundBy: string;
|
|
4258
|
+
boundAt: string;
|
|
4259
|
+
manifestSha256: string;
|
|
4260
|
+
}>>;
|
|
4261
|
+
}
|
|
4262
|
+
interface IMStudioOverview {
|
|
4263
|
+
workspaceId: string | null;
|
|
4264
|
+
counts: {
|
|
4265
|
+
drafts: number;
|
|
4266
|
+
inEval: number;
|
|
4267
|
+
pendingReview: number;
|
|
4268
|
+
publishedThisWeek: number;
|
|
4269
|
+
};
|
|
4270
|
+
recentLifecycle: Array<{
|
|
4271
|
+
skillId: string;
|
|
4272
|
+
slug: string;
|
|
4273
|
+
name: string;
|
|
4274
|
+
status: string;
|
|
4275
|
+
updatedAt: string;
|
|
4276
|
+
}>;
|
|
4277
|
+
recentActivity: Array<{
|
|
4278
|
+
type: string;
|
|
4279
|
+
skillSlug?: string;
|
|
4280
|
+
timestamp: string;
|
|
4281
|
+
summary: string;
|
|
4282
|
+
}>;
|
|
4283
|
+
}
|
|
4284
|
+
interface IMStudioAgentSummary {
|
|
4285
|
+
agentId: string;
|
|
4286
|
+
username: string;
|
|
4287
|
+
displayName: string;
|
|
4288
|
+
agentType: string;
|
|
4289
|
+
status: string;
|
|
4290
|
+
workspaceId: string | null;
|
|
4291
|
+
capabilities: string[];
|
|
4292
|
+
}
|
|
4293
|
+
interface IMStudioInstalledSkill {
|
|
4294
|
+
skillId: string;
|
|
4295
|
+
slug: string;
|
|
4296
|
+
name: string;
|
|
4297
|
+
version: string | null;
|
|
4298
|
+
status: string;
|
|
4299
|
+
installedAt: string;
|
|
4300
|
+
lastInvokedAt: string | null;
|
|
4301
|
+
fromGene: boolean;
|
|
4302
|
+
}
|
|
4303
|
+
interface IMStudioInstalled {
|
|
4304
|
+
workspaceId: string | null;
|
|
4305
|
+
agents: IMStudioAgentSummary[];
|
|
4306
|
+
activeAgentId: string | null;
|
|
4307
|
+
skills: IMStudioInstalledSkill[];
|
|
4308
|
+
}
|
|
4309
|
+
interface IMStudioProfile {
|
|
4310
|
+
agentId: string | null;
|
|
4311
|
+
identity: {
|
|
4312
|
+
agentName: string;
|
|
4313
|
+
displayName: string;
|
|
4314
|
+
agentType: string;
|
|
4315
|
+
did: string | null;
|
|
4316
|
+
capabilities: string[];
|
|
4317
|
+
status: string;
|
|
4318
|
+
} | null;
|
|
4319
|
+
personality: {
|
|
4320
|
+
rigor: number;
|
|
4321
|
+
creativity: number;
|
|
4322
|
+
risk_tolerance: number;
|
|
4323
|
+
soul: string | null;
|
|
4324
|
+
} | null;
|
|
4325
|
+
credits: {
|
|
4326
|
+
balance: number;
|
|
4327
|
+
totalSpent: number;
|
|
4328
|
+
totalEarned: number;
|
|
4329
|
+
} | null;
|
|
4330
|
+
workspaces: Array<{
|
|
4331
|
+
workspaceId: string;
|
|
4332
|
+
name: string;
|
|
4333
|
+
}>;
|
|
4334
|
+
}
|
|
4335
|
+
/**
|
|
4336
|
+
* Studio Evolution sub-client (release201/13 §3.6 + §11 13-P3).
|
|
4337
|
+
*
|
|
4338
|
+
* Workspace-owner-scoped capsule + gene listing for any agent the caller can
|
|
4339
|
+
* inspect (own agent, workspace owner / admin / member). Does NOT reuse
|
|
4340
|
+
* `/api/im/evolution/capsules` (which is auth-user-scoped). See §0.2.4
|
|
4341
|
+
* forbidden-pattern: "user-scoped endpoint accessed by workspace-owner".
|
|
4342
|
+
*/
|
|
4343
|
+
declare class StudioEvolutionClient {
|
|
4344
|
+
private _r;
|
|
4345
|
+
constructor(_r: RequestFn);
|
|
4346
|
+
/** List capsules emitted by the target agent (workspace-owner-scoped). */
|
|
4347
|
+
capsules(agentId: string, options?: {
|
|
4348
|
+
page?: number;
|
|
4349
|
+
limit?: number;
|
|
4350
|
+
scope?: string;
|
|
4351
|
+
}): Promise<IMResult<{
|
|
4352
|
+
capsules: unknown[];
|
|
4353
|
+
total: number;
|
|
4354
|
+
page: number;
|
|
4355
|
+
limit: number;
|
|
4356
|
+
agentId: string;
|
|
4357
|
+
}>>;
|
|
4358
|
+
/** List genes owned by the target agent (workspace-owner-scoped). */
|
|
4359
|
+
genes(agentId: string, options?: {
|
|
4360
|
+
signals?: string;
|
|
4361
|
+
}): Promise<IMResult<{
|
|
4362
|
+
genes: unknown[];
|
|
4363
|
+
agentId: string;
|
|
4364
|
+
}>>;
|
|
4365
|
+
}
|
|
4366
|
+
declare class StudioClient {
|
|
4367
|
+
private _r;
|
|
4368
|
+
readonly evolution: StudioEvolutionClient;
|
|
4369
|
+
constructor(_r: RequestFn);
|
|
4370
|
+
/** Studio overview — counts + recent activity for a workspace. */
|
|
4371
|
+
getOverview(workspaceId?: string): Promise<IMResult<IMStudioOverview>>;
|
|
4372
|
+
/** Studio Profile domain — agent identity / personality / credits. */
|
|
4373
|
+
getProfile(agentId?: string): Promise<IMResult<IMStudioProfile>>;
|
|
4374
|
+
/** Studio Installed domain — workspace agents + active agent's skills. */
|
|
4375
|
+
getInstalled(options?: {
|
|
4376
|
+
workspaceId?: string;
|
|
4377
|
+
agentId?: string;
|
|
4378
|
+
}): Promise<IMResult<IMStudioInstalled>>;
|
|
3998
4379
|
}
|
|
3999
4380
|
/** Skill Evolution: gene management, analysis, recording, distillation */
|
|
4000
4381
|
declare class EvolutionClient {
|
|
@@ -4271,6 +4652,8 @@ declare function safeSlug(input: string): string;
|
|
|
4271
4652
|
*/
|
|
4272
4653
|
declare class WorkspacesClient {
|
|
4273
4654
|
private _r;
|
|
4655
|
+
readonly members: WorkspaceMembersClient;
|
|
4656
|
+
readonly invites: WorkspaceInvitesClient;
|
|
4274
4657
|
constructor(_r: RequestFn);
|
|
4275
4658
|
/** List active workspaces owned by the caller. */
|
|
4276
4659
|
list(): Promise<IMResult<IMWorkspace[]>>;
|
|
@@ -4309,6 +4692,202 @@ declare class WorkspacesClient {
|
|
|
4309
4692
|
/** Revoke the workspace's current orchestrator. Owner-only. Idempotent. */
|
|
4310
4693
|
revokeOrchestrator(workspaceId: string): Promise<IMResult<void>>;
|
|
4311
4694
|
}
|
|
4695
|
+
/** Workspace membership role. Different enum from project (16 §5.1 decision). */
|
|
4696
|
+
type WorkspaceRole = 'owner' | 'admin' | 'member';
|
|
4697
|
+
interface IMWorkspaceMember {
|
|
4698
|
+
id: string;
|
|
4699
|
+
workspaceId: string;
|
|
4700
|
+
memberImUserId: string;
|
|
4701
|
+
role: WorkspaceRole;
|
|
4702
|
+
joinedAt: string;
|
|
4703
|
+
}
|
|
4704
|
+
interface WorkspaceMemberAddOptions {
|
|
4705
|
+
memberImUserId: string;
|
|
4706
|
+
/** 'owner' is rejected — use ownership transfer (v2.1+ RFC). */
|
|
4707
|
+
role: 'admin' | 'member';
|
|
4708
|
+
}
|
|
4709
|
+
interface WorkspaceMemberRemoveResult {
|
|
4710
|
+
removed: IMWorkspaceMember;
|
|
4711
|
+
/** Project memberships cascade-removed in the same transaction (16 §3.2.3). */
|
|
4712
|
+
projectMembershipsRemoved: number;
|
|
4713
|
+
}
|
|
4714
|
+
/**
|
|
4715
|
+
* Workspace membership sub-client. Reached as `client.workspaces.members.*`.
|
|
4716
|
+
*
|
|
4717
|
+
* Endpoint semantics (16 §3.3.1):
|
|
4718
|
+
* - list : any workspace member (404 for non-members to prevent enumeration)
|
|
4719
|
+
* - add : owner only; role=owner rejected
|
|
4720
|
+
* - update : owner only; promote-to-owner + demote-owner both rejected
|
|
4721
|
+
* - remove : owner only; owner self-removal rejected; cascades project memberships
|
|
4722
|
+
*/
|
|
4723
|
+
declare class WorkspaceMembersClient {
|
|
4724
|
+
private _r;
|
|
4725
|
+
constructor(_r: RequestFn);
|
|
4726
|
+
list(workspaceId: string): Promise<IMResult<IMWorkspaceMember[]>>;
|
|
4727
|
+
add(workspaceId: string, options: WorkspaceMemberAddOptions): Promise<IMResult<IMWorkspaceMember>>;
|
|
4728
|
+
update(workspaceId: string, memberId: string, options: {
|
|
4729
|
+
role: 'admin' | 'member';
|
|
4730
|
+
}): Promise<IMResult<IMWorkspaceMember>>;
|
|
4731
|
+
remove(workspaceId: string, memberId: string): Promise<IMResult<WorkspaceMemberRemoveResult>>;
|
|
4732
|
+
}
|
|
4733
|
+
/** Invite status. Terminal states are accepted | rejected | revoked | expired. */
|
|
4734
|
+
type WorkspaceInviteStatus = 'pending' | 'accepted' | 'rejected' | 'revoked' | 'expired';
|
|
4735
|
+
type WorkspaceInviteRole = 'admin' | 'member';
|
|
4736
|
+
interface IMWorkspaceInvite {
|
|
4737
|
+
id: string;
|
|
4738
|
+
workspaceId: string;
|
|
4739
|
+
inviterUserId: string;
|
|
4740
|
+
/** Bearer token (URL-safe base64). Treat as a secret — log/redact accordingly. */
|
|
4741
|
+
token: string;
|
|
4742
|
+
inviteeEmail: string | null;
|
|
4743
|
+
inviteeImUserId: string | null;
|
|
4744
|
+
role: WorkspaceInviteRole;
|
|
4745
|
+
status: WorkspaceInviteStatus;
|
|
4746
|
+
expiresAt: string;
|
|
4747
|
+
acceptedByUserId: string | null;
|
|
4748
|
+
acceptedAt: string | null;
|
|
4749
|
+
createdAt: string;
|
|
4750
|
+
updatedAt: string;
|
|
4751
|
+
}
|
|
4752
|
+
interface WorkspaceInviteCreateOptions {
|
|
4753
|
+
/** Pick one: emailed link OR direct-to-imUser request. */
|
|
4754
|
+
inviteeEmail?: string;
|
|
4755
|
+
inviteeImUserId?: string;
|
|
4756
|
+
/** Defaults to 'member' server-side. */
|
|
4757
|
+
role?: WorkspaceInviteRole;
|
|
4758
|
+
/** TTL in days. Defaults to 7; clamped server-side to [1, 30]. */
|
|
4759
|
+
expiresInDays?: number;
|
|
4760
|
+
}
|
|
4761
|
+
/**
|
|
4762
|
+
* Public preview surface. 16 §3.1.4 + §0.2.4: NEVER includes member count,
|
|
4763
|
+
* asset count, or workspace owner identity. Safe for unauthenticated reads.
|
|
4764
|
+
*/
|
|
4765
|
+
interface WorkspaceInvitePreview {
|
|
4766
|
+
workspaceName: string;
|
|
4767
|
+
inviterDisplayName: string;
|
|
4768
|
+
inviterAvatar: string | null;
|
|
4769
|
+
role: WorkspaceInviteRole;
|
|
4770
|
+
status: WorkspaceInviteStatus;
|
|
4771
|
+
expiresAt: string;
|
|
4772
|
+
}
|
|
4773
|
+
/**
|
|
4774
|
+
* Workspace-scoped invite sub-client. Reached as `client.workspaces.invites.*`.
|
|
4775
|
+
*
|
|
4776
|
+
* Token-bearing endpoints (preview/accept/reject) live on `client.invites.*`
|
|
4777
|
+
* because the preview endpoint is public (no auth) — see `InvitesClient`.
|
|
4778
|
+
*/
|
|
4779
|
+
declare class WorkspaceInvitesClient {
|
|
4780
|
+
private _r;
|
|
4781
|
+
constructor(_r: RequestFn);
|
|
4782
|
+
create(workspaceId: string, options: WorkspaceInviteCreateOptions): Promise<IMResult<IMWorkspaceInvite>>;
|
|
4783
|
+
list(workspaceId: string): Promise<IMResult<IMWorkspaceInvite[]>>;
|
|
4784
|
+
revoke(workspaceId: string, inviteId: string): Promise<IMResult<IMWorkspaceInvite>>;
|
|
4785
|
+
}
|
|
4786
|
+
/**
|
|
4787
|
+
* Token-bearing invite sub-client. Reached as `client.invites.*`.
|
|
4788
|
+
*
|
|
4789
|
+
* `preview` is public; the client still uses the configured `request`
|
|
4790
|
+
* pipeline but server-side enforces no auth. Callers running in a
|
|
4791
|
+
* pre-login context should construct the SDK without an apiKey.
|
|
4792
|
+
*/
|
|
4793
|
+
declare class InvitesClient {
|
|
4794
|
+
private _r;
|
|
4795
|
+
constructor(_r: RequestFn);
|
|
4796
|
+
preview(token: string): Promise<IMResult<WorkspaceInvitePreview>>;
|
|
4797
|
+
accept(token: string): Promise<IMResult<IMWorkspaceInvite>>;
|
|
4798
|
+
reject(token: string): Promise<IMResult<IMWorkspaceInvite>>;
|
|
4799
|
+
}
|
|
4800
|
+
/** Project status — 'active' = current; 'archived' = soft-deleted. */
|
|
4801
|
+
type ProjectStatus = 'active' | 'archived';
|
|
4802
|
+
/** Membership role inside a project. */
|
|
4803
|
+
type ProjectMembershipRole = 'owner' | 'contributor' | 'observer';
|
|
4804
|
+
/** Membership principal kind — covers both human and agent principals. */
|
|
4805
|
+
type ProjectPrincipalKind = 'user' | 'agent';
|
|
4806
|
+
/** Soft-delete cascade strategy when removing a project. */
|
|
4807
|
+
type ProjectDeleteCascade = 'archive' | 'null' | 'hard';
|
|
4808
|
+
interface IMProject {
|
|
4809
|
+
id: string;
|
|
4810
|
+
workspaceId: string;
|
|
4811
|
+
slug: string;
|
|
4812
|
+
name: string;
|
|
4813
|
+
description: string | null;
|
|
4814
|
+
status: ProjectStatus;
|
|
4815
|
+
ownerUserId: string;
|
|
4816
|
+
metadata: Record<string, unknown>;
|
|
4817
|
+
createdAt: string;
|
|
4818
|
+
updatedAt: string;
|
|
4819
|
+
archivedAt: string | null;
|
|
4820
|
+
}
|
|
4821
|
+
interface IMProjectWithCounts extends IMProject {
|
|
4822
|
+
memberCount: number;
|
|
4823
|
+
}
|
|
4824
|
+
interface IMProjectMembership {
|
|
4825
|
+
id: string;
|
|
4826
|
+
projectId: string;
|
|
4827
|
+
principalKind: ProjectPrincipalKind;
|
|
4828
|
+
principalId: string;
|
|
4829
|
+
role: ProjectMembershipRole;
|
|
4830
|
+
joinedAt: string;
|
|
4831
|
+
}
|
|
4832
|
+
interface ProjectListResult {
|
|
4833
|
+
items: IMProjectWithCounts[];
|
|
4834
|
+
total: number;
|
|
4835
|
+
}
|
|
4836
|
+
interface ProjectListOptions {
|
|
4837
|
+
workspaceId: string;
|
|
4838
|
+
status?: ProjectStatus;
|
|
4839
|
+
search?: string;
|
|
4840
|
+
limit?: number;
|
|
4841
|
+
offset?: number;
|
|
4842
|
+
}
|
|
4843
|
+
interface ProjectCreateOptions {
|
|
4844
|
+
workspaceId: string;
|
|
4845
|
+
slug: string;
|
|
4846
|
+
name: string;
|
|
4847
|
+
description?: string | null;
|
|
4848
|
+
metadata?: Record<string, unknown>;
|
|
4849
|
+
}
|
|
4850
|
+
interface ProjectUpdateOptions {
|
|
4851
|
+
name?: string;
|
|
4852
|
+
description?: string | null;
|
|
4853
|
+
status?: ProjectStatus;
|
|
4854
|
+
metadata?: Record<string, unknown>;
|
|
4855
|
+
}
|
|
4856
|
+
interface ProjectMemberAddOptions {
|
|
4857
|
+
principalKind: ProjectPrincipalKind;
|
|
4858
|
+
principalId: string;
|
|
4859
|
+
role?: ProjectMembershipRole;
|
|
4860
|
+
}
|
|
4861
|
+
/**
|
|
4862
|
+
* Project membership sub-client — bound to a parent ProjectsClient via the
|
|
4863
|
+
* shared RequestFn. Reached as `client.projects.members.*`.
|
|
4864
|
+
*/
|
|
4865
|
+
declare class ProjectMembersClient {
|
|
4866
|
+
private _r;
|
|
4867
|
+
constructor(_r: RequestFn);
|
|
4868
|
+
list(projectId: string): Promise<IMResult<IMProjectMembership[]>>;
|
|
4869
|
+
add(projectId: string, options: ProjectMemberAddOptions): Promise<IMResult<IMProjectMembership>>;
|
|
4870
|
+
update(projectId: string, membershipId: string, options: {
|
|
4871
|
+
role: ProjectMembershipRole;
|
|
4872
|
+
}): Promise<IMResult<IMProjectMembership>>;
|
|
4873
|
+
remove(projectId: string, membershipId: string): Promise<IMResult<void>>;
|
|
4874
|
+
}
|
|
4875
|
+
/**
|
|
4876
|
+
* Projects API — release201/09 Phase 1 scope container above task.
|
|
4877
|
+
* Opt-in: workspaces without a project still work via NULL projectId on resources.
|
|
4878
|
+
*/
|
|
4879
|
+
declare class ProjectsClient {
|
|
4880
|
+
private _r;
|
|
4881
|
+
readonly members: ProjectMembersClient;
|
|
4882
|
+
constructor(_r: RequestFn);
|
|
4883
|
+
list(options: ProjectListOptions): Promise<IMResult<ProjectListResult>>;
|
|
4884
|
+
create(options: ProjectCreateOptions): Promise<IMResult<IMProject>>;
|
|
4885
|
+
get(projectId: string): Promise<IMResult<IMProjectWithCounts>>;
|
|
4886
|
+
update(projectId: string, options: ProjectUpdateOptions): Promise<IMResult<IMProject>>;
|
|
4887
|
+
delete(projectId: string, options?: {
|
|
4888
|
+
cascade?: ProjectDeleteCascade;
|
|
4889
|
+
}): Promise<IMResult<IMProject>>;
|
|
4890
|
+
}
|
|
4312
4891
|
/**
|
|
4313
4892
|
* Workspace files (v1.9.3). Each file is a `path → assetId` binding inside a
|
|
4314
4893
|
* workspace. POST is auto-versioning: the previous binding at the same path
|
|
@@ -4400,9 +4979,17 @@ declare class AssetsClient {
|
|
|
4400
4979
|
declare class RuntimeInstallationsClient {
|
|
4401
4980
|
private _r;
|
|
4402
4981
|
constructor(_r: RequestFn);
|
|
4403
|
-
/**
|
|
4982
|
+
/**
|
|
4983
|
+
* List runtime installations in a workspace.
|
|
4984
|
+
*
|
|
4985
|
+
* v2.0.8 M448 (release201/20 §1) — `projectId` narrows scope:
|
|
4986
|
+
* - omitted | `'all'` → no project filter (legacy behaviour)
|
|
4987
|
+
* - `'__unscoped'` → only workspace-level rows (projectId IS NULL)
|
|
4988
|
+
* - any other string → exact projectId match
|
|
4989
|
+
*/
|
|
4404
4990
|
list(workspaceId: string, options?: {
|
|
4405
4991
|
limit?: number;
|
|
4992
|
+
projectId?: 'all' | '__unscoped' | string;
|
|
4406
4993
|
}): Promise<IMResult<IMRuntimeInstallation[]>>;
|
|
4407
4994
|
/**
|
|
4408
4995
|
* Create a new runtime installation. Mints a durable runtime API key,
|
|
@@ -4410,8 +4997,19 @@ declare class RuntimeInstallationsClient {
|
|
|
4410
4997
|
* The daemon receives `PRISMER_API_KEY`, `PRISMER_DAEMON_ID`,
|
|
4411
4998
|
* `PRISMER_BASE_URL`, `PRISMER_WORKSPACE_ID`, and
|
|
4412
4999
|
* `PRISMER_RUNTIME_KIND=workspace-daemon` env vars.
|
|
5000
|
+
*
|
|
5001
|
+
* v2.0.8 M448 — `options.projectId` (optional) opts into project scope.
|
|
5002
|
+
* Server validates it belongs to the same workspace and is `active`,
|
|
5003
|
+
* otherwise rejects 422 `PROJECT_WORKSPACE_MISMATCH` / `PROJECT_NOT_ACTIVE`.
|
|
4413
5004
|
*/
|
|
4414
5005
|
create(options: IMCreateRuntimeInstallationOptions): Promise<IMResult<IMRuntimeInstallation>>;
|
|
5006
|
+
/**
|
|
5007
|
+
* v2.0.8 M448 (release201/20 §1) — update the project binding on an
|
|
5008
|
+
* existing runtime installation. Pass `projectId: null` to detach.
|
|
5009
|
+
* No-op when body omits `projectId`. Same workspace/active invariant as
|
|
5010
|
+
* create — returns 422 on mismatch.
|
|
5011
|
+
*/
|
|
5012
|
+
patch(runtimeInstallationId: string, options: IMPatchRuntimeInstallationOptions): Promise<IMResult<IMRuntimeInstallation>>;
|
|
4415
5013
|
/**
|
|
4416
5014
|
* Install an agent onto a runtime daemon. Resolves or creates the agent
|
|
4417
5015
|
* profile, calls the controller's `installAgent` RPC, and stamps
|
|
@@ -4510,6 +5108,113 @@ declare class IMRealtimeClient {
|
|
|
4510
5108
|
disconnect: () => void;
|
|
4511
5109
|
}>;
|
|
4512
5110
|
}
|
|
5111
|
+
interface SkillDraftManifestFile {
|
|
5112
|
+
path: string;
|
|
5113
|
+
/** UTF-8 text content (mutually exclusive with contentBase64). */
|
|
5114
|
+
content?: string;
|
|
5115
|
+
/** Base64 binary content (mutually exclusive with content). */
|
|
5116
|
+
contentBase64?: string;
|
|
5117
|
+
}
|
|
5118
|
+
interface SkillDraftCreateInput {
|
|
5119
|
+
slug: string;
|
|
5120
|
+
name: string;
|
|
5121
|
+
description: string;
|
|
5122
|
+
workspaceId: string;
|
|
5123
|
+
ownerAgentId?: string;
|
|
5124
|
+
files: SkillDraftManifestFile[];
|
|
5125
|
+
metadata?: {
|
|
5126
|
+
authoring?: Record<string, unknown>;
|
|
5127
|
+
};
|
|
5128
|
+
}
|
|
5129
|
+
interface SkillDraftPatchOp {
|
|
5130
|
+
path: string;
|
|
5131
|
+
op: 'add' | 'update' | 'delete';
|
|
5132
|
+
content?: string;
|
|
5133
|
+
contentBase64?: string;
|
|
5134
|
+
}
|
|
5135
|
+
interface SkillDraftPatchInput {
|
|
5136
|
+
files: SkillDraftPatchOp[];
|
|
5137
|
+
reason?: string;
|
|
5138
|
+
}
|
|
5139
|
+
interface SkillDraftRegenerateInput {
|
|
5140
|
+
reason: string;
|
|
5141
|
+
newSources?: Array<{
|
|
5142
|
+
kind: string;
|
|
5143
|
+
ref: string;
|
|
5144
|
+
}>;
|
|
5145
|
+
}
|
|
5146
|
+
interface SkillDraftValidationWarning {
|
|
5147
|
+
gate: string;
|
|
5148
|
+
message: string;
|
|
5149
|
+
}
|
|
5150
|
+
interface SkillDraftCreateResult {
|
|
5151
|
+
id: string;
|
|
5152
|
+
slug: string;
|
|
5153
|
+
manifestRevision: string;
|
|
5154
|
+
reviewTaskId: string | null;
|
|
5155
|
+
validationWarnings: SkillDraftValidationWarning[];
|
|
5156
|
+
}
|
|
5157
|
+
interface SkillDraftDTO {
|
|
5158
|
+
id: string;
|
|
5159
|
+
slug: string;
|
|
5160
|
+
name: string;
|
|
5161
|
+
description: string;
|
|
5162
|
+
status: 'draft';
|
|
5163
|
+
workspaceId: string | null;
|
|
5164
|
+
ownerAgentId: string | null;
|
|
5165
|
+
manifestRevision: string | null;
|
|
5166
|
+
files: Array<{
|
|
5167
|
+
path: string;
|
|
5168
|
+
size: number;
|
|
5169
|
+
sha256: string;
|
|
5170
|
+
inline: boolean;
|
|
5171
|
+
content?: string;
|
|
5172
|
+
url?: string;
|
|
5173
|
+
}>;
|
|
5174
|
+
license: string | null;
|
|
5175
|
+
compatibility: string[];
|
|
5176
|
+
requires: Record<string, unknown>;
|
|
5177
|
+
executableJson: unknown;
|
|
5178
|
+
metadata: Record<string, unknown>;
|
|
5179
|
+
createdAt: string;
|
|
5180
|
+
updatedAt: string;
|
|
5181
|
+
}
|
|
5182
|
+
/**
|
|
5183
|
+
* Skill Draft client — release201/07 skill-authoring engine.
|
|
5184
|
+
*
|
|
5185
|
+
* Surface (mounted at `client.im.skills.draft`):
|
|
5186
|
+
* create, patch, regenerate, show, list
|
|
5187
|
+
*/
|
|
5188
|
+
declare class SkillsDraftClient {
|
|
5189
|
+
private _r;
|
|
5190
|
+
constructor(_r: RequestFn);
|
|
5191
|
+
/** Create a draft skill from a manifest v1 payload. */
|
|
5192
|
+
create(input: SkillDraftCreateInput): Promise<IMResult<SkillDraftCreateResult>>;
|
|
5193
|
+
/** Apply incremental file ops to a draft. */
|
|
5194
|
+
patch(id: string, input: SkillDraftPatchInput): Promise<IMResult<{
|
|
5195
|
+
id: string;
|
|
5196
|
+
manifestRevision: string;
|
|
5197
|
+
}>>;
|
|
5198
|
+
/** Request a regenerate session for a draft. */
|
|
5199
|
+
regenerate(id: string, input: SkillDraftRegenerateInput): Promise<IMResult<{
|
|
5200
|
+
id: string;
|
|
5201
|
+
sessionId: string;
|
|
5202
|
+
manifestRevision: string;
|
|
5203
|
+
}>>;
|
|
5204
|
+
/** Fetch a single draft's manifest + revision history. */
|
|
5205
|
+
show(id: string): Promise<IMResult<SkillDraftDTO>>;
|
|
5206
|
+
/** List drafts for a workspace (most-recently-updated first). */
|
|
5207
|
+
list(workspaceId: string): Promise<IMResult<SkillDraftDTO[]>>;
|
|
5208
|
+
}
|
|
5209
|
+
/**
|
|
5210
|
+
* Top-level skills surface — draft authoring lives under `.draft`. Other
|
|
5211
|
+
* skill operations (search / install / etc.) remain on
|
|
5212
|
+
* `client.im.evolution.skills` for v2.0 compatibility.
|
|
5213
|
+
*/
|
|
5214
|
+
declare class SkillsClient {
|
|
5215
|
+
readonly draft: SkillsDraftClient;
|
|
5216
|
+
constructor(_r: RequestFn);
|
|
5217
|
+
}
|
|
4513
5218
|
declare class IMClient {
|
|
4514
5219
|
readonly account: AccountClient;
|
|
4515
5220
|
readonly direct: DirectClient;
|
|
@@ -4523,6 +5228,10 @@ declare class IMClient {
|
|
|
4523
5228
|
readonly workspace: WorkspaceClient;
|
|
4524
5229
|
/** v1.9.3 first-class workspaces (`/api/im/workspaces`). */
|
|
4525
5230
|
readonly workspaces: WorkspacesClient;
|
|
5231
|
+
/** v2.0.8 release201/16 Phase 9 — token-bearing invite endpoints (preview/accept/reject). */
|
|
5232
|
+
readonly invites: InvitesClient;
|
|
5233
|
+
/** v2.0.7 release201/09 project scope container (`/api/im/projects`). */
|
|
5234
|
+
readonly projects: ProjectsClient;
|
|
4526
5235
|
/** v1.9.3 workspace files (`/api/im/workspaces/:id/files`). */
|
|
4527
5236
|
readonly workspaceFiles: WorkspaceFilesClient;
|
|
4528
5237
|
/** v1.9.3 content-addressed assets (`/api/im/assets`). */
|
|
@@ -4530,12 +5239,20 @@ declare class IMClient {
|
|
|
4530
5239
|
/** v1.9.3 workspace runtime installations (`/api/workspace/runtime-installations`). */
|
|
4531
5240
|
readonly runtimeInstallations: RuntimeInstallationsClient;
|
|
4532
5241
|
readonly tasks: TasksClient;
|
|
5242
|
+
/** release201/10 acceptance template store. */
|
|
5243
|
+
readonly criteriaTemplates: CriteriaTemplatesClient;
|
|
4533
5244
|
readonly memory: MemoryClient;
|
|
4534
5245
|
readonly knowledge: KnowledgeLinkClient;
|
|
5246
|
+
/** v2.0.7 release201/11 — unified metric data channel. */
|
|
5247
|
+
readonly metrics: MetricsClient;
|
|
4535
5248
|
readonly identity: IdentityClient;
|
|
4536
5249
|
readonly security: SecurityClient;
|
|
4537
5250
|
readonly agents: AgentsClient;
|
|
4538
5251
|
readonly evolution: EvolutionClient;
|
|
5252
|
+
/** Top-level skill surface (release201/07 skill-authoring engine; `.draft.*` for drafts). */
|
|
5253
|
+
readonly skills: SkillsClient;
|
|
5254
|
+
/** Skill Studio BFF (release201/13). */
|
|
5255
|
+
readonly studio: StudioClient;
|
|
4539
5256
|
readonly community: CommunityHub;
|
|
4540
5257
|
readonly files: FilesClient;
|
|
4541
5258
|
readonly realtime: IMRealtimeClient;
|
|
@@ -4575,6 +5292,10 @@ declare class PrismerClient {
|
|
|
4575
5292
|
readonly im: IMClient;
|
|
4576
5293
|
/** v2.0 workspace public surface (`/api/im/workspaces`). */
|
|
4577
5294
|
readonly workspaces: WorkspacesClient;
|
|
5295
|
+
/** v2.0.8 release201/16 — token-bearing invite endpoints (preview/accept/reject). */
|
|
5296
|
+
readonly invites: InvitesClient;
|
|
5297
|
+
/** v2.0.7 project scope public surface (`/api/im/projects`). */
|
|
5298
|
+
readonly projects: ProjectsClient;
|
|
4578
5299
|
/** v2.0 workspace file public surface (`/api/im/workspaces/:id/files`). */
|
|
4579
5300
|
readonly workspaceFiles: WorkspaceFilesClient;
|
|
4580
5301
|
/** v2.0 workspace asset public surface (`/api/im/assets`). */
|
|
@@ -4638,4 +5359,4 @@ declare class PrismerClient {
|
|
|
4638
5359
|
|
|
4639
5360
|
declare function createClient(config: PrismerConfig): PrismerClient;
|
|
4640
5361
|
|
|
4641
|
-
export { AccountClient, type AgentChangedPayload, type AgentHostDeclarePayload, type AgentProfileChangedPayload, type AgentStatusChangedPayload, AgentsClient, type AssetChangedPayload, type AssetDispatchObservation, type AssetDispatchStrategy, type AssetRef, AssetsClient, AttachmentQueue, type AudioMime, type AuthenticatedPayload, type BatchSummary, type BatchUrlCost, BindingsClient, type CacheManager, type Card, type CardCreateInput, type CardFilters, type CardKanbanMetadata, type CardKanbanMetadataSource, type CardKanbanStatus, type CardMetadata, type CardMove, type ChatMessage, type CommandResult, CommunityHub, type CommunityHubConfig, ContactsClient, type ContentBlock, type ContentBlockAudio, type ContentBlockFile, type ContentBlockImage, type ContentBlockReasoning, type ContentBlockText, type ContentBlockToolResult, type ContentBlockToolUse, type ContentBlockVideo, type ControlCommand, ConversationsClient, CreditsClient, type DaemonControlPlane, type DecryptResult, type DerivationMode, DirectClient, type DisconnectedPayload, E2EEncryption, ENVIRONMENTS, type EncryptedContextResult, type EncryptedFileResult, type EncryptedMessage, type Environment, type ErrorPayload, EvolutionCache, EvolutionClient, EvolutionRuntime, type EvolutionRuntimeConfig, type EvolutionSession, EvolutionSkillsClient, type EvolutionSyncDelta, type EvolutionSyncSnapshot, type ExecutionContext, type ExecutionPolicy, type FileInput, FilesClient, type GeneCategory, type GeneSelectionResult, type GeneVisibility, GroupsClient, type HostAckedPayload, type HostedAgentDeclaration, type IMAccountDeleteResult, type IMAgentCard, type IMAgentForkOptions, type IMAgentForkResult, type IMAgentPack, type IMAgentPackListOptions, type IMAgentPersonality, type IMAgentPublishOptions, type IMAgentRestoreOptions, type IMAgentSkillAckInput, type IMAgentSkillInstallOptions, type IMAgentSkillListOptions, type IMAgentSkillRecord, type IMAgentSnapshot, type IMAgentSnapshotOptions, type IMAgentSpec, type IMAgentStatus, type IMAnalyzeOptions, type IMAnalyzeResult, type IMAsset, type IMAssetDetail, type IMAssetListOptions, type IMAssetPreviewContract, type IMAssetPreviewKind, type IMAssetPreviewStatus, type IMAssetRevision, type IMAssetRevisionList, type IMAssetUploadOptions, type IMAutocompleteResult, type IMBinding, type IMBindingData, type IMBlockedUser, type IMCapsule, IMClient, type IMCompactOptions, type IMCompactionSummary, type IMCompleteTaskOptions, type IMConfirmResult, type IMContact, type IMConversation, type IMConversationsOptions, type IMCreateBindingOptions, type IMCreateGeneOptions, type IMCreateGroupOptions, type IMCreateMemoryFileOptions, type IMCreateRuntimeInstallationOptions, type IMCreateTaskOptions, type IMCreateWorkspaceFileOptions, type IMCreateWorkspaceOptions, type IMCreditsData, type IMDiscoverAgent, type IMDiscoverOptions, type IMEvolutionEdge, type IMEvolutionStats, type IMFileQuota, type IMForkGeneOptions, type IMFriendRequest, type IMGene, type IMGeneListOptions, type IMGroupData, type IMGroupMember, type IMIdentityKey, type IMInstallAgentOnRuntimeOptions, type IMInstallAgentOnRuntimeResult, type IMKeyAuditEntry, type IMKeyVerifyResult, type IMKnowledgeLink, type IMMeData, type IMMemoryDigest, type IMMemoryDigestOptions, type IMMemoryFile, type IMMemoryFileDetail, type IMMemoryKnowledgeLinks, type IMMemoryLoadResult, type IMMessage, type IMMessageAttachment, type IMMessageData, type IMMultipartInitResult, type IMOwnedAgent, type IMPaginationOptions, type IMPresignOptions, type IMPresignResult, IMRealtimeClient, type IMRecordOutcomeOptions, type IMRegisterData, type IMRegisterKeyOptions, type IMRegisterOptions, type IMResult, type IMRouting, type IMRuntimeInstallation, type IMSendOptions, type IMSkillContent, type IMSkillCreateInput, type IMSkillInfo, type IMSkillInstallResult, type IMSkillSearchOptions, type IMSkillUpdateInput, type IMTask, type IMTaskDetail, type IMTaskListOptions, type IMTaskLog, type IMTaskResult, type IMTokenData, type IMTransaction, type IMUpdateMemoryFileOptions, type IMUpdateTaskOptions, type IMUpdateWorkspaceOptions, type IMUser, type IMUserProfile, type IMWSMessage, type IMWorkspace, type IMWorkspaceData, type IMWorkspaceFile, type IMWorkspaceFileSyncResult, type IMWorkspaceInitGroupOptions, type IMWorkspaceInitOptions, type IMWorkspaceOrchestrator, type IMWorkspaceOrchestratorEnvelope, type IMWorkspaceSyncResult, IdentityClient, type ImageMime, IndexedDBStorage, type KeyManager, KnowledgeLinkClient, type KnowledgeLinkSource, type KnowledgeLinkType, type LLMBackend, type LLMDispatcher, type LLMResult, type LLMTask, type LoadOptions, type LoadResult, type LoadResultItem, MemoryClient, MemoryStorage, type MessageDeletedPayload, type MessageEditPayload, type MessageNewPayload, type MessageReactionPayload, MessagesClient, type ModelEntry, type NotificationSink, type OfflineConfig, type OfflineEventMap, type OfflineEventType, OfflineManager, type OutboxOperation, type ParseCost, type ParseCostBreakdown, type ParseDocument, type ParseDocumentImage, type ParseOptions, type ParseResult, type ParseUsage, type PongPayload, type PresenceChangedPayload, PrismerClient, type PrismerConfig, type PrismerEvent, type QueryCost, type QuerySummary, type QueuedAttachment, type QueuedTask, type RankingFactors, type RealtimeCommand, type RealtimeConfig, type RealtimeEventMap, type RealtimeEventType, RealtimeSSEClient, type RealtimeState, RealtimeWSClient, type ReconnectingPayload, type RequestFn, type RequestOpts, RuntimeInstallationsClient, type RuntimePhase, type RuntimeRoute, SQLiteStorage, type SaveBatchOptions, type SaveOptions, type SaveResult, type ScheduleType, SecurityClient, type SendFileOptions, type SendFileResult, type SessionMetrics, type SignalEnrichmentConfig, type SignalTag, type SingleUrlCost, type StorageAdapter, type StoredContact, type StoredConversation, type StoredMessage, type Suggestion, type SyncEvent, type SyncResult, TabCoordinator, type TaskCancelPayload, type TaskDispatchContextEntry, type TaskDispatchProgressPayload, type TaskDispatchReplyPayload, type TaskDispatchRequestPayload, type TaskEventEnvelope, type TaskEventType, type TaskExecutor, type TaskInput, type TaskKind, type TaskStatus, TasksClient, type TypingIndicatorPayload, type UploadOptions, type UploadResult, type VideoMime, WORKSPACE_ASSETS_ROUTE, type WorkspaceAssetFilters, type WorkspaceAssetRoute, type WorkspaceAssetUploadInput, type WorkspaceAssetsApiContract, type WorkspaceChangedPayload, WorkspaceClient, type WorkspaceFileChangedPayload, WorkspaceFilesClient, WorkspacesClient, createClient, createEnrichedExtractor, decryptContext, decryptFile, decryptMessages, decryptOnReceive, PrismerClient as default, encryptContext, encryptFile, encryptForSend, extractSignals, guessMimeType, readCardKanbanMetadata, safeSlug, writeCardKanbanMetadata };
|
|
5362
|
+
export { AccountClient, type AgentChangedPayload, type AgentHostDeclarePayload, type AgentProfileChangedPayload, AgentSkillsClient, type AgentStatusChangedPayload, AgentsClient, type AssetChangedPayload, type AssetDispatchObservation, type AssetDispatchStrategy, type AssetRef, AssetsClient, AttachmentQueue, type AudioMime, type AuthenticatedPayload, type BatchSummary, type BatchUrlCost, BindingsClient, type CacheManager, type Card, type CardCreateInput, type CardFilters, type CardKanbanMetadata, type CardKanbanMetadataSource, type CardKanbanStatus, type CardMetadata, type CardMove, type ChatMessage, type CommandResult, CommunityHub, type CommunityHubConfig, ContactsClient, type ContentBlock, type ContentBlockAudio, type ContentBlockFile, type ContentBlockImage, type ContentBlockReasoning, type ContentBlockText, type ContentBlockToolResult, type ContentBlockToolUse, type ContentBlockVideo, type ControlCommand, ConversationsClient, CreditsClient, CriteriaTemplatesClient, type DaemonControlPlane, type DecryptResult, type DerivationMode, DirectClient, type DisconnectedPayload, E2EEncryption, ENVIRONMENTS, type EncryptedContextResult, type EncryptedFileResult, type EncryptedMessage, type Environment, type ErrorPayload, EvolutionCache, EvolutionClient, EvolutionRuntime, type EvolutionRuntimeConfig, type EvolutionSession, EvolutionSkillsClient, type EvolutionSyncDelta, type EvolutionSyncSnapshot, type ExecutionContext, type ExecutionPolicy, type FileInput, FilesClient, type GeneCategory, type GeneSelectionResult, type GeneVisibility, GroupsClient, type HostAckedPayload, type HostedAgentDeclaration, type IMAccountDeleteResult, type IMAgentCard, type IMAgentForkOptions, type IMAgentForkResult, type IMAgentPack, type IMAgentPackListOptions, type IMAgentPersonality, type IMAgentPublishOptions, type IMAgentRestoreOptions, type IMAgentSkillAckInput, type IMAgentSkillInstallOptions, type IMAgentSkillListOptions, type IMAgentSkillRecord, type IMAgentSnapshot, type IMAgentSnapshotOptions, type IMAgentSpec, type IMAgentStatus, type IMAnalyzeOptions, type IMAnalyzeResult, type IMAsset, type IMAssetDetail, type IMAssetListOptions, type IMAssetPreviewContract, type IMAssetPreviewKind, type IMAssetPreviewStatus, type IMAssetRevision, type IMAssetRevisionList, type IMAssetUploadOptions, type IMAutocompleteResult, type IMBinding, type IMBindingData, type IMBlockedUser, type IMCapsule, IMClient, type IMCompactOptions, type IMCompactionSummary, type IMCompleteTaskOptions, type IMConfirmResult, type IMContact, type IMConversation, type IMConversationsOptions, type IMCreateBindingOptions, type IMCreateGeneOptions, type IMCreateGroupOptions, type IMCreateMemoryFileOptions, type IMCreateRuntimeInstallationOptions, type IMCreateTaskOptions, type IMCreateWorkspaceFileOptions, type IMCreateWorkspaceOptions, type IMCreditsData, type IMDiscoverAgent, type IMDiscoverOptions, type IMEvolutionEdge, type IMEvolutionStats, type IMFileQuota, type IMForkGeneOptions, type IMFriendRequest, type IMGene, type IMGeneListOptions, type IMGroupData, type IMGroupMember, type IMIdentityKey, type IMInstallAgentOnRuntimeOptions, type IMInstallAgentOnRuntimeResult, type IMKeyAuditEntry, type IMKeyVerifyResult, type IMKnowledgeLink, type IMMeData, type IMMemoryDigest, type IMMemoryDigestOptions, type IMMemoryFile, type IMMemoryFileDetail, type IMMemoryKnowledgeLinks, type IMMemoryLoadResult, type IMMessage, type IMMessageAttachment, type IMMessageData, type IMMultipartInitResult, type IMOwnedAgent, type IMPaginationOptions, type IMPatchRuntimeInstallationOptions, type IMPresignOptions, type IMPresignResult, type IMProject, type IMProjectMembership, type IMProjectWithCounts, IMRealtimeClient, type IMRecordOutcomeOptions, type IMRegisterData, type IMRegisterKeyOptions, type IMRegisterOptions, type IMResult, type IMRouting, type IMRuntimeInstallation, type IMSendOptions, type IMSkillContent, type IMSkillCreateInput, type IMSkillInfo, type IMSkillInstallResult, type IMSkillSearchOptions, type IMSkillUpdateInput, type IMStudioAgentSummary, type IMStudioInstalled, type IMStudioInstalledSkill, type IMStudioOverview, type IMStudioProfile, type IMTask, type IMTaskDetail, type IMTaskListOptions, type IMTaskLog, type IMTaskResult, type IMTokenData, type IMTransaction, type IMUpdateMemoryFileOptions, type IMUpdateTaskOptions, type IMUpdateWorkspaceOptions, type IMUser, type IMUserProfile, type IMWSMessage, type IMWorkspace, type IMWorkspaceData, type IMWorkspaceFile, type IMWorkspaceFileSyncResult, type IMWorkspaceInitGroupOptions, type IMWorkspaceInitOptions, type IMWorkspaceInvite, type IMWorkspaceMember, type IMWorkspaceOrchestrator, type IMWorkspaceOrchestratorEnvelope, type IMWorkspaceSyncResult, IdentityClient, type ImageMime, IndexedDBStorage, InvitesClient, type KeyManager, KnowledgeLinkClient, type KnowledgeLinkSource, type KnowledgeLinkType, type LLMBackend, type LLMDispatcher, type LLMResult, type LLMTask, type LoadOptions, type LoadResult, type LoadResultItem, MemoryClient, MemoryStorage, type MessageDeletedPayload, type MessageEditPayload, type MessageNewPayload, type MessageReactionPayload, MessagesClient, type MetricAgg, type MetricAggregateOptions, type MetricAggregateResponse, type MetricBucket, type MetricBucketResult, type MetricEmitInput, MetricsClient, type ModelEntry, type NotificationSink, type OfflineConfig, type OfflineEventMap, type OfflineEventType, OfflineManager, type OutboxOperation, type OutboxRejectionRecord, type ParseCost, type ParseCostBreakdown, type ParseDocument, type ParseDocumentImage, type ParseOptions, type ParseResult, type ParseUsage, type PongPayload, type PresenceChangedPayload, PrismerClient, type PrismerConfig, type PrismerEvent, type ProjectCreateOptions, type ProjectDeleteCascade, type ProjectListOptions, type ProjectListResult, type ProjectMemberAddOptions, ProjectMembersClient, type ProjectMembershipRole, type ProjectPrincipalKind, type ProjectStatus, type ProjectUpdateOptions, ProjectsClient, type QueryCost, type QuerySummary, type QueuedAttachment, type QueuedTask, type RankingFactors, type RealtimeCommand, type RealtimeConfig, type RealtimeEventMap, type RealtimeEventType, RealtimeSSEClient, type RealtimeState, RealtimeWSClient, type ReconnectingPayload, type RejectedHostedAgent, type RequestFn, type RequestOpts, RuntimeInstallationsClient, type RuntimePhase, type RuntimeRoute, SQLiteStorage, type SaveBatchOptions, type SaveOptions, type SaveResult, type ScheduleType, SecurityClient, type SendFileOptions, type SendFileResult, type SessionMetrics, type SignalEnrichmentConfig, type SignalTag, type SingleUrlCost, type SkillDraftCreateInput, type SkillDraftCreateResult, type SkillDraftDTO, type SkillDraftManifestFile, type SkillDraftPatchInput, type SkillDraftPatchOp, type SkillDraftRegenerateInput, type SkillDraftValidationWarning, SkillsClient, SkillsDraftClient, type StorageAdapter, type StoredContact, type StoredConversation, type StoredMessage, StudioClient, StudioEvolutionClient, type Suggestion, type SyncEvent, type SyncResult, TabCoordinator, type TaskCancelPayload, type TaskDispatchContextEntry, type TaskDispatchProgressPayload, type TaskDispatchReplyPayload, type TaskDispatchRequestPayload, type TaskEventEnvelope, type TaskEventType, type TaskExecutor, type TaskInput, type TaskKind, type TaskStatus, TasksClient, type TypingIndicatorPayload, type UploadOptions, type UploadResult, type VideoMime, WORKSPACE_ASSETS_ROUTE, type WorkspaceAssetFilters, type WorkspaceAssetRoute, type WorkspaceAssetUploadInput, type WorkspaceAssetsApiContract, type WorkspaceChangedPayload, WorkspaceClient, type WorkspaceFileChangedPayload, WorkspaceFilesClient, type WorkspaceInviteCreateOptions, type WorkspaceInvitePreview, type WorkspaceInviteRole, type WorkspaceInviteStatus, WorkspaceInvitesClient, type WorkspaceMemberAddOptions, type WorkspaceMemberRemoveResult, WorkspaceMembersClient, type WorkspaceRole, WorkspacesClient, createClient, createEnrichedExtractor, decryptContext, decryptFile, decryptMessages, decryptOnReceive, PrismerClient as default, encryptContext, encryptFile, encryptForSend, extractSignals, guessMimeType, readCardKanbanMetadata, safeSlug, writeCardKanbanMetadata };
|