@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.mjs
CHANGED
|
@@ -3786,6 +3786,37 @@ var WorkspaceClient = class {
|
|
|
3786
3786
|
var TasksClient = class {
|
|
3787
3787
|
constructor(_r) {
|
|
3788
3788
|
this._r = _r;
|
|
3789
|
+
// ── release201/10 rev 2 — SPEC.md ─────────────────────────────────────
|
|
3790
|
+
this.spec = {
|
|
3791
|
+
/** Read SPEC.md latest revision. */
|
|
3792
|
+
get: (taskId) => this._r("GET", `/api/im/tasks/${taskId}/spec`),
|
|
3793
|
+
/** Owner sets/updates SPEC.md (writes a new revision). */
|
|
3794
|
+
set: (taskId, input) => this._r("PUT", `/api/im/tasks/${taskId}/spec`, input)
|
|
3795
|
+
};
|
|
3796
|
+
// ── release201/10 rev 2 — TODO.md ─────────────────────────────────────
|
|
3797
|
+
this.todo = {
|
|
3798
|
+
list: (taskId) => this._r("GET", `/api/im/tasks/${taskId}/todo`),
|
|
3799
|
+
add: (taskId, input) => this._r("POST", `/api/im/tasks/${taskId}/todo/items`, input),
|
|
3800
|
+
toggle: (taskId, index, done) => this._r("PATCH", `/api/im/tasks/${taskId}/todo/items/${index}`, { done }),
|
|
3801
|
+
setText: (taskId, index, text) => this._r("PATCH", `/api/im/tasks/${taskId}/todo/items/${index}`, { text }),
|
|
3802
|
+
remove: (taskId, index) => this._r("DELETE", `/api/im/tasks/${taskId}/todo/items/${index}`)
|
|
3803
|
+
};
|
|
3804
|
+
this.criteria = {
|
|
3805
|
+
/** List current criteria via the acceptance view. */
|
|
3806
|
+
list: (taskId) => this._r("GET", `/api/im/tasks/${taskId}/acceptance`),
|
|
3807
|
+
/** Add a criterion (rev 2 — verifyMode + expectation + verifierAgentId). */
|
|
3808
|
+
add: (taskId, input) => this._r("POST", `/api/im/tasks/${taskId}/criteria`, input),
|
|
3809
|
+
/** Update a criterion in place. */
|
|
3810
|
+
update: (taskId, cid, patch) => this._r("PATCH", `/api/im/tasks/${taskId}/criteria/${cid}`, patch),
|
|
3811
|
+
/** Remove a criterion. */
|
|
3812
|
+
remove: (taskId, cid) => this._r("DELETE", `/api/im/tasks/${taskId}/criteria/${cid}`),
|
|
3813
|
+
/**
|
|
3814
|
+
* Unified verify entry (rev 2). Manual reviewer, agent-self-check
|
|
3815
|
+
* report, AND verifier-agent report all use this — cloud routes by
|
|
3816
|
+
* actor identity.
|
|
3817
|
+
*/
|
|
3818
|
+
verify: (taskId, cid, input) => this._r("POST", `/api/im/tasks/${taskId}/criteria/${cid}/verify`, input)
|
|
3819
|
+
};
|
|
3789
3820
|
}
|
|
3790
3821
|
/** Create a new task */
|
|
3791
3822
|
async create(options) {
|
|
@@ -3805,6 +3836,7 @@ var TasksClient = class {
|
|
|
3805
3836
|
if (options?.limit != null) query.limit = String(options.limit);
|
|
3806
3837
|
if (options?.cursor) query.cursor = options.cursor;
|
|
3807
3838
|
if (options?.workspaceId) query.workspaceId = options.workspaceId;
|
|
3839
|
+
if (options?.projectId) query.projectId = options.projectId;
|
|
3808
3840
|
if (options?.conversationId) query.conversationId = options.conversationId;
|
|
3809
3841
|
return this._r("GET", "/api/im/tasks", void 0, query);
|
|
3810
3842
|
}
|
|
@@ -3840,6 +3872,10 @@ var TasksClient = class {
|
|
|
3840
3872
|
async update(taskId, options) {
|
|
3841
3873
|
return this._r("PATCH", `/api/im/tasks/${taskId}`, options);
|
|
3842
3874
|
}
|
|
3875
|
+
/** Move a task into a project, or pass null to return it to workspace-level. */
|
|
3876
|
+
async moveProject(taskId, targetProjectId) {
|
|
3877
|
+
return this._r("POST", `/api/im/tasks/${taskId}/move-project`, { targetProjectId });
|
|
3878
|
+
}
|
|
3843
3879
|
/** Claim a pending task */
|
|
3844
3880
|
async claim(taskId) {
|
|
3845
3881
|
return this._r("POST", `/api/im/tasks/${taskId}/claim`);
|
|
@@ -3894,6 +3930,39 @@ var TasksClient = class {
|
|
|
3894
3930
|
async forceTransition(taskId, options) {
|
|
3895
3931
|
return this._r("POST", `/api/im/tasks/${taskId}/force-transition`, options);
|
|
3896
3932
|
}
|
|
3933
|
+
// ── release201/10 — acceptance criteria ──────────────────────────────
|
|
3934
|
+
/** Get rolled-up acceptance + criteria list for a task. */
|
|
3935
|
+
async getAcceptance(taskId) {
|
|
3936
|
+
return this._r("GET", `/api/im/tasks/${taskId}/acceptance`);
|
|
3937
|
+
}
|
|
3938
|
+
/** Copy a template's criteria onto the task. */
|
|
3939
|
+
async applyTemplate(taskId, templateId) {
|
|
3940
|
+
return this._r("POST", `/api/im/tasks/${taskId}/apply-template`, { templateId });
|
|
3941
|
+
}
|
|
3942
|
+
};
|
|
3943
|
+
var CriteriaTemplatesClient = class {
|
|
3944
|
+
constructor(_r) {
|
|
3945
|
+
this._r = _r;
|
|
3946
|
+
}
|
|
3947
|
+
list(query) {
|
|
3948
|
+
const q = {};
|
|
3949
|
+
if (query?.capability) q.capability = query.capability;
|
|
3950
|
+
if (query?.workspaceId === null) q.workspaceId = "__global";
|
|
3951
|
+
else if (query?.workspaceId) q.workspaceId = query.workspaceId;
|
|
3952
|
+
return this._r("GET", "/api/im/criteria-templates", void 0, q);
|
|
3953
|
+
}
|
|
3954
|
+
get(id) {
|
|
3955
|
+
return this._r("GET", `/api/im/criteria-templates/${id}`);
|
|
3956
|
+
}
|
|
3957
|
+
create(input) {
|
|
3958
|
+
return this._r("POST", "/api/im/criteria-templates", input);
|
|
3959
|
+
}
|
|
3960
|
+
update(id, patch) {
|
|
3961
|
+
return this._r("PATCH", `/api/im/criteria-templates/${id}`, patch);
|
|
3962
|
+
}
|
|
3963
|
+
delete(id) {
|
|
3964
|
+
return this._r("DELETE", `/api/im/criteria-templates/${id}`);
|
|
3965
|
+
}
|
|
3897
3966
|
};
|
|
3898
3967
|
var MemoryClient = class {
|
|
3899
3968
|
constructor(_r) {
|
|
@@ -3966,6 +4035,32 @@ var KnowledgeLinkClient = class {
|
|
|
3966
4035
|
return this._r("GET", "/api/im/knowledge/links", void 0, { entityType, entityId });
|
|
3967
4036
|
}
|
|
3968
4037
|
};
|
|
4038
|
+
var MetricsClient = class {
|
|
4039
|
+
constructor(_r) {
|
|
4040
|
+
this._r = _r;
|
|
4041
|
+
}
|
|
4042
|
+
async emit(input) {
|
|
4043
|
+
return this._r("POST", "/api/im/metrics/emit", input);
|
|
4044
|
+
}
|
|
4045
|
+
async batch(events) {
|
|
4046
|
+
return this._r("POST", "/api/im/metrics/batch", { events });
|
|
4047
|
+
}
|
|
4048
|
+
async aggregate(opts) {
|
|
4049
|
+
const query = {
|
|
4050
|
+
namespace: opts.namespace,
|
|
4051
|
+
name: opts.name,
|
|
4052
|
+
agg: opts.agg
|
|
4053
|
+
};
|
|
4054
|
+
if (opts.range) query.range = opts.range;
|
|
4055
|
+
if (opts.from) query.from = opts.from;
|
|
4056
|
+
if (opts.to) query.to = opts.to;
|
|
4057
|
+
if (opts.groupBy && opts.groupBy.length) query.groupBy = opts.groupBy.join(",");
|
|
4058
|
+
if (opts.bucket) query.bucket = opts.bucket;
|
|
4059
|
+
const filterPairs = Object.entries(opts.filter).map(([k, v]) => `${k}:${v}`);
|
|
4060
|
+
if (filterPairs.length) query.filter = filterPairs.join(",");
|
|
4061
|
+
return this._r("GET", "/api/im/metrics/aggregate", void 0, query);
|
|
4062
|
+
}
|
|
4063
|
+
};
|
|
3969
4064
|
var IdentityClient = class {
|
|
3970
4065
|
constructor(_r) {
|
|
3971
4066
|
this._r = _r;
|
|
@@ -4130,9 +4225,51 @@ var EvolutionSkillsClient = class {
|
|
|
4130
4225
|
return this._r("POST", `/api/im/skills/${encodeURIComponent(skillId)}/star`);
|
|
4131
4226
|
}
|
|
4132
4227
|
};
|
|
4228
|
+
var AgentSkillsClient = class {
|
|
4229
|
+
constructor(_r) {
|
|
4230
|
+
this._r = _r;
|
|
4231
|
+
}
|
|
4232
|
+
/** List skills installed on the agent. */
|
|
4233
|
+
async list(agentId, options) {
|
|
4234
|
+
const query = {};
|
|
4235
|
+
if (options?.workspaceId) query.workspaceId = options.workspaceId;
|
|
4236
|
+
if (options?.includeInactive) query.includeInactive = "true";
|
|
4237
|
+
return this._r("GET", `/api/im/agents/${encodeURIComponent(agentId)}/skills`, void 0, query);
|
|
4238
|
+
}
|
|
4239
|
+
/** Install a published skill onto the agent. */
|
|
4240
|
+
async install(agentId, input) {
|
|
4241
|
+
return this._r("POST", `/api/im/agents/${encodeURIComponent(agentId)}/skills`, input);
|
|
4242
|
+
}
|
|
4243
|
+
/** Uninstall (or disable, for built-ins) a skill from the agent. */
|
|
4244
|
+
async uninstall(agentId, skillIdOrSlug, options) {
|
|
4245
|
+
const query = {};
|
|
4246
|
+
if (options?.workspaceId) query.workspaceId = options.workspaceId;
|
|
4247
|
+
return this._r(
|
|
4248
|
+
"DELETE",
|
|
4249
|
+
`/api/im/agents/${encodeURIComponent(agentId)}/skills/${encodeURIComponent(skillIdOrSlug)}`,
|
|
4250
|
+
void 0,
|
|
4251
|
+
query
|
|
4252
|
+
);
|
|
4253
|
+
}
|
|
4254
|
+
/**
|
|
4255
|
+
* PATCH /api/im/agents/:agentId/skills/:skillId — Update per-skill config.
|
|
4256
|
+
*
|
|
4257
|
+
* Validates against the skill's `executableJson.configSchema` server-side
|
|
4258
|
+
* (release201/13 §3.4 / 07 §2.6). Returns the updated agentSkill row;
|
|
4259
|
+
* `installedRevision` will be null until the next daemon sync poll.
|
|
4260
|
+
*/
|
|
4261
|
+
async updateConfig(agentId, skillId, config, options) {
|
|
4262
|
+
return this._r(
|
|
4263
|
+
"PATCH",
|
|
4264
|
+
`/api/im/agents/${encodeURIComponent(agentId)}/skills/${encodeURIComponent(skillId)}`,
|
|
4265
|
+
{ config, workspaceId: options?.workspaceId }
|
|
4266
|
+
);
|
|
4267
|
+
}
|
|
4268
|
+
};
|
|
4133
4269
|
var AgentsClient = class {
|
|
4134
4270
|
constructor(_r) {
|
|
4135
4271
|
this._r = _r;
|
|
4272
|
+
this.skills = new AgentSkillsClient(_r);
|
|
4136
4273
|
}
|
|
4137
4274
|
async spec(agentId, workspaceId) {
|
|
4138
4275
|
const query = workspaceId ? { workspaceId } : void 0;
|
|
@@ -4169,6 +4306,63 @@ var AgentsClient = class {
|
|
|
4169
4306
|
async deletePack(packIdOrSlug) {
|
|
4170
4307
|
return this._r("DELETE", `/api/im/agent-packs/${encodeURIComponent(packIdOrSlug)}`);
|
|
4171
4308
|
}
|
|
4309
|
+
// release201/09 §9.7.2 Phase 3 — agent quiesce + transfer endpoints.
|
|
4310
|
+
//
|
|
4311
|
+
// pause/resume: workspace owner / orchestrator / admin only. Used by
|
|
4312
|
+
// `prismer agent export` to halt cloud dispatch on the source device
|
|
4313
|
+
// before tarballing the agent dir, and by `prismer agent import` to
|
|
4314
|
+
// resume dispatch on the target device after rebind.
|
|
4315
|
+
async pause(agentId) {
|
|
4316
|
+
return this._r("POST", `/api/im/agents/${encodeURIComponent(agentId)}/pause`, {});
|
|
4317
|
+
}
|
|
4318
|
+
async resume(agentId) {
|
|
4319
|
+
return this._r("POST", `/api/im/agents/${encodeURIComponent(agentId)}/resume`, {});
|
|
4320
|
+
}
|
|
4321
|
+
async transfer(input) {
|
|
4322
|
+
return this._r("POST", "/api/im/agent-bindings/transfer", input);
|
|
4323
|
+
}
|
|
4324
|
+
};
|
|
4325
|
+
var StudioEvolutionClient = class {
|
|
4326
|
+
constructor(_r) {
|
|
4327
|
+
this._r = _r;
|
|
4328
|
+
}
|
|
4329
|
+
/** List capsules emitted by the target agent (workspace-owner-scoped). */
|
|
4330
|
+
async capsules(agentId, options) {
|
|
4331
|
+
const query = { agentId };
|
|
4332
|
+
if (options?.page != null) query.page = String(options.page);
|
|
4333
|
+
if (options?.limit != null) query.limit = String(options.limit);
|
|
4334
|
+
if (options?.scope) query.scope = options.scope;
|
|
4335
|
+
return this._r("GET", "/api/im/studio/evolution/capsules", void 0, query);
|
|
4336
|
+
}
|
|
4337
|
+
/** List genes owned by the target agent (workspace-owner-scoped). */
|
|
4338
|
+
async genes(agentId, options) {
|
|
4339
|
+
const query = { agentId };
|
|
4340
|
+
if (options?.signals) query.signals = options.signals;
|
|
4341
|
+
return this._r("GET", "/api/im/studio/evolution/genes", void 0, query);
|
|
4342
|
+
}
|
|
4343
|
+
};
|
|
4344
|
+
var StudioClient = class {
|
|
4345
|
+
constructor(_r) {
|
|
4346
|
+
this._r = _r;
|
|
4347
|
+
this.evolution = new StudioEvolutionClient(_r);
|
|
4348
|
+
}
|
|
4349
|
+
/** Studio overview — counts + recent activity for a workspace. */
|
|
4350
|
+
async getOverview(workspaceId) {
|
|
4351
|
+
const query = workspaceId ? { workspaceId } : void 0;
|
|
4352
|
+
return this._r("GET", "/api/im/studio/overview", void 0, query);
|
|
4353
|
+
}
|
|
4354
|
+
/** Studio Profile domain — agent identity / personality / credits. */
|
|
4355
|
+
async getProfile(agentId) {
|
|
4356
|
+
const query = agentId ? { agentId } : void 0;
|
|
4357
|
+
return this._r("GET", "/api/im/studio/profile", void 0, query);
|
|
4358
|
+
}
|
|
4359
|
+
/** Studio Installed domain — workspace agents + active agent's skills. */
|
|
4360
|
+
async getInstalled(options) {
|
|
4361
|
+
const query = {};
|
|
4362
|
+
if (options?.workspaceId) query.workspaceId = options.workspaceId;
|
|
4363
|
+
if (options?.agentId) query.agentId = options.agentId;
|
|
4364
|
+
return this._r("GET", "/api/im/studio/installed", void 0, query);
|
|
4365
|
+
}
|
|
4172
4366
|
};
|
|
4173
4367
|
var EvolutionClient = class {
|
|
4174
4368
|
constructor(_r) {
|
|
@@ -4671,6 +4865,8 @@ function safeSlug(input) {
|
|
|
4671
4865
|
var WorkspacesClient = class {
|
|
4672
4866
|
constructor(_r) {
|
|
4673
4867
|
this._r = _r;
|
|
4868
|
+
this.members = new WorkspaceMembersClient(_r);
|
|
4869
|
+
this.invites = new WorkspaceInvitesClient(_r);
|
|
4674
4870
|
}
|
|
4675
4871
|
/** List active workspaces owned by the caller. */
|
|
4676
4872
|
async list() {
|
|
@@ -4726,6 +4922,101 @@ var WorkspacesClient = class {
|
|
|
4726
4922
|
async revokeOrchestrator(workspaceId) {
|
|
4727
4923
|
return this._r("DELETE", `/api/im/workspaces/${workspaceId}/orchestrator`);
|
|
4728
4924
|
}
|
|
4925
|
+
// Sub-clients `members` / `invites` are declared at the top of the class and
|
|
4926
|
+
// wired up inside the constructor body — see `AgentsClient` for the same
|
|
4927
|
+
// pattern. Declaring them as field initializers that reference `this._r`
|
|
4928
|
+
// hits TS2729 because parameter-property assignment happens after class
|
|
4929
|
+
// field initializers under `useDefineForClassFields`.
|
|
4930
|
+
};
|
|
4931
|
+
var WorkspaceMembersClient = class {
|
|
4932
|
+
constructor(_r) {
|
|
4933
|
+
this._r = _r;
|
|
4934
|
+
}
|
|
4935
|
+
async list(workspaceId) {
|
|
4936
|
+
return this._r("GET", `/api/im/workspaces/${workspaceId}/members`);
|
|
4937
|
+
}
|
|
4938
|
+
async add(workspaceId, options) {
|
|
4939
|
+
return this._r("POST", `/api/im/workspaces/${workspaceId}/members`, options);
|
|
4940
|
+
}
|
|
4941
|
+
async update(workspaceId, memberId, options) {
|
|
4942
|
+
return this._r("PATCH", `/api/im/workspaces/${workspaceId}/members/${memberId}`, options);
|
|
4943
|
+
}
|
|
4944
|
+
async remove(workspaceId, memberId) {
|
|
4945
|
+
return this._r("DELETE", `/api/im/workspaces/${workspaceId}/members/${memberId}`);
|
|
4946
|
+
}
|
|
4947
|
+
};
|
|
4948
|
+
var WorkspaceInvitesClient = class {
|
|
4949
|
+
constructor(_r) {
|
|
4950
|
+
this._r = _r;
|
|
4951
|
+
}
|
|
4952
|
+
async create(workspaceId, options) {
|
|
4953
|
+
return this._r("POST", `/api/im/workspaces/${workspaceId}/invites`, options);
|
|
4954
|
+
}
|
|
4955
|
+
async list(workspaceId) {
|
|
4956
|
+
return this._r("GET", `/api/im/workspaces/${workspaceId}/invites`);
|
|
4957
|
+
}
|
|
4958
|
+
async revoke(workspaceId, inviteId) {
|
|
4959
|
+
return this._r("DELETE", `/api/im/workspaces/${workspaceId}/invites/${inviteId}`);
|
|
4960
|
+
}
|
|
4961
|
+
};
|
|
4962
|
+
var InvitesClient = class {
|
|
4963
|
+
constructor(_r) {
|
|
4964
|
+
this._r = _r;
|
|
4965
|
+
}
|
|
4966
|
+
async preview(token) {
|
|
4967
|
+
return this._r("GET", `/api/im/invites/${encodeURIComponent(token)}`);
|
|
4968
|
+
}
|
|
4969
|
+
async accept(token) {
|
|
4970
|
+
return this._r("POST", `/api/im/invites/${encodeURIComponent(token)}/accept`);
|
|
4971
|
+
}
|
|
4972
|
+
async reject(token) {
|
|
4973
|
+
return this._r("POST", `/api/im/invites/${encodeURIComponent(token)}/reject`);
|
|
4974
|
+
}
|
|
4975
|
+
};
|
|
4976
|
+
var ProjectMembersClient = class {
|
|
4977
|
+
constructor(_r) {
|
|
4978
|
+
this._r = _r;
|
|
4979
|
+
}
|
|
4980
|
+
async list(projectId) {
|
|
4981
|
+
return this._r("GET", `/api/im/projects/${projectId}/members`);
|
|
4982
|
+
}
|
|
4983
|
+
async add(projectId, options) {
|
|
4984
|
+
return this._r("POST", `/api/im/projects/${projectId}/members`, options);
|
|
4985
|
+
}
|
|
4986
|
+
async update(projectId, membershipId, options) {
|
|
4987
|
+
return this._r("PATCH", `/api/im/projects/${projectId}/members/${membershipId}`, options);
|
|
4988
|
+
}
|
|
4989
|
+
async remove(projectId, membershipId) {
|
|
4990
|
+
return this._r("DELETE", `/api/im/projects/${projectId}/members/${membershipId}`);
|
|
4991
|
+
}
|
|
4992
|
+
};
|
|
4993
|
+
var ProjectsClient = class {
|
|
4994
|
+
constructor(_r) {
|
|
4995
|
+
this._r = _r;
|
|
4996
|
+
this.members = new ProjectMembersClient(_r);
|
|
4997
|
+
}
|
|
4998
|
+
async list(options) {
|
|
4999
|
+
const query = { workspaceId: options.workspaceId };
|
|
5000
|
+
if (options.status) query.status = options.status;
|
|
5001
|
+
if (options.search) query.search = options.search;
|
|
5002
|
+
if (options.limit !== void 0) query.limit = String(options.limit);
|
|
5003
|
+
if (options.offset !== void 0) query.offset = String(options.offset);
|
|
5004
|
+
return this._r("GET", "/api/im/projects", void 0, query);
|
|
5005
|
+
}
|
|
5006
|
+
async create(options) {
|
|
5007
|
+
return this._r("POST", "/api/im/projects", options);
|
|
5008
|
+
}
|
|
5009
|
+
async get(projectId) {
|
|
5010
|
+
return this._r("GET", `/api/im/projects/${projectId}`);
|
|
5011
|
+
}
|
|
5012
|
+
async update(projectId, options) {
|
|
5013
|
+
return this._r("PATCH", `/api/im/projects/${projectId}`, options);
|
|
5014
|
+
}
|
|
5015
|
+
async delete(projectId, options) {
|
|
5016
|
+
const query = {};
|
|
5017
|
+
if (options?.cascade) query.cascade = options.cascade;
|
|
5018
|
+
return this._r("DELETE", `/api/im/projects/${projectId}`, void 0, query);
|
|
5019
|
+
}
|
|
4729
5020
|
};
|
|
4730
5021
|
var WorkspaceFilesClient = class {
|
|
4731
5022
|
constructor(_r) {
|
|
@@ -5033,10 +5324,18 @@ var RuntimeInstallationsClient = class {
|
|
|
5033
5324
|
constructor(_r) {
|
|
5034
5325
|
this._r = _r;
|
|
5035
5326
|
}
|
|
5036
|
-
/**
|
|
5327
|
+
/**
|
|
5328
|
+
* List runtime installations in a workspace.
|
|
5329
|
+
*
|
|
5330
|
+
* v2.0.8 M448 (release201/20 §1) — `projectId` narrows scope:
|
|
5331
|
+
* - omitted | `'all'` → no project filter (legacy behaviour)
|
|
5332
|
+
* - `'__unscoped'` → only workspace-level rows (projectId IS NULL)
|
|
5333
|
+
* - any other string → exact projectId match
|
|
5334
|
+
*/
|
|
5037
5335
|
async list(workspaceId, options) {
|
|
5038
5336
|
const query = { workspaceId };
|
|
5039
5337
|
if (options?.limit != null) query.limit = String(options.limit);
|
|
5338
|
+
if (options?.projectId) query.projectId = options.projectId;
|
|
5040
5339
|
return this._r("GET", "/api/workspace/runtime-installations", void 0, query);
|
|
5041
5340
|
}
|
|
5042
5341
|
/**
|
|
@@ -5045,10 +5344,27 @@ var RuntimeInstallationsClient = class {
|
|
|
5045
5344
|
* The daemon receives `PRISMER_API_KEY`, `PRISMER_DAEMON_ID`,
|
|
5046
5345
|
* `PRISMER_BASE_URL`, `PRISMER_WORKSPACE_ID`, and
|
|
5047
5346
|
* `PRISMER_RUNTIME_KIND=workspace-daemon` env vars.
|
|
5347
|
+
*
|
|
5348
|
+
* v2.0.8 M448 — `options.projectId` (optional) opts into project scope.
|
|
5349
|
+
* Server validates it belongs to the same workspace and is `active`,
|
|
5350
|
+
* otherwise rejects 422 `PROJECT_WORKSPACE_MISMATCH` / `PROJECT_NOT_ACTIVE`.
|
|
5048
5351
|
*/
|
|
5049
5352
|
async create(options) {
|
|
5050
5353
|
return this._r("POST", "/api/workspace/runtime-installations", options);
|
|
5051
5354
|
}
|
|
5355
|
+
/**
|
|
5356
|
+
* v2.0.8 M448 (release201/20 §1) — update the project binding on an
|
|
5357
|
+
* existing runtime installation. Pass `projectId: null` to detach.
|
|
5358
|
+
* No-op when body omits `projectId`. Same workspace/active invariant as
|
|
5359
|
+
* create — returns 422 on mismatch.
|
|
5360
|
+
*/
|
|
5361
|
+
async patch(runtimeInstallationId, options) {
|
|
5362
|
+
return this._r(
|
|
5363
|
+
"PATCH",
|
|
5364
|
+
`/api/workspace/runtime-installations/${runtimeInstallationId}`,
|
|
5365
|
+
options
|
|
5366
|
+
);
|
|
5367
|
+
}
|
|
5052
5368
|
/**
|
|
5053
5369
|
* Install an agent onto a runtime daemon. Resolves or creates the agent
|
|
5054
5370
|
* profile, calls the controller's `installAgent` RPC, and stamps
|
|
@@ -5389,6 +5705,36 @@ var IMRealtimeClient = class {
|
|
|
5389
5705
|
};
|
|
5390
5706
|
}
|
|
5391
5707
|
};
|
|
5708
|
+
var SkillsDraftClient = class {
|
|
5709
|
+
constructor(_r) {
|
|
5710
|
+
this._r = _r;
|
|
5711
|
+
}
|
|
5712
|
+
/** Create a draft skill from a manifest v1 payload. */
|
|
5713
|
+
async create(input) {
|
|
5714
|
+
return this._r("POST", "/api/im/skills/draft", input);
|
|
5715
|
+
}
|
|
5716
|
+
/** Apply incremental file ops to a draft. */
|
|
5717
|
+
async patch(id, input) {
|
|
5718
|
+
return this._r("PATCH", `/api/im/skills/${id}/draft`, input);
|
|
5719
|
+
}
|
|
5720
|
+
/** Request a regenerate session for a draft. */
|
|
5721
|
+
async regenerate(id, input) {
|
|
5722
|
+
return this._r("POST", `/api/im/skills/${id}/draft/regenerate`, input);
|
|
5723
|
+
}
|
|
5724
|
+
/** Fetch a single draft's manifest + revision history. */
|
|
5725
|
+
async show(id) {
|
|
5726
|
+
return this._r("GET", `/api/im/skills/draft/${id}`);
|
|
5727
|
+
}
|
|
5728
|
+
/** List drafts for a workspace (most-recently-updated first). */
|
|
5729
|
+
async list(workspaceId) {
|
|
5730
|
+
return this._r("GET", "/api/im/skills/drafts", void 0, { workspaceId });
|
|
5731
|
+
}
|
|
5732
|
+
};
|
|
5733
|
+
var SkillsClient = class {
|
|
5734
|
+
constructor(_r) {
|
|
5735
|
+
this.draft = new SkillsDraftClient(_r);
|
|
5736
|
+
}
|
|
5737
|
+
};
|
|
5392
5738
|
var IMClient = class {
|
|
5393
5739
|
constructor(request, wsBase, fetchFn, getAuthHeaders, offlineManager, communityHubConfig) {
|
|
5394
5740
|
this._request = request;
|
|
@@ -5402,16 +5748,22 @@ var IMClient = class {
|
|
|
5402
5748
|
this.credits = new CreditsClient(request);
|
|
5403
5749
|
this.workspace = new WorkspaceClient(request);
|
|
5404
5750
|
this.workspaces = new WorkspacesClient(request);
|
|
5751
|
+
this.invites = new InvitesClient(request);
|
|
5752
|
+
this.projects = new ProjectsClient(request);
|
|
5405
5753
|
this.workspaceFiles = new WorkspaceFilesClient(request);
|
|
5406
5754
|
this.assets = new AssetsClient(request, wsBase, fetchFn, getAuthHeaders);
|
|
5407
5755
|
this.runtimeInstallations = new RuntimeInstallationsClient(request);
|
|
5408
5756
|
this.tasks = new TasksClient(request);
|
|
5757
|
+
this.criteriaTemplates = new CriteriaTemplatesClient(request);
|
|
5409
5758
|
this.memory = new MemoryClient(request);
|
|
5410
5759
|
this.knowledge = new KnowledgeLinkClient(request);
|
|
5760
|
+
this.metrics = new MetricsClient(request);
|
|
5411
5761
|
this.identity = new IdentityClient(request);
|
|
5412
5762
|
this.security = new SecurityClient(request);
|
|
5413
5763
|
this.agents = new AgentsClient(request);
|
|
5414
5764
|
this.evolution = new EvolutionClient(request);
|
|
5765
|
+
this.skills = new SkillsClient(request);
|
|
5766
|
+
this.studio = new StudioClient(request);
|
|
5415
5767
|
this.community = new CommunityHub(request, communityHubConfig ?? void 0);
|
|
5416
5768
|
this.files = new FilesClient(request, wsBase, fetchFn, getAuthHeaders);
|
|
5417
5769
|
this.realtime = new IMRealtimeClient(wsBase, fetchFn);
|
|
@@ -5519,6 +5871,8 @@ var PrismerClient = class {
|
|
|
5519
5871
|
config.community ?? null
|
|
5520
5872
|
);
|
|
5521
5873
|
this.workspaces = this.im.workspaces;
|
|
5874
|
+
this.invites = this.im.invites;
|
|
5875
|
+
this.projects = this.im.projects;
|
|
5522
5876
|
this.workspaceFiles = this.im.workspaceFiles;
|
|
5523
5877
|
this.assets = this.im.assets;
|
|
5524
5878
|
this.evolution = this.im.evolution;
|
|
@@ -5729,6 +6083,7 @@ function createClient(config) {
|
|
|
5729
6083
|
export {
|
|
5730
6084
|
AIPIdentity,
|
|
5731
6085
|
AccountClient,
|
|
6086
|
+
AgentSkillsClient,
|
|
5732
6087
|
AgentsClient,
|
|
5733
6088
|
AssetsClient,
|
|
5734
6089
|
AttachmentQueue,
|
|
@@ -5737,6 +6092,7 @@ export {
|
|
|
5737
6092
|
ContactsClient,
|
|
5738
6093
|
ConversationsClient,
|
|
5739
6094
|
CreditsClient,
|
|
6095
|
+
CriteriaTemplatesClient,
|
|
5740
6096
|
DirectClient,
|
|
5741
6097
|
E2EEncryption,
|
|
5742
6098
|
ENVIRONMENTS,
|
|
@@ -5750,22 +6106,32 @@ export {
|
|
|
5750
6106
|
IMRealtimeClient,
|
|
5751
6107
|
IdentityClient,
|
|
5752
6108
|
IndexedDBStorage,
|
|
6109
|
+
InvitesClient,
|
|
5753
6110
|
KnowledgeLinkClient,
|
|
5754
6111
|
MemoryClient,
|
|
5755
6112
|
MemoryStorage,
|
|
5756
6113
|
MessagesClient,
|
|
6114
|
+
MetricsClient,
|
|
5757
6115
|
OfflineManager,
|
|
5758
6116
|
PrismerClient,
|
|
6117
|
+
ProjectMembersClient,
|
|
6118
|
+
ProjectsClient,
|
|
5759
6119
|
RealtimeSSEClient,
|
|
5760
6120
|
RealtimeWSClient,
|
|
5761
6121
|
RuntimeInstallationsClient,
|
|
5762
6122
|
SQLiteStorage,
|
|
5763
6123
|
SecurityClient,
|
|
6124
|
+
SkillsClient,
|
|
6125
|
+
SkillsDraftClient,
|
|
6126
|
+
StudioClient,
|
|
6127
|
+
StudioEvolutionClient,
|
|
5764
6128
|
TabCoordinator,
|
|
5765
6129
|
TasksClient,
|
|
5766
6130
|
WORKSPACE_ASSETS_ROUTE,
|
|
5767
6131
|
WorkspaceClient,
|
|
5768
6132
|
WorkspaceFilesClient,
|
|
6133
|
+
WorkspaceInvitesClient,
|
|
6134
|
+
WorkspaceMembersClient,
|
|
5769
6135
|
WorkspacesClient,
|
|
5770
6136
|
createClient,
|
|
5771
6137
|
createEnrichedExtractor,
|