teamcopilot 0.4.1 → 0.4.3

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 (28) hide show
  1. package/dist/cronjobs/index.js +5 -0
  2. package/dist/cronjobs/scheduler.js +32 -6
  3. package/dist/frontend/assets/{cssMode-Cqdl5sUM.js → cssMode-DiiiM5B_.js} +1 -1
  4. package/dist/frontend/assets/{freemarker2-ykAhuplU.js → freemarker2-mbYRZM7v.js} +1 -1
  5. package/dist/frontend/assets/{handlebars-DX_JwRM8.js → handlebars-BxsvNCS_.js} +1 -1
  6. package/dist/frontend/assets/{html-Bi_zOcbU.js → html-L2JtNRP-.js} +1 -1
  7. package/dist/frontend/assets/{htmlMode-CkAUoAah.js → htmlMode-C6Ob6SpL.js} +1 -1
  8. package/dist/frontend/assets/{index-Ba9bElZm.css → index-D8Z1_xDr.css} +1 -1
  9. package/dist/frontend/assets/{index-Cgozj4fx.js → index-Tanisj53.js} +225 -225
  10. package/dist/frontend/assets/{javascript-D3Rjwp97.js → javascript-B3VBQ2aj.js} +1 -1
  11. package/dist/frontend/assets/{jsonMode-K4i6LjP2.js → jsonMode-DBfewrrL.js} +1 -1
  12. package/dist/frontend/assets/{liquid-D8F4-sAz.js → liquid-MsmHPgUq.js} +1 -1
  13. package/dist/frontend/assets/{mdx-C2xw8PNz.js → mdx-b592lU5a.js} +1 -1
  14. package/dist/frontend/assets/{python-CqTGfu2v.js → python-CRTDq_yq.js} +1 -1
  15. package/dist/frontend/assets/{razor-DFSsPzdZ.js → razor-Bra6tOBG.js} +1 -1
  16. package/dist/frontend/assets/{tsMode-BkLQEtPb.js → tsMode-DboToZev.js} +1 -1
  17. package/dist/frontend/assets/{typescript-CE_GQ-M1.js → typescript-B1tKC8Cs.js} +1 -1
  18. package/dist/frontend/assets/{xml-CGjMtNcA.js → xml-DwtGsUdF.js} +1 -1
  19. package/dist/frontend/assets/{yaml-Zju9kuFB.js → yaml-BVE9WPwp.js} +1 -1
  20. package/dist/frontend/index.html +2 -2
  21. package/dist/skills/index.js +1 -0
  22. package/dist/utils/cronjob-prompt.js +37 -0
  23. package/dist/utils/resource-file-routes.js +16 -1
  24. package/dist/utils/resource-files.js +24 -0
  25. package/dist/utils/skill-files.js +2 -1
  26. package/dist/utils/workflow-files.js +2 -1
  27. package/dist/workflows/index.js +1 -0
  28. package/package.json +1 -1
@@ -318,6 +318,29 @@ function createResourceFileManager(options) {
318
318
  };
319
319
  return response;
320
320
  }
321
+ function downloadPath(slug, rawPath) {
322
+ const relativePath = normalizeRelativePath(rawPath ?? "", false);
323
+ const absolutePath = resolveTarget(slug, relativePath);
324
+ if (!fs_1.default.existsSync(absolutePath)) {
325
+ throw {
326
+ status: 404,
327
+ message: "File or folder not found"
328
+ };
329
+ }
330
+ assertExistingPathIsSafe(slug, absolutePath);
331
+ const stat = fs_1.default.statSync(absolutePath);
332
+ if (!stat.isFile()) {
333
+ throw {
334
+ status: 400,
335
+ message: "path must be a file"
336
+ };
337
+ }
338
+ return {
339
+ filename: path_1.default.basename(relativePath),
340
+ contentType: "application/octet-stream",
341
+ body: fs_1.default.createReadStream(absolutePath),
342
+ };
343
+ }
321
344
  function saveFileContent(slug, request) {
322
345
  const relativePath = normalizeRelativePath(request.path, false);
323
346
  const absolutePath = resolveTarget(slug, relativePath);
@@ -482,6 +505,7 @@ function createResourceFileManager(options) {
482
505
  return {
483
506
  listDirectory,
484
507
  readFileContent,
508
+ downloadPath,
485
509
  saveFileContent,
486
510
  createFileOrFolder,
487
511
  uploadFileFromTempPath,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteSkillPath = exports.renameSkillPath = exports.uploadSkillFileFromTempPath = exports.createSkillFileOrFolder = exports.saveSkillFileContent = exports.readSkillFileContent = exports.listSkillDirectory = void 0;
3
+ exports.deleteSkillPath = exports.renameSkillPath = exports.uploadSkillFileFromTempPath = exports.createSkillFileOrFolder = exports.saveSkillFileContent = exports.downloadSkillPath = exports.readSkillFileContent = exports.listSkillDirectory = void 0;
4
4
  const resource_files_1 = require("./resource-files");
5
5
  const skill_1 = require("./skill");
6
6
  const secret_contract_validation_1 = require("./secret-contract-validation");
@@ -17,6 +17,7 @@ const skillFileManager = (0, resource_files_1.createResourceFileManager)({
17
17
  });
18
18
  exports.listSkillDirectory = skillFileManager.listDirectory;
19
19
  exports.readSkillFileContent = skillFileManager.readFileContent;
20
+ exports.downloadSkillPath = skillFileManager.downloadPath;
20
21
  exports.saveSkillFileContent = skillFileManager.saveFileContent;
21
22
  exports.createSkillFileOrFolder = skillFileManager.createFileOrFolder;
22
23
  exports.uploadSkillFileFromTempPath = skillFileManager.uploadFileFromTempPath;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteWorkflowPath = exports.renameWorkflowPath = exports.uploadWorkflowFileFromTempPath = exports.createWorkflowFileOrFolder = exports.saveWorkflowFileContent = exports.readWorkflowFileContent = exports.listWorkflowDirectory = void 0;
3
+ exports.deleteWorkflowPath = exports.renameWorkflowPath = exports.uploadWorkflowFileFromTempPath = exports.createWorkflowFileOrFolder = exports.saveWorkflowFileContent = exports.downloadWorkflowPath = exports.readWorkflowFileContent = exports.listWorkflowDirectory = void 0;
4
4
  const resource_files_1 = require("./resource-files");
5
5
  const workflow_1 = require("./workflow");
6
6
  const workflowFileManager = (0, resource_files_1.createResourceFileManager)({
@@ -10,6 +10,7 @@ const workflowFileManager = (0, resource_files_1.createResourceFileManager)({
10
10
  });
11
11
  exports.listWorkflowDirectory = workflowFileManager.listDirectory;
12
12
  exports.readWorkflowFileContent = workflowFileManager.readFileContent;
13
+ exports.downloadWorkflowPath = workflowFileManager.downloadPath;
13
14
  exports.saveWorkflowFileContent = workflowFileManager.saveFileContent;
14
15
  exports.createWorkflowFileOrFolder = workflowFileManager.createFileOrFolder;
15
16
  exports.uploadWorkflowFileFromTempPath = workflowFileManager.uploadFileFromTempPath;
@@ -593,6 +593,7 @@ router.get('/:slug/approval-diff', (0, index_1.apiHandler)(async (req, res) => {
593
593
  assertCanEdit: assertCanEditWorkflowFiles,
594
594
  listDirectory: workflow_files_1.listWorkflowDirectory,
595
595
  readFileContent: workflow_files_1.readWorkflowFileContent,
596
+ downloadPath: workflow_files_1.downloadWorkflowPath,
596
597
  saveFileContent: workflow_files_1.saveWorkflowFileContent,
597
598
  createFileOrFolder: workflow_files_1.createWorkflowFileOrFolder,
598
599
  uploadFileFromTempPath: workflow_files_1.uploadWorkflowFileFromTempPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamcopilot",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "A shared AI Agent for Teams",
5
5
  "homepage": "https://teamcopilot.ai",
6
6
  "repository": {