tines 0.0.325 → 0.0.326

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.
Files changed (2) hide show
  1. package/dist/index.js +43 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4194,6 +4194,14 @@ function createApiClient(options) {
4194
4194
  cancelProjectInvitation: (id2, inviteId, expectedGeneration) => request("DELETE", `/api/v1/projects/${id2}/invitations/${inviteId}`, {
4195
4195
  expected_generation: expectedGeneration
4196
4196
  }),
4197
+ listGuidanceInclusions: (id2) => get(`/api/v1/projects/${id2}/guidance-inclusions`),
4198
+ includeGuidanceItem: (id2, itemId) => request("POST", `/api/v1/projects/${id2}/guidance-inclusions`, {
4199
+ item_id: itemId
4200
+ }),
4201
+ excludeGuidanceItem: (id2, itemId) => request(
4202
+ "DELETE",
4203
+ `/api/v1/projects/${id2}/guidance-inclusions/${encodeURIComponent(itemId)}`
4204
+ ),
4197
4205
  removeProjectMember: (id2, userId, expectedRevision) => request(
4198
4206
  "DELETE",
4199
4207
  `/api/v1/projects/${id2}/members/${userId}`,
@@ -8332,8 +8340,14 @@ hint: re-read with \`tines issues show ${ref}\`, then retry with --expect-revisi
8332
8340
  ).action(async (ref, opts) => {
8333
8341
  const api = client(opts);
8334
8342
  const issue = await resolveIssue(api, ref);
8335
- const context2 = await api.getIssueContext(issue.id);
8343
+ const context2 = await api.getIssueContext(issue.id).catch((e) => {
8344
+ if (e instanceof ApiError && e.code.startsWith("bundle_"))
8345
+ die(`shared guidance unavailable: ${e.message}`);
8346
+ throw e;
8347
+ });
8336
8348
  if (opts.json && !opts.out) return printJson(context2);
8349
+ if (context2.shared_bundle)
8350
+ console.error(`Shared guidance from ${context2.shared_bundle.owner.name}'s project`);
8337
8351
  if (opts.out === void 0) {
8338
8352
  if (context2.prompt.text) console.log(context2.prompt.text);
8339
8353
  if (context2.skills.length > 0) {
@@ -9180,6 +9194,34 @@ function register7(program3) {
9180
9194
  console.log(`Left ${project.name}`);
9181
9195
  }
9182
9196
  );
9197
+ const guidance = projects.command("guidance").description("Manage library items included in a shared project's guidance");
9198
+ withCommon(
9199
+ guidance.command("list <project>").description("List a project's included library items")
9200
+ ).action(async (ref, opts) => {
9201
+ const api = client(opts), project = await resolveProject(api, ref), res = await api.listGuidanceInclusions(project.id);
9202
+ if (opts.json) return printJson(res);
9203
+ if (res.items.length === 0) return console.log("No library items included");
9204
+ table([
9205
+ ["KIND", "NAME", "SCOPE", "ID"],
9206
+ ...res.items.map((item) => [item.kind, item.name, item.scope_label, item.item_id])
9207
+ ]);
9208
+ });
9209
+ withCommon(
9210
+ guidance.command("include <project> <item-id>").description("Include a library item in a project's shared guidance")
9211
+ ).action(async (ref, itemId, opts) => {
9212
+ const api = client(opts), project = await resolveProject(api, ref), item = await api.includeGuidanceItem(project.id, itemId);
9213
+ if (opts.json) return printJson(item);
9214
+ console.log(
9215
+ `Included ${item.kind} ${item.name} in ${project.name}'s shared guidance. Everyone in this project and their agents can read it; future edits stay shared.`
9216
+ );
9217
+ });
9218
+ withCommon(
9219
+ guidance.command("exclude <project> <item-id>").description("Remove a library item from a project's shared guidance")
9220
+ ).action(async (ref, itemId, opts) => {
9221
+ const api = client(opts), project = await resolveProject(api, ref), item = await api.excludeGuidanceItem(project.id, itemId);
9222
+ if (opts.json) return printJson(item);
9223
+ console.log(`Removed ${item.kind} ${item.name} from ${project.name}'s shared guidance.`);
9224
+ });
9183
9225
  withCommon(
9184
9226
  projects.command("starters").description("List built-in project starters and their inputs")
9185
9227
  ).action(async (opts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tines",
3
- "version": "0.0.325",
3
+ "version": "0.0.326",
4
4
  "description": "CLI for Tines, an orchestration layer for AI agents",
5
5
  "repository": {
6
6
  "type": "git",