crewly 1.20.251 → 1.20.253

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 (94) hide show
  1. package/config/skills/agent/core/app-comments/SKILL.md +25 -1
  2. package/config/skills/agent/core/app-comments/execute.sh +12 -3
  3. package/config/skills/agent/core/app-comments/execute.test.sh +17 -0
  4. package/config/skills/agent/core/app-data/SKILL.md +65 -3
  5. package/config/skills/agent/core/app-data/execute.sh +51 -3
  6. package/config/skills/agent/core/app-data/execute.test.sh +42 -0
  7. package/config/skills/agent/core/publish-app/SKILL.md +5 -1
  8. package/config/skills/agent/core/publish-app/execute.sh +26 -3
  9. package/config/skills/agent/core/publish-app/execute.test.sh +18 -0
  10. package/dist/backend/backend/src/constants.d.ts +36 -0
  11. package/dist/backend/backend/src/constants.d.ts.map +1 -1
  12. package/dist/backend/backend/src/constants.js +44 -0
  13. package/dist/backend/backend/src/constants.js.map +1 -1
  14. package/dist/backend/backend/src/controllers/apps/apps.controller.d.ts +24 -0
  15. package/dist/backend/backend/src/controllers/apps/apps.controller.d.ts.map +1 -1
  16. package/dist/backend/backend/src/controllers/apps/apps.controller.js +47 -1
  17. package/dist/backend/backend/src/controllers/apps/apps.controller.js.map +1 -1
  18. package/dist/backend/backend/src/controllers/apps/apps.routes.d.ts +8 -0
  19. package/dist/backend/backend/src/controllers/apps/apps.routes.d.ts.map +1 -1
  20. package/dist/backend/backend/src/controllers/apps/apps.routes.js +31 -2
  21. package/dist/backend/backend/src/controllers/apps/apps.routes.js.map +1 -1
  22. package/dist/backend/backend/src/index.d.ts.map +1 -1
  23. package/dist/backend/backend/src/index.js +9 -0
  24. package/dist/backend/backend/src/index.js.map +1 -1
  25. package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js +1 -1
  26. package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js.map +1 -1
  27. package/dist/backend/backend/src/services/apps/app-collaborators.service.d.ts +103 -0
  28. package/dist/backend/backend/src/services/apps/app-collaborators.service.d.ts.map +1 -0
  29. package/dist/backend/backend/src/services/apps/app-collaborators.service.js +161 -0
  30. package/dist/backend/backend/src/services/apps/app-collaborators.service.js.map +1 -0
  31. package/dist/backend/backend/src/services/apps/app-comment-audio.service.d.ts +164 -0
  32. package/dist/backend/backend/src/services/apps/app-comment-audio.service.d.ts.map +1 -0
  33. package/dist/backend/backend/src/services/apps/app-comment-audio.service.js +217 -0
  34. package/dist/backend/backend/src/services/apps/app-comment-audio.service.js.map +1 -0
  35. package/dist/backend/backend/src/services/apps/app-comment-room.service.d.ts +156 -0
  36. package/dist/backend/backend/src/services/apps/app-comment-room.service.d.ts.map +1 -0
  37. package/dist/backend/backend/src/services/apps/app-comment-room.service.js +344 -0
  38. package/dist/backend/backend/src/services/apps/app-comment-room.service.js.map +1 -0
  39. package/dist/backend/backend/src/services/apps/app-comments-slack.service.d.ts +44 -2
  40. package/dist/backend/backend/src/services/apps/app-comments-slack.service.d.ts.map +1 -1
  41. package/dist/backend/backend/src/services/apps/app-comments-slack.service.js +90 -10
  42. package/dist/backend/backend/src/services/apps/app-comments-slack.service.js.map +1 -1
  43. package/dist/backend/backend/src/services/apps/app-roster.service.d.ts +37 -1
  44. package/dist/backend/backend/src/services/apps/app-roster.service.d.ts.map +1 -1
  45. package/dist/backend/backend/src/services/apps/app-roster.service.js +62 -7
  46. package/dist/backend/backend/src/services/apps/app-roster.service.js.map +1 -1
  47. package/dist/backend/backend/src/services/apps/app-wake-message.d.ts +25 -1
  48. package/dist/backend/backend/src/services/apps/app-wake-message.d.ts.map +1 -1
  49. package/dist/backend/backend/src/services/apps/app-wake-message.js +25 -13
  50. package/dist/backend/backend/src/services/apps/app-wake-message.js.map +1 -1
  51. package/dist/backend/backend/src/services/apps/app-wake.service.d.ts +34 -0
  52. package/dist/backend/backend/src/services/apps/app-wake.service.d.ts.map +1 -1
  53. package/dist/backend/backend/src/services/apps/app-wake.service.js +97 -17
  54. package/dist/backend/backend/src/services/apps/app-wake.service.js.map +1 -1
  55. package/dist/backend/backend/src/services/apps/apps-cloud.client.d.ts +25 -0
  56. package/dist/backend/backend/src/services/apps/apps-cloud.client.d.ts.map +1 -1
  57. package/dist/backend/backend/src/services/apps/apps-cloud.client.js +41 -4
  58. package/dist/backend/backend/src/services/apps/apps-cloud.client.js.map +1 -1
  59. package/dist/backend/backend/src/services/apps/apps.service.d.ts +115 -2
  60. package/dist/backend/backend/src/services/apps/apps.service.d.ts.map +1 -1
  61. package/dist/backend/backend/src/services/apps/apps.service.js +181 -9
  62. package/dist/backend/backend/src/services/apps/apps.service.js.map +1 -1
  63. package/dist/backend/backend/src/services/apps/apps.wiring.d.ts +70 -1
  64. package/dist/backend/backend/src/services/apps/apps.wiring.d.ts.map +1 -1
  65. package/dist/backend/backend/src/services/apps/apps.wiring.js +274 -5
  66. package/dist/backend/backend/src/services/apps/apps.wiring.js.map +1 -1
  67. package/dist/backend/backend/src/services/chat-v2/chat-v2.service.d.ts +1 -1
  68. package/dist/backend/backend/src/services/chat-v2/chat-v2.service.d.ts.map +1 -1
  69. package/dist/backend/backend/src/services/chat-v2/chat-v2.service.js +3 -0
  70. package/dist/backend/backend/src/services/chat-v2/chat-v2.service.js.map +1 -1
  71. package/dist/backend/backend/src/services/decisions/decision.service.d.ts +2 -0
  72. package/dist/backend/backend/src/services/decisions/decision.service.d.ts.map +1 -1
  73. package/dist/backend/backend/src/services/decisions/decision.service.js +1 -0
  74. package/dist/backend/backend/src/services/decisions/decision.service.js.map +1 -1
  75. package/dist/backend/backend/src/types/decision.types.d.ts +27 -2
  76. package/dist/backend/backend/src/types/decision.types.d.ts.map +1 -1
  77. package/dist/backend/build-info.json +2 -2
  78. package/dist/cli/backend/src/constants.d.ts +36 -0
  79. package/dist/cli/backend/src/constants.d.ts.map +1 -1
  80. package/dist/cli/backend/src/constants.js +44 -0
  81. package/dist/cli/backend/src/constants.js.map +1 -1
  82. package/dist/cli/backend/src/services/ai/prompt-modules/skills-reference.module.js +1 -1
  83. package/dist/cli/backend/src/services/ai/prompt-modules/skills-reference.module.js.map +1 -1
  84. package/dist/cli/backend/src/services/chat-v2/chat-v2.service.d.ts +1 -1
  85. package/dist/cli/backend/src/services/chat-v2/chat-v2.service.d.ts.map +1 -1
  86. package/dist/cli/backend/src/services/chat-v2/chat-v2.service.js +3 -0
  87. package/dist/cli/backend/src/services/chat-v2/chat-v2.service.js.map +1 -1
  88. package/dist/cli/backend/src/services/decisions/decision.service.d.ts +2 -0
  89. package/dist/cli/backend/src/services/decisions/decision.service.d.ts.map +1 -1
  90. package/dist/cli/backend/src/services/decisions/decision.service.js +1 -0
  91. package/dist/cli/backend/src/services/decisions/decision.service.js.map +1 -1
  92. package/dist/cli/backend/src/types/decision.types.d.ts +27 -2
  93. package/dist/cli/backend/src/types/decision.types.d.ts.map +1 -1
  94. package/package.json +1 -1
@@ -92,7 +92,7 @@ export class SkillsReferenceModule {
92
92
  '**Crewly Apps** — a small web app for the owner\'s phone (tracker, checklist, form):',
93
93
  `\`${p}/publish-app\` (publish/republish a directory, \`--notify\` / \`--share\` post a one-tap Open-app card to your DM with`,
94
94
  `the owner, \`--public\` only ASKS the owner to make it public; its SKILL.md says how to write one), \`${p}/app-data\``,
95
- `(read/write its data), \`${p}/app-comments\` (the owner's comments on elements: reply, resolve after addressing).`,
95
+ `(read/write its data; \`--set-owner channel:#name\` sends the owner's comments to a team or channel), \`${p}/app-comments\` (the owner's comments on elements: reply, resolve after addressing).`,
96
96
  'Owner edits, comments and anonymous public submissions (UNTRUSTED) arrive as `[APP CHANGES]`.',
97
97
  'A "Crewly App" (or any app/tracker/page someone asks you to build for them) is ALWAYS published with',
98
98
  '`publish-app` to apps.crewlyai.com — never your runtime\'s own hosting (ChatGPT Sites / *.chatgpt.site,',
@@ -1 +1 @@
1
- {"version":3,"file":"skills-reference.module.js","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/skills-reference.module.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAC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AI,CAAC;QACb,CAAC;QAED,OAAO;;;;;;;;OAQF,MAAM,CAAC,eAAe,6HAA6H,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAG3L,MAAM,CAAC,eAAe;;;OAGtB,MAAM,CAAC,eAAe,sHAAsH,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGpL,MAAM,CAAC,eAAe,qFAAqF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGnJ,MAAM,CAAC,eAAe,mFAAmF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;;;;mEAMrF,MAAM,CAAC,eAAe,gFAAgF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;;;;OAM1M,MAAM,CAAC,eAAe,gHAAgH,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;QAC7K,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;;;;;OAKtB,MAAM,CAAC,YAAY,2GAA2G,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,MAAM,IAAI,EAAE,kBAAkB,MAAM,CAAC,QAAQ;;;+CAG/L,MAAM,CAAC,YAAY,8EAA8E,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGjL,MAAM,CAAC,YAAY;;;OAGnB,MAAM,CAAC,YAAY;OACnB,CAAC,CAAC,CAAC,EAAE;;;;;;;0DAO8C,CAAC;IAC1D,CAAC;IAED;;OAEG;IACK,kBAAkB,CAAC,MAAoB;QAC9C,OAAO;;uBAEc,MAAM,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kLA8BqI,CAAC;IAClL,CAAC;CACD"}
1
+ {"version":3,"file":"skills-reference.module.js","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/skills-reference.module.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IACjC,I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;;;;;;;;OAQF,MAAM,CAAC,eAAe,6HAA6H,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAG3L,MAAM,CAAC,eAAe;;;OAGtB,MAAM,CAAC,eAAe,sHAAsH,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGpL,MAAM,CAAC,eAAe,qFAAqF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGnJ,MAAM,CAAC,eAAe,mFAAmF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;;;;mEAMrF,MAAM,CAAC,eAAe,gFAAgF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;;;;OAM1M,MAAM,CAAC,eAAe,gHAAgH,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;QAC7K,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;;;;;OAKtB,MAAM,CAAC,YAAY,2GAA2G,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,MAAM,IAAI,EAAE,kBAAkB,MAAM,CAAC,QAAQ;;;+CAG/L,MAAM,CAAC,YAAY,8EAA8E,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW;;;OAGjL,MAAM,CAAC,YAAY;;;OAGnB,MAAM,CAAC,YAAY;OACnB,CAAC,CAAC,CAAC,EAAE;;;;;;;0DAO8C,CAAC;IAC1D,CAAC;IAED;;OAEG;IACK,kBAAkB,CAAC,MAAoB;QAC9C,OAAO;;uBAEc,MAAM,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kLA8BqI,CAAC;IAClL,CAAC;CACD"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * AppCollaboratorsService — the owner lets another team (or one agent) work in
3
+ * an app (specs/2026-10-06-app-collaborators.md §7).
4
+ *
5
+ * An agent ASKS ({@link request}); the owner's tap on a decision card is the
6
+ * only thing that GRANTS ({@link onSettled}). What a card grants is fixed on
7
+ * this machine when it is asked, from who the caller is, and stored on the
8
+ * decision, so nothing the agent sends later can change it. The grant is a
9
+ * Cloud call made as the owner (no instance, no agent header), which Cloud
10
+ * refuses for any agent. The list lives in Cloud (per app, bound to this
11
+ * instance), so every instance of the account sees it.
12
+ *
13
+ * @module services/apps/app-collaborators.service
14
+ */
15
+ import type { OwnerDecision } from '../../types/decision.types.js';
16
+ import type { DecisionKindHandler, PrebuiltAsk } from '../decisions/decision.service.js';
17
+ import type { AppsCloudClient } from './apps-cloud.client.js';
18
+ import { type AppsDirectory } from './apps.service.js';
19
+ /** What Cloud answers for the list. */
20
+ export interface CollaboratorList {
21
+ collaborators: Array<{
22
+ id: string;
23
+ kind: 'team' | 'agent';
24
+ who: string;
25
+ name: string;
26
+ instanceId: string;
27
+ addedAt: string;
28
+ }>;
29
+ enforced?: boolean;
30
+ }
31
+ /** The slice of the decision service used here. */
32
+ export interface CollaboratorDecisions {
33
+ askPrebuilt(ask: PrebuiltAsk): Promise<OwnerDecision>;
34
+ }
35
+ /** Collaborators. */
36
+ export interface AppCollaboratorsDeps {
37
+ client: AppsCloudClient;
38
+ /** Who is on which team on this machine */
39
+ directory: AppsDirectory;
40
+ /** This instance's Cloud id */
41
+ instanceId: () => Promise<string | null>;
42
+ /** The decision service, once it runs */
43
+ decisions: () => CollaboratorDecisions | null;
44
+ /** Tell an agent something (the answer to its request) */
45
+ notifyAgent: (session: string, text: string, activate: boolean) => Promise<boolean>;
46
+ }
47
+ /** The owner's yes/no card for a collaborator request, and the grant behind the yes. */
48
+ export declare class AppCollaboratorsService implements DecisionKindHandler {
49
+ private readonly deps;
50
+ constructor(deps: AppCollaboratorsDeps);
51
+ /**
52
+ * An agent asks the owner to let its team (default) or only itself work in an
53
+ * app. Nothing is granted here: a card goes to the owner. Who is added is
54
+ * decided from the caller's identity, never from the request body.
55
+ *
56
+ * @param appIdIn - The app (from the owner or the app's publisher)
57
+ * @param agentSession - The verified calling agent
58
+ * @param input - `{ scope?: 'team' | 'agent', reason?: string }`
59
+ * @returns The card's decision id
60
+ * @throws AppsCloudError validation / not_found (not this account's app) / unavailable (no decision cards)
61
+ */
62
+ request(appIdIn: unknown, agentSession: string | undefined, input: {
63
+ scope?: unknown;
64
+ reason?: unknown;
65
+ }): Promise<{
66
+ requested: true;
67
+ decisionId: string;
68
+ for: string;
69
+ }>;
70
+ /**
71
+ * A collaborator decision settled. Allow → add the collaborator in Cloud as
72
+ * the owner; anything else → nothing changes. Tells the asking agent.
73
+ *
74
+ * @param decision - The settled decision
75
+ * @returns Note for the asking agent, or null
76
+ */
77
+ onSettled(decision: OwnerDecision): Promise<string | null>;
78
+ /**
79
+ * Add a collaborator as the owner (the route refuses agents).
80
+ *
81
+ * @param appId - App
82
+ * @param body - `{ kind:'team', team }` or `{ kind:'agent', session }`; `instanceId` defaults to this instance
83
+ * @returns Cloud's list
84
+ */
85
+ add(appId: unknown, body: Record<string, unknown>): Promise<CollaboratorList>;
86
+ /**
87
+ * Remove a collaborator as the owner. Takes effect on the next call.
88
+ *
89
+ * @param appId - App
90
+ * @param entryId - The entry id from the list
91
+ * @returns Cloud's list
92
+ */
93
+ remove(appId: unknown, entryId: unknown): Promise<CollaboratorList>;
94
+ /**
95
+ * Who collaborates on an app.
96
+ *
97
+ * @param appId - App
98
+ * @param agentSession - The caller when an agent (omitted for the owner)
99
+ * @returns Cloud's list
100
+ */
101
+ list(appId: unknown, agentSession?: string): Promise<CollaboratorList>;
102
+ }
103
+ //# sourceMappingURL=app-collaborators.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-collaborators.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/apps/app-collaborators.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAA0C,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC3G,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,K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MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IA+C9K;;;;;;OAMG;IACG,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAiBhE;;;;;;OAMG;IACG,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAOnF;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAMzE;;;;;;OAMG;IACG,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAI7E"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * AppCollaboratorsService — the owner lets another team (or one agent) work in
3
+ * an app (specs/2026-10-06-app-collaborators.md §7).
4
+ *
5
+ * An agent ASKS ({@link request}); the owner's tap on a decision card is the
6
+ * only thing that GRANTS ({@link onSettled}). What a card grants is fixed on
7
+ * this machine when it is asked, from who the caller is, and stored on the
8
+ * decision, so nothing the agent sends later can change it. The grant is a
9
+ * Cloud call made as the owner (no instance, no agent header), which Cloud
10
+ * refuses for any agent. The list lives in Cloud (per app, bound to this
11
+ * instance), so every instance of the account sees it.
12
+ *
13
+ * @module services/apps/app-collaborators.service
14
+ */
15
+ import { AppsCloudError } from './apps-cloud.client.js';
16
+ import { CREWLY_APPS_CONSTANTS } from '../../constants.js';
17
+ import { requireAppId } from './apps.service.js';
18
+ const C = CREWLY_APPS_CONSTANTS;
19
+ const ALLOW_KEY = 'a';
20
+ const DENY_KEY = 'b';
21
+ /** How long a request waits for the owner before it lapses (nothing is granted). */
22
+ const REQUEST_DEADLINE_MS = 48 * 60 * 60 * 1000;
23
+ const MAX_REASON = 300;
24
+ function validation(message) {
25
+ return new AppsCloudError(400, C.ERROR_CODES.VALIDATION, message);
26
+ }
27
+ /** The owner's yes/no card for a collaborator request, and the grant behind the yes. */
28
+ export class AppCollaboratorsService {
29
+ deps;
30
+ constructor(deps) {
31
+ this.deps = deps;
32
+ }
33
+ /**
34
+ * An agent asks the owner to let its team (default) or only itself work in an
35
+ * app. Nothing is granted here: a card goes to the owner. Who is added is
36
+ * decided from the caller's identity, never from the request body.
37
+ *
38
+ * @param appIdIn - The app (from the owner or the app's publisher)
39
+ * @param agentSession - The verified calling agent
40
+ * @param input - `{ scope?: 'team' | 'agent', reason?: string }`
41
+ * @returns The card's decision id
42
+ * @throws AppsCloudError validation / not_found (not this account's app) / unavailable (no decision cards)
43
+ */
44
+ async request(appIdIn, agentSession, input) {
45
+ const appId = requireAppId(appIdIn);
46
+ if (!agentSession)
47
+ throw validation('Only an agent asks; the owner adds a collaborator directly.');
48
+ const scope = input.scope === undefined || input.scope === '' ? 'team' : input.scope;
49
+ if (scope !== 'team' && scope !== 'agent')
50
+ throw validation("scope is 'team' (your team, the default) or 'agent' (only you).");
51
+ if (input.reason !== undefined && typeof input.reason !== 'string')
52
+ throw validation('reason is text.');
53
+ const reason = typeof input.reason === 'string' && input.reason.trim() ? input.reason.trim().slice(0, MAX_REASON) : undefined;
54
+ const me = await this.deps.directory.member(agentSession);
55
+ if (!me)
56
+ throw validation('You are not a member of a team on this machine.');
57
+ if (scope === 'team' && !me.team)
58
+ throw validation('You have no team; ask for access for yourself with scope "agent".');
59
+ const instanceId = await this.deps.instanceId();
60
+ if (!instanceId)
61
+ throw new AppsCloudError(409, C.ERROR_CODES.NO_INSTANCE, 'This machine has no Crewly Cloud instance id yet. Try again in a minute.');
62
+ // Cloud answers 404 when the app is not this account's.
63
+ const view = await this.deps.client.request('GET', `/apps/${appId}`, { agent: agentSession });
64
+ const decisions = this.deps.decisions();
65
+ if (!decisions)
66
+ throw new AppsCloudError(503, 'unavailable', 'Owner approval cards are not running on this machine, so the request cannot be asked.');
67
+ const subject = {
68
+ appId,
69
+ ...(view.name ? { appName: view.name } : {}),
70
+ kind: scope,
71
+ ...(scope === 'team' ? { team: me.team } : { session: agentSession }),
72
+ instanceId,
73
+ askerSession: agentSession,
74
+ askerName: me.name,
75
+ ...(reason ? { reason } : {}),
76
+ };
77
+ const forWho = scope === 'team' ? `the ${subject.team} team` : me.name;
78
+ const options = [
79
+ { key: ALLOW_KEY, label: 'Allow', detail: 'they can read and write this app\'s data, not change the app' },
80
+ { key: DENY_KEY, label: 'Do not allow', detail: 'nothing changes' },
81
+ ];
82
+ const decision = await decisions.askPrebuilt({
83
+ kind: 'app_collaborator',
84
+ asker: agentSession,
85
+ question: `Let ${forWho} work in the app "${view.name ?? appId}"? ${me.name} asked.`,
86
+ title: 'Add a collaborator to an app',
87
+ body: reason ? [`Reason: ${reason}`] : [],
88
+ options,
89
+ defaultKey: DENY_KEY,
90
+ yesKey: ALLOW_KEY,
91
+ deadline: new Date(Date.now() + REQUEST_DEADLINE_MS),
92
+ sensitive: 'app_access',
93
+ appCollaborator: subject,
94
+ });
95
+ return { requested: true, decisionId: decision.id, for: forWho };
96
+ }
97
+ /**
98
+ * A collaborator decision settled. Allow → add the collaborator in Cloud as
99
+ * the owner; anything else → nothing changes. Tells the asking agent.
100
+ *
101
+ * @param decision - The settled decision
102
+ * @returns Note for the asking agent, or null
103
+ */
104
+ async onSettled(decision) {
105
+ const s = decision.appCollaborator;
106
+ if (!s)
107
+ return null;
108
+ const label = s.kind === 'team' ? `the ${s.team} team` : s.askerName;
109
+ const app = s.appName ?? s.appId;
110
+ if (decision.status !== 'resolved' || decision.chosenKey !== ALLOW_KEY) {
111
+ return `[APP ACCESS] The owner did not add ${label} to "${app}". Nothing changed.`;
112
+ }
113
+ try {
114
+ await this.add(s.appId, s.kind === 'team' ? { kind: 'team', team: s.team, instanceId: s.instanceId } : { kind: 'agent', session: s.session, instanceId: s.instanceId });
115
+ return `[APP ACCESS] The owner added ${label} to "${app}". You can now read and write its data with app-data (app id ${s.appId}). You cannot republish or change the app itself.`;
116
+ }
117
+ catch (err) {
118
+ const why = err instanceof AppsCloudError ? `${err.code}: ${err.message}` : String(err);
119
+ return `[APP ACCESS] The owner said yes, but adding ${label} to "${app}" failed (${why}). Ask the owner to try again.`;
120
+ }
121
+ }
122
+ /**
123
+ * Add a collaborator as the owner (the route refuses agents).
124
+ *
125
+ * @param appId - App
126
+ * @param body - `{ kind:'team', team }` or `{ kind:'agent', session }`; `instanceId` defaults to this instance
127
+ * @returns Cloud's list
128
+ */
129
+ async add(appId, body) {
130
+ const id = requireAppId(appId);
131
+ const instanceId = typeof body['instanceId'] === 'string' && body['instanceId'] ? body['instanceId'] : await this.deps.instanceId();
132
+ if (!instanceId)
133
+ throw new AppsCloudError(409, C.ERROR_CODES.NO_INSTANCE, 'This machine has no Crewly Cloud instance id yet.');
134
+ return this.deps.client.request('PUT', `/apps/${id}/collaborators`, { body: { ...body, instanceId }, asOwner: true });
135
+ }
136
+ /**
137
+ * Remove a collaborator as the owner. Takes effect on the next call.
138
+ *
139
+ * @param appId - App
140
+ * @param entryId - The entry id from the list
141
+ * @returns Cloud's list
142
+ */
143
+ async remove(appId, entryId) {
144
+ const id = requireAppId(appId);
145
+ if (typeof entryId !== 'string' || !/^[A-Za-z0-9_-]{1,64}$/.test(entryId))
146
+ throw validation('entryId is the id from the list.');
147
+ return this.deps.client.request('DELETE', `/apps/${id}/collaborators/${entryId}`, { asOwner: true });
148
+ }
149
+ /**
150
+ * Who collaborates on an app.
151
+ *
152
+ * @param appId - App
153
+ * @param agentSession - The caller when an agent (omitted for the owner)
154
+ * @returns Cloud's list
155
+ */
156
+ async list(appId, agentSession) {
157
+ const id = requireAppId(appId);
158
+ return this.deps.client.request('GET', `/apps/${id}/collaborators`, agentSession ? { agent: agentSession } : { asOwner: true });
159
+ }
160
+ }
161
+ //# sourceMappingURL=app-collaborators.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-collaborators.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/apps/app-collaborators.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAsB,MAAM,mBAAmB,CAAC;AAErE,MAAM,CAAC,GAAG,qBAAqB,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,MAAM,UAAU,GAAG,GAAG,CAAC;AA0BvB,SAAS,UAAU,CAAC,OAAe;IACjC,OAAO,IAAI,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAED,wFAAwF;AACxF,MAAM,OAAO,uBAAuB;IACL;IAA7B,YAA6B,IAA0B;QAA1B,SAAI,GAAJ,IAAI,CAAsB;IAAG,CAAC;IAE3D;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,CAAC,OAAgB,EAAE,YAAgC,EAAE,KAA4C;QAC5G,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,YAAY;YAAE,MAAM,UAAU,CAAC,6DAA6D,CAAC,CAAC;QACnG,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;QACrF,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAA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C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmB,QAAQ,EAAE,SAAS,EAAE,kBAAkB,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACzH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,IAAI,CAAC,KAAc,EAAE,YAAqB;QAC9C,MAAM,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmB,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACpJ,CAAC;CACF"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Voice comments on Crewly Apps (crewly-services apps/SPEC.md §16).
3
+ *
4
+ * The owner records audio in the app's comment box; Cloud stores it and puts
5
+ * `attachments: [{ kind: 'audio', blobId, mime, durationMs, size }]` on the
6
+ * comment or reply. When such a comment is delivered — to an agent, to the
7
+ * room (team / channel) that owns the app, or mirrored to Slack — this module
8
+ * downloads the recording to `<CREWLY_HOME>/tmp/app-comment-audio/` (next to
9
+ * Slack's downloaded files) and builds the line that tells the agent where it
10
+ * is and to transcribe it with the transcribe-audio skill, the same way a
11
+ * Slack voice clip reaches an agent.
12
+ *
13
+ * A failed download never blocks delivery: the line then names the command
14
+ * that fetches it (`app-comments --audio <comment id>`).
15
+ *
16
+ * @module services/apps/app-comment-audio.service
17
+ */
18
+ import type { AppChange, AppCommentAttachment } from './app-wake-message.js';
19
+ export type { AppCommentAttachment };
20
+ /** A recording on this machine (or why it is not). */
21
+ export interface VoiceFile {
22
+ blobId: string;
23
+ commentId: string;
24
+ durationMs: number;
25
+ mime: string;
26
+ /** Absolute local path, when downloaded */
27
+ path?: string;
28
+ /** Why it could not be downloaded */
29
+ error?: string;
30
+ }
31
+ /** Recordings of a batch, by blob id. */
32
+ export type VoiceFiles = Record<string, VoiceFile>;
33
+ /** The Cloud client slice used here. */
34
+ export interface VoiceDownloadClient {
35
+ download(path: string, opts: {
36
+ maxBytes: number;
37
+ timeoutMs?: number;
38
+ }): Promise<{
39
+ data: Buffer;
40
+ contentType: string;
41
+ }>;
42
+ }
43
+ /** Constructor dependencies. */
44
+ export interface AppCommentAudioDeps {
45
+ client: VoiceDownloadClient;
46
+ /** Crewly home directory */
47
+ homeDir: () => string;
48
+ log?: (level: 'info' | 'warn', msg: string, meta?: Record<string, unknown>) => void;
49
+ }
50
+ /**
51
+ * "0:42" / "2:05" for a length in milliseconds.
52
+ *
53
+ * @param ms - Milliseconds
54
+ * @returns m:ss
55
+ */
56
+ export declare function formatVoiceClock(ms: unknown): string;
57
+ /**
58
+ * The recordings a comment change is about: the comment's own for a new
59
+ * comment or a reopen, the reply's for a reply.
60
+ *
61
+ * @param change - A comment change (its `thread` as Cloud sent it)
62
+ * @returns Attachments with the comment id
63
+ */
64
+ export declare function voiceAttachmentsOf(change: AppChange): Array<{
65
+ commentId: string;
66
+ attachment: AppCommentAttachment & {
67
+ blobId: string;
68
+ };
69
+ }>;
70
+ /**
71
+ * Every recording in a thread (the comment and all replies).
72
+ *
73
+ * @param thread - The thread
74
+ * @returns Attachments
75
+ */
76
+ export declare function threadVoiceAttachments(thread: {
77
+ attachments?: unknown;
78
+ replies?: Array<{
79
+ attachments?: unknown;
80
+ }>;
81
+ } | null | undefined): Array<AppCommentAttachment & {
82
+ blobId: string;
83
+ }>;
84
+ /**
85
+ * The lines an agent reads for a comment change's recordings (indented under
86
+ * the comment). Downloaded: the path and the instruction to transcribe it
87
+ * first. Not downloaded: the reason and the command that fetches it.
88
+ *
89
+ * @param change - The comment change
90
+ * @param files - Recordings fetched for this delivery
91
+ * @param fetchCmd - `bash …/app-comments/execute.sh --app <id>` (the fallback command)
92
+ * @returns Lines (empty when the change has no recording)
93
+ */
94
+ export declare function voiceLines(change: AppChange, files: VoiceFiles | undefined, fetchCmd: string): string[];
95
+ /** Downloads voice comment recordings to this machine. */
96
+ export declare class AppCommentAudioService {
97
+ private readonly deps;
98
+ constructor(deps: AppCommentAudioDeps);
99
+ private dir;
100
+ /**
101
+ * One recording, cached by app + blob id.
102
+ *
103
+ * @param appId - App
104
+ * @param commentId - Thread it is attached to
105
+ * @param a - The attachment
106
+ * @returns The local file (or why not)
107
+ */
108
+ fetchOne(appId: string, commentId: string, a: AppCommentAttachment & {
109
+ blobId: string;
110
+ }): Promise<VoiceFile>;
111
+ /**
112
+ * The recordings of a batch of comment changes (at most VOICE.MAX_PER_WAKE).
113
+ * Never throws.
114
+ *
115
+ * @param appId - App
116
+ * @param comments - Comment changes
117
+ * @returns Files by blob id (empty when none)
118
+ */
119
+ forChanges(appId: string, comments: AppChange[]): Promise<VoiceFiles>;
120
+ /**
121
+ * Every recording of one thread (`app-comments --audio <id>`).
122
+ *
123
+ * @param appId - App
124
+ * @param commentId - Thread
125
+ * @param thread - The thread as Cloud returned it
126
+ * @returns Files, oldest first
127
+ */
128
+ forThread(appId: string, commentId: string, thread: {
129
+ attachments?: unknown;
130
+ replies?: Array<{
131
+ attachments?: unknown;
132
+ }>;
133
+ }): Promise<VoiceFile[]>;
134
+ }
135
+ /** Upload a recording into a Slack thread as an agent's bot. */
136
+ export type SlackAudioUpload = (req: {
137
+ agentSession: string;
138
+ channel: string;
139
+ threadTs: string;
140
+ filePath: string;
141
+ filename: string;
142
+ title: string;
143
+ }) => Promise<void>;
144
+ /**
145
+ * Show a comment change's recordings in its Slack thread: each file uploaded
146
+ * as the thread's bot when it is on this machine and an uploader is wired;
147
+ * otherwise (or when the upload fails) one line with a link to the app,
148
+ * where the owner can play it.
149
+ *
150
+ * @param input - The change, its downloaded files, the thread and the senders
151
+ * @returns How many recordings were uploaded
152
+ */
153
+ export declare function mirrorVoiceToSlack(input: {
154
+ change: AppChange;
155
+ files: VoiceFiles | undefined;
156
+ agentSession: string;
157
+ channel: string;
158
+ threadTs: string;
159
+ appUrl: string;
160
+ upload?: SlackAudioUpload;
161
+ post: (text: string) => Promise<unknown>;
162
+ log?: (level: 'info' | 'warn', msg: string, meta?: Record<string, unknown>) => void;
163
+ }): Promise<number>;
164
+ //# sourceMappingURL=app-comment-audio.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-comment-audio.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/apps/app-comment-audio.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAM7E,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC,sDAAsD;AACtD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yCAAyC;AACzC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxH;AAED,gCAAgC;AAChC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,4BAA4B;IAC5B,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,CAAC,KAAK,E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