tines 0.0.266 → 0.0.267

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 +18 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3466,6 +3466,9 @@ function repoDirFromUrl(url) {
3466
3466
  }
3467
3467
  var ARTIFACT_TYPES = ["file", "text", "link", "pr", "folder"];
3468
3468
  var ARTIFACT_FILE_MAX_BYTES = 25 * 1024 * 1024;
3469
+ var ISSUE_CREATE_FILES_MAX_BYTES = 50 * 1024 * 1024;
3470
+ var ISSUE_CREATE_METADATA_MAX_BYTES = 256 * 1024;
3471
+ var ISSUE_CREATE_MULTIPART_MAX_BYTES = 51 * 1024 * 1024;
3469
3472
  var ARTIFACT_TEXT_MAX_BYTES = 256 * 1024;
3470
3473
  var ARTIFACT_FOLDER_MAX_BYTES = 50 * 1024 * 1024;
3471
3474
  function canonicalGitHubRepoUrl(url) {
@@ -4039,6 +4042,21 @@ function createApiClient(options) {
4039
4042
  removeIssueLabel: (issueId, labelRef) => request("DELETE", `/api/v1/issues/${issueId}/labels/${encodeURIComponent(labelRef)}`),
4040
4043
  listProjectIssues: (projectId, filters = {}) => get(`/api/v1/projects/${projectId}/issues${query(filters)}`),
4041
4044
  createIssue: (projectId, body) => request("POST", `/api/v1/projects/${projectId}/issues`, body),
4045
+ createIssueWithFiles: async (projectId, issue, files2) => {
4046
+ const form = new FormData();
4047
+ const metadata = {
4048
+ issue,
4049
+ attachments: files2.map((file, index) => ({
4050
+ part: `file-${index}`,
4051
+ name: file.name,
4052
+ filename: file.filename
4053
+ }))
4054
+ };
4055
+ form.append("metadata", JSON.stringify(metadata));
4056
+ files2.forEach((file, index) => form.append(`file-${index}`, file.file, file.filename));
4057
+ const res = await raw("POST", `/api/v1/projects/${projectId}/issues`, { body: form });
4058
+ return await res.json();
4059
+ },
4042
4060
  getIssue: (id2) => get(`/api/v1/issues/${id2}`),
4043
4061
  getIssueByNumber: (projectId, number) => get(`/api/v1/projects/${projectId}/issues/${number}`),
4044
4062
  updateIssue: (id2, body) => request("PATCH", `/api/v1/issues/${id2}`, body),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tines",
3
- "version": "0.0.266",
3
+ "version": "0.0.267",
4
4
  "description": "CLI for Tines, an orchestration layer for AI agents",
5
5
  "repository": {
6
6
  "type": "git",