@copass/core
Advanced tools
+71
-2
@@ -758,5 +758,39 @@ // src/auth/api-key.ts | ||
| } | ||
| async update(sandboxId, sourceId, updates) { | ||
| return this.patch(`${base2(sandboxId)}/${sourceId}`, updates); | ||
| /** | ||
| * Patch a data source's mutable config. | ||
| * | ||
| * `options.mergeAdapterConfig` (default `false`) controls whether | ||
| * `adapter_config` is replaced wholesale (default — backward-compat) | ||
| * or **deep-merged** into the existing adapter_config server-side. | ||
| * Top-level keys in the patch override; nested objects recurse. | ||
| * Use the merge form when toggling one nested key (e.g. | ||
| * `ingest_to_graph`) without serialising the rest of the config. | ||
| */ | ||
| async update(sandboxId, sourceId, updates, options = {}) { | ||
| const query = options.mergeAdapterConfig ? { merge_adapter_config: "true" } : void 0; | ||
| return this.patch( | ||
| `${base2(sandboxId)}/${sourceId}`, | ||
| updates, | ||
| query ? { query } : void 0 | ||
| ); | ||
| } | ||
| /** | ||
| * Connect a Linear workspace as a polling data source. | ||
| * | ||
| * Targets `POST /sources/linear` — the secret-aware lifecycle | ||
| * (vault-put before row write, one-shot `tools/list` health check). | ||
| * Distinct from {@link register} because the API key cannot be | ||
| * passed plaintext on `adapter_config`. On health-check failure the | ||
| * source lands with `status='error'`; retry with a fresh key. | ||
| * | ||
| * Tool-shape kept narrow per ADR 0007 §B — no generalisation to a | ||
| * `register_polling_source` pattern until N>1 polling integrations | ||
| * exist. | ||
| */ | ||
| async connectLinear(sandboxId, request) { | ||
| return this.post( | ||
| `${base2(sandboxId)}/linear`, | ||
| request | ||
| ); | ||
| } | ||
| async pause(sandboxId, sourceId) { | ||
@@ -1016,2 +1050,18 @@ return this.post(`${base2(sandboxId)}/${sourceId}/pause`); | ||
| } | ||
| /** | ||
| * Update a trigger by ``trigger_id`` alone — flat top-level route at | ||
| * ``PATCH /sandboxes/{sandbox_id}/triggers/{trigger_id}``. | ||
| * | ||
| * Sibling to :meth:`update`. Use this when the caller has only the | ||
| * ``trigger_id`` (no parent ``slug``) — the service-layer key is | ||
| * ``(user_id, trigger_id)`` so no slug lookup is required. Backs | ||
| * Concierge tools whose input schema only carries ``trigger_id`` | ||
| * (``pause_trigger`` / ``resume_trigger`` / ``update_trigger``). | ||
| */ | ||
| async updateById(sandboxId, triggerId, patch) { | ||
| return this.patch( | ||
| `${BASE3}/${sandboxId}/triggers/${triggerId}`, | ||
| patch | ||
| ); | ||
| } | ||
| }; | ||
@@ -1045,2 +1095,21 @@ var AgentsResource = class extends BaseResource { | ||
| /** | ||
| * Patch an agent's `model_settings` (partial update). | ||
| * | ||
| * Targets `PATCH /agents/{slug}/model-settings`. Distinct from | ||
| * {@link update} so callers can tweak one knob (e.g. switch model | ||
| * or extend `max_turns`) without having to serialise the full | ||
| * settings block. Server reads existing settings, merges the patch | ||
| * in, and writes the merged value via the existing | ||
| * `update_agent(model_settings=...)` path. | ||
| * | ||
| * Backs the Concierge `update_agent_model_settings` management | ||
| * tool. | ||
| */ | ||
| async updateModelSettings(sandboxId, slug, patch) { | ||
| return this.patch( | ||
| `${agentsBase(sandboxId)}/${slug}/model-settings`, | ||
| patch | ||
| ); | ||
| } | ||
| /** | ||
| * Replace an agent's `tool_sources` (the resolver list). | ||
@@ -1047,0 +1116,0 @@ * |
+3
-3
| { | ||
| "name": "@copass/core", | ||
| "version": "0.3.8", | ||
| "version": "0.3.9", | ||
| "description": "Core client SDK for the Copass platform", | ||
@@ -50,3 +50,3 @@ "publishConfig": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/olane-labs/copass-harness.git", | ||
| "url": "git+https://github.com/olane-labs/copass.git", | ||
| "directory": "typescript/packages/core" | ||
@@ -65,3 +65,3 @@ }, | ||
| }, | ||
| "gitHead": "b2bba74253d159b7c917309c6c3ad4d1aa29fc07" | ||
| "gitHead": "554a24e57543835fcc5a18c2b28f12076d005a23" | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
642909
3.84%6283
4.16%