crewly 1.20.251 → 1.20.252
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.
- package/config/skills/agent/core/app-comments/SKILL.md +11 -1
- package/config/skills/agent/core/app-data/SKILL.md +65 -3
- package/config/skills/agent/core/app-data/execute.sh +51 -3
- package/config/skills/agent/core/app-data/execute.test.sh +42 -0
- package/config/skills/agent/core/publish-app/SKILL.md +5 -1
- package/config/skills/agent/core/publish-app/execute.sh +26 -3
- package/config/skills/agent/core/publish-app/execute.test.sh +18 -0
- package/dist/backend/backend/src/constants.d.ts +17 -0
- package/dist/backend/backend/src/constants.d.ts.map +1 -1
- package/dist/backend/backend/src/constants.js +17 -0
- package/dist/backend/backend/src/constants.js.map +1 -1
- package/dist/backend/backend/src/controllers/apps/apps.controller.d.ts +17 -0
- package/dist/backend/backend/src/controllers/apps/apps.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/apps/apps.controller.js +31 -0
- package/dist/backend/backend/src/controllers/apps/apps.controller.js.map +1 -1
- package/dist/backend/backend/src/controllers/apps/apps.routes.d.ts +7 -0
- package/dist/backend/backend/src/controllers/apps/apps.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/apps/apps.routes.js +29 -2
- package/dist/backend/backend/src/controllers/apps/apps.routes.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +9 -0
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js.map +1 -1
- package/dist/backend/backend/src/services/apps/app-collaborators.service.d.ts +103 -0
- package/dist/backend/backend/src/services/apps/app-collaborators.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/apps/app-collaborators.service.js +161 -0
- package/dist/backend/backend/src/services/apps/app-collaborators.service.js.map +1 -0
- package/dist/backend/backend/src/services/apps/app-comment-room.service.d.ts +149 -0
- package/dist/backend/backend/src/services/apps/app-comment-room.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/apps/app-comment-room.service.js +316 -0
- package/dist/backend/backend/src/services/apps/app-comment-room.service.js.map +1 -0
- package/dist/backend/backend/src/services/apps/app-comments-slack.service.d.ts +38 -1
- package/dist/backend/backend/src/services/apps/app-comments-slack.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/app-comments-slack.service.js +58 -3
- package/dist/backend/backend/src/services/apps/app-comments-slack.service.js.map +1 -1
- package/dist/backend/backend/src/services/apps/app-roster.service.d.ts +37 -1
- package/dist/backend/backend/src/services/apps/app-roster.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/app-roster.service.js +62 -7
- package/dist/backend/backend/src/services/apps/app-roster.service.js.map +1 -1
- package/dist/backend/backend/src/services/apps/app-wake-message.d.ts +6 -0
- package/dist/backend/backend/src/services/apps/app-wake-message.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/app-wake-message.js +12 -10
- package/dist/backend/backend/src/services/apps/app-wake-message.js.map +1 -1
- package/dist/backend/backend/src/services/apps/app-wake.service.d.ts +30 -0
- package/dist/backend/backend/src/services/apps/app-wake.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/app-wake.service.js +90 -16
- package/dist/backend/backend/src/services/apps/app-wake.service.js.map +1 -1
- package/dist/backend/backend/src/services/apps/apps-cloud.client.d.ts +6 -0
- package/dist/backend/backend/src/services/apps/apps-cloud.client.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/apps-cloud.client.js +5 -4
- package/dist/backend/backend/src/services/apps/apps-cloud.client.js.map +1 -1
- package/dist/backend/backend/src/services/apps/apps.service.d.ts +115 -2
- package/dist/backend/backend/src/services/apps/apps.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/apps.service.js +181 -9
- package/dist/backend/backend/src/services/apps/apps.service.js.map +1 -1
- package/dist/backend/backend/src/services/apps/apps.wiring.d.ts +57 -1
- package/dist/backend/backend/src/services/apps/apps.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/apps/apps.wiring.js +233 -4
- package/dist/backend/backend/src/services/apps/apps.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.service.d.ts +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.service.js +3 -0
- package/dist/backend/backend/src/services/chat-v2/chat-v2.service.js.map +1 -1
- package/dist/backend/backend/src/services/decisions/decision.service.d.ts +2 -0
- package/dist/backend/backend/src/services/decisions/decision.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/decisions/decision.service.js +1 -0
- package/dist/backend/backend/src/services/decisions/decision.service.js.map +1 -1
- package/dist/backend/backend/src/types/decision.types.d.ts +27 -2
- package/dist/backend/backend/src/types/decision.types.d.ts.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/dist/cli/backend/src/constants.d.ts +17 -0
- package/dist/cli/backend/src/constants.d.ts.map +1 -1
- package/dist/cli/backend/src/constants.js +17 -0
- package/dist/cli/backend/src/constants.js.map +1 -1
- package/dist/cli/backend/src/services/ai/prompt-modules/skills-reference.module.js +1 -1
- package/dist/cli/backend/src/services/ai/prompt-modules/skills-reference.module.js.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.service.d.ts +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.service.js +3 -0
- package/dist/cli/backend/src/services/chat-v2/chat-v2.service.js.map +1 -1
- package/dist/cli/backend/src/services/decisions/decision.service.d.ts +2 -0
- package/dist/cli/backend/src/services/decisions/decision.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/decisions/decision.service.js +1 -0
- package/dist/cli/backend/src/services/decisions/decision.service.js.map +1 -1
- package/dist/cli/backend/src/types/decision.types.d.ts +27 -2
- package/dist/cli/backend/src/types/decision.types.d.ts.map +1 -1
- 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;AACH,MAAM,OAAO,qBAAqB;IACjC,IAAI,GAAG,mBAAmB,CAAC;IAC3B,QAAQ,GAAG,CAAC,CAAC;IACb,SAAS,GAAG,GAAG,CAAC;IAChB,WAAW,GAAG,KAAK,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,CAAC,MAAoB;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,iBAAiB,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC9D,MAAM,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FAAsF;YACtF,KAAK,CAAC,wHAAwH;YAC9H,yGAAyG,CAAC,aAAa;YACvH,
|
|
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,IAAI,GAAG,mBAAmB,CAAC;IAC3B,QAAQ,GAAG,CAAC,CAAC;IACb,SAAS,GAAG,GAAG,CAAC;IAChB,WAAW,GAAG,KAAK,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,CAAC,MAAoB;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,iBAAiB,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACpD,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAEtD,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;QACvF,IAAI,aAAa,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACK,eAAe,CAAC,MAAoB;QAC3C,MAAM,CAAC,GAAG,GAAG,MAAM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;;;;;;;;;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,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASrE,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,G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,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,CA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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,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App comments in the room that owns the app (crewly-services apps/SPEC.md
|
|
3
|
+
* §15). An app owned by a team or a Crewly channel gets its owner's comments
|
|
4
|
+
* where that team / channel talks, so every member sees them and the room's
|
|
5
|
+
* rules decide who picks one up:
|
|
6
|
+
*
|
|
7
|
+
* - Each comment thread is ONE thread in the room (the chat-v2 huddle) and,
|
|
8
|
+
* when the room has a Slack channel, ONE Slack thread there (posted by a
|
|
9
|
+
* member's bot). The link is stored with the Slack mirror's links
|
|
10
|
+
* ({@link AppCommentsSlackService}), so the owner's reply in that Slack
|
|
11
|
+
* thread is relayed back to the app — and, not being consumed, reaches the
|
|
12
|
+
* room through the normal Slack routing.
|
|
13
|
+
* - The comment is written into the room as the owner's message
|
|
14
|
+
* (`metadata.source: 'app-comment'`) and dispatched with the room rules:
|
|
15
|
+
* an @mention in the comment wakes that member; otherwise the members awake
|
|
16
|
+
* here read it and decide, and when nobody is awake the room's lead is
|
|
17
|
+
* woken.
|
|
18
|
+
* - The owner's replies written in the app, and reopen, go into the same
|
|
19
|
+
* thread (and its Slack thread). A reply the owner wrote in Slack is
|
|
20
|
+
* already in the room: Cloud's `via: 'slack'` copy is skipped.
|
|
21
|
+
* - An agent's reply in the room thread (reply-channel) is added to the
|
|
22
|
+
* app's comment as that agent's reply; an agent's reply or resolve made
|
|
23
|
+
* with app-comments is written into the room thread as that agent, which
|
|
24
|
+
* the room's Slack mirror posts as the agent's bot.
|
|
25
|
+
*
|
|
26
|
+
* Harness text is English; the comment text is the owner's words.
|
|
27
|
+
*
|
|
28
|
+
* @module services/apps/app-comment-room.service
|
|
29
|
+
*/
|
|
30
|
+
import type { ChatChannelDTO, ChatMessageDTO } from '../chat-v2/types.js';
|
|
31
|
+
import type { RecordTurnInput } from '../chat-v2/chat-v2.service.js';
|
|
32
|
+
import type { DispatchMessageOptions } from '../chat-v2/chat-v2.dispatcher.service.js';
|
|
33
|
+
import { type AppChange } from './app-wake-message.js';
|
|
34
|
+
import type { AppCommentsSlackService, CommentRoomRef } from './app-comments-slack.service.js';
|
|
35
|
+
/** Where a room-owned comment goes on this machine. */
|
|
36
|
+
export interface ResolvedRoom {
|
|
37
|
+
/** chat-v2 huddle id of the room */
|
|
38
|
+
chatChannelId: string;
|
|
39
|
+
/** Readable name (`#daily-brief`, `Dev team`) */
|
|
40
|
+
label: string;
|
|
41
|
+
/** The room's Slack channel, when it has one and Slack is connected */
|
|
42
|
+
slackChannelId: string | null;
|
|
43
|
+
/** Member agent sessions */
|
|
44
|
+
members: string[];
|
|
45
|
+
}
|
|
46
|
+
/** A room-owned batch of the owner's comment changes. */
|
|
47
|
+
export interface RoomDelivery {
|
|
48
|
+
appId: string;
|
|
49
|
+
appName: string;
|
|
50
|
+
room: CommentRoomRef;
|
|
51
|
+
comments: AppChange[];
|
|
52
|
+
}
|
|
53
|
+
/** The chat-v2 slice used here. */
|
|
54
|
+
export interface RoomChatApi {
|
|
55
|
+
recordTurn(input: RecordTurnInput): {
|
|
56
|
+
message: ChatMessageDTO;
|
|
57
|
+
};
|
|
58
|
+
getChannelForBridge(channelId: string): ChatChannelDTO | null;
|
|
59
|
+
}
|
|
60
|
+
/** Collaborators (all injectable). */
|
|
61
|
+
export interface AppCommentRoomDeps {
|
|
62
|
+
/** Find the room on this machine (null: it is gone) */
|
|
63
|
+
resolveRoom: (room: CommentRoomRef) => Promise<ResolvedRoom | null>;
|
|
64
|
+
chat: () => RoomChatApi | null;
|
|
65
|
+
/** The chat-v2 dispatcher's `dispatchMessage` (null before it is wired) */
|
|
66
|
+
dispatch: () => ((channel: ChatChannelDTO, message: ChatMessageDTO, options?: DispatchMessageOptions) => Promise<unknown>) | null;
|
|
67
|
+
/** Whether an agent's session runs now (who is awake in the room) */
|
|
68
|
+
isRunning: (session: string) => boolean;
|
|
69
|
+
/** Post into Slack as an agent's bot */
|
|
70
|
+
slackPost?: (req: {
|
|
71
|
+
agentSession: string;
|
|
72
|
+
target: string;
|
|
73
|
+
text: string;
|
|
74
|
+
threadTs?: string;
|
|
75
|
+
}) => Promise<{
|
|
76
|
+
channelId: string;
|
|
77
|
+
messageTs: string;
|
|
78
|
+
}>;
|
|
79
|
+
/** The link store shared with the Slack mirror */
|
|
80
|
+
links: Pick<AppCommentsSlackService, 'load' | 'linkOf' | 'saveLink' | 'noteReply' | 'linkOfChatRoot'>;
|
|
81
|
+
/** The agent that publishes an app here (preferred poster in Slack) */
|
|
82
|
+
publisherOf?: (appId: string) => Promise<string | null>;
|
|
83
|
+
/** This instance's Cloud id (to tell its mentions from another machine's) */
|
|
84
|
+
instanceId?: () => Promise<string | null>;
|
|
85
|
+
/** Add an agent's room reply to the app comment, as that agent */
|
|
86
|
+
relayAgentReply?: (appId: string, commentId: string, agentSession: string, text: string) => Promise<void>;
|
|
87
|
+
/** Agent skills root, for the command named in the room message */
|
|
88
|
+
skillsPath?: string;
|
|
89
|
+
/** Where the app opens */
|
|
90
|
+
appUrl?: (appId: string) => string;
|
|
91
|
+
/** Off switch for the Slack side (`CREWLY_APP_COMMENTS_SLACK=off`) */
|
|
92
|
+
slackOff?: () => boolean;
|
|
93
|
+
log?: (level: 'info' | 'warn', msg: string, meta?: Record<string, unknown>) => void;
|
|
94
|
+
}
|
|
95
|
+
/** Posts room-owned app comments into their room and relays the room's answers back. */
|
|
96
|
+
export declare class AppCommentRoomService {
|
|
97
|
+
private readonly deps;
|
|
98
|
+
constructor(deps: AppCommentRoomDeps);
|
|
99
|
+
private log;
|
|
100
|
+
private url;
|
|
101
|
+
/**
|
|
102
|
+
* Post a batch of the owner's comment changes into the owning room.
|
|
103
|
+
*
|
|
104
|
+
* @param input - App, room and comment changes (oldest first)
|
|
105
|
+
* @returns True when every change was posted (false: retry the batch later)
|
|
106
|
+
*/
|
|
107
|
+
deliver(input: RoomDelivery): Promise<boolean>;
|
|
108
|
+
/** Which member's bot posts in Slack: the publisher when it is in the room, else the first member. */
|
|
109
|
+
private poster;
|
|
110
|
+
/**
|
|
111
|
+
* Members this change @mentions on this machine (they are addressed in the room).
|
|
112
|
+
*
|
|
113
|
+
* @param change - Comment change
|
|
114
|
+
* @param room - The room
|
|
115
|
+
* @returns Member sessions
|
|
116
|
+
*/
|
|
117
|
+
private addressed;
|
|
118
|
+
private openThread;
|
|
119
|
+
private postInThread;
|
|
120
|
+
/**
|
|
121
|
+
* Dispatch with the room rules: @mentioned members must answer; otherwise
|
|
122
|
+
* the members awake here read it and decide, and with nobody awake the
|
|
123
|
+
* room's lead is woken (the dispatcher's no-presence rule).
|
|
124
|
+
*/
|
|
125
|
+
private dispatch;
|
|
126
|
+
/**
|
|
127
|
+
* An agent replied with app-comments: write it into the room thread as that
|
|
128
|
+
* agent (the room's Slack mirror posts it as the agent's bot).
|
|
129
|
+
*
|
|
130
|
+
* @returns True when the comment has a room thread (handled here)
|
|
131
|
+
*/
|
|
132
|
+
agentReplied(appId: string, commentId: string, agent: string, text: string): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* An agent resolved / reopened with app-comments: one line in the room thread.
|
|
135
|
+
*
|
|
136
|
+
* @returns True when the comment has a room thread
|
|
137
|
+
*/
|
|
138
|
+
statusChanged(appId: string, commentId: string, agent: string, action: 'resolve' | 'reopen'): Promise<boolean>;
|
|
139
|
+
private agentRow;
|
|
140
|
+
/**
|
|
141
|
+
* A chat-v2 row was written: an agent's reply in a room-owned comment
|
|
142
|
+
* thread (not one written here) is added to the app's comment as that agent.
|
|
143
|
+
*
|
|
144
|
+
* @param dto - The row
|
|
145
|
+
* @returns True when it was relayed
|
|
146
|
+
*/
|
|
147
|
+
onChatMessage(dto: ChatMessageDTO): Promise<boolean>;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=app-comment-room.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-comment-room.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/apps/app-comment-room.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAChH,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAoB,MAAM,iCAAiC,CAAC;AAKjH,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,4BAA4B;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,yDAAyD;AACzD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB;AAED,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG;QAAE,OAAO,EAAE,cAAc,CAAA;KAAE,CAAC;IAChE,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC;CAC/D;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACj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