@relayflows/sdk 2.0.63 → 2.0.65
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/dist/cli/cloud-deploy.d.ts.map +1 -1
- package/dist/cli/cloud-deploy.js +7 -6
- package/dist/cli/cloud-deploy.js.map +1 -1
- package/dist/cli/cloud-schedule.js +4 -3
- package/dist/cli/cloud-schedule.js.map +1 -1
- package/dist/cloud-answer.d.ts +11 -8
- package/dist/cloud-answer.d.ts.map +1 -1
- package/dist/cloud-answer.js +44 -16
- package/dist/cloud-answer.js.map +1 -1
- package/dist/cloud-connect.d.ts +2 -0
- package/dist/cloud-connect.d.ts.map +1 -1
- package/dist/cloud-connect.js +28 -3
- package/dist/cloud-connect.js.map +1 -1
- package/dist/cloud-deploy.d.ts.map +1 -1
- package/dist/cloud-deploy.js +4 -1
- package/dist/cloud-deploy.js.map +1 -1
- package/dist/cloud-repository-grant.d.ts +18 -0
- package/dist/cloud-repository-grant.d.ts.map +1 -0
- package/dist/cloud-repository-grant.js +61 -0
- package/dist/cloud-repository-grant.js.map +1 -0
- package/dist/cloud-schedule.d.ts.map +1 -1
- package/dist/cloud-schedule.js +2 -2
- package/dist/cloud-schedule.js.map +1 -1
- package/dist/cloud-versions.d.ts.map +1 -1
- package/dist/cloud-versions.js +4 -1
- package/dist/cloud-versions.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/cloud-deploy.ts +7 -6
- package/src/cli/cloud-schedule.ts +4 -3
- package/src/cloud-answer.ts +61 -16
- package/src/cloud-connect.ts +41 -4
- package/src/cloud-deploy.ts +4 -1
- package/src/cloud-repository-grant.ts +77 -0
- package/src/cloud-schedule.ts +2 -2
- package/src/cloud-versions.ts +4 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-repository-grant.d.ts","sourceRoot":"","sources":["../src/cloud-repository-grant.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CAoCzF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { isCloudRecord } from './cloud-http.js';
|
|
2
|
+
const coordinate = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$/u;
|
|
3
|
+
function validGitlabNamespace(value) {
|
|
4
|
+
if (typeof value !== 'string' || value.length > 255)
|
|
5
|
+
return false;
|
|
6
|
+
const parts = value.split('/');
|
|
7
|
+
return parts.length >= 1 && parts.length <= 20 && parts.every(part => (coordinate.test(part) && !part.endsWith('.') && !part.endsWith('.git') && !part.endsWith('.atom')));
|
|
8
|
+
}
|
|
9
|
+
function validRepositoryBranch(value) {
|
|
10
|
+
return typeof value === 'string'
|
|
11
|
+
&& /^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$/u.test(value)
|
|
12
|
+
&& value !== 'HEAD'
|
|
13
|
+
&& !value.includes('..')
|
|
14
|
+
&& !value.includes('//')
|
|
15
|
+
&& value.split('/').every(part => (part !== '' && !part.startsWith('.') && !part.endsWith('.') && !part.endsWith('.lock')));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Rebuild the request portion of persisted Cloud repository authority.
|
|
19
|
+
* Cloud re-admits this request against the persisted identity and current
|
|
20
|
+
* connection; the SDK must neither infer missing authority nor widen it.
|
|
21
|
+
*/
|
|
22
|
+
export function readCloudRepositoryGrant(value) {
|
|
23
|
+
if (value === undefined)
|
|
24
|
+
return undefined;
|
|
25
|
+
if (!isCloudRecord(value))
|
|
26
|
+
return undefined;
|
|
27
|
+
const gitlab = value.host === 'gitlab';
|
|
28
|
+
if ((value.host !== undefined && value.host !== 'github' && value.host !== 'gitlab')
|
|
29
|
+
|| typeof value.owner !== 'string'
|
|
30
|
+
|| !(gitlab ? validGitlabNamespace(value.owner) : coordinate.test(value.owner))
|
|
31
|
+
|| typeof value.repo !== 'string'
|
|
32
|
+
|| !/^[A-Za-z0-9_.-]{1,100}$/u.test(value.repo)
|
|
33
|
+
|| value.repo === '.' || value.repo === '..'
|
|
34
|
+
|| (gitlab && (value.repo.endsWith('.git') || value.repo.endsWith('.atom') || value.repo.endsWith('.')))
|
|
35
|
+
|| !validRepositoryBranch(value.baseBranch)
|
|
36
|
+
|| !validRepositoryBranch(value.branch)
|
|
37
|
+
|| (value.mode !== undefined && value.mode !== 'new' && value.mode !== 'head')
|
|
38
|
+
|| (value.workflows !== undefined && typeof value.workflows !== 'boolean')
|
|
39
|
+
|| (gitlab && value.workflows === true)
|
|
40
|
+
|| (value.access !== undefined && value.access !== 'read')
|
|
41
|
+
|| (value.access === 'read' && value.workflows === true)
|
|
42
|
+
|| (gitlab && value.access === 'read')
|
|
43
|
+
|| (value.mode !== 'head' && !value.branch.startsWith('relayflow/'))
|
|
44
|
+
|| value.branch === value.baseBranch
|
|
45
|
+
|| typeof value.baseSha !== 'string'
|
|
46
|
+
|| !/^[a-f0-9]{40}$/u.test(value.baseSha)) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
...(gitlab ? { host: 'gitlab' } : {}),
|
|
51
|
+
owner: value.owner.toLowerCase(),
|
|
52
|
+
repo: value.repo.toLowerCase(),
|
|
53
|
+
baseBranch: value.baseBranch,
|
|
54
|
+
baseSha: value.baseSha,
|
|
55
|
+
branch: value.branch,
|
|
56
|
+
...(value.mode === 'head' ? { mode: 'head' } : {}),
|
|
57
|
+
...(value.workflows === true ? { workflows: true } : {}),
|
|
58
|
+
...(value.access === 'read' ? { access: 'read' } : {}),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=cloud-repository-grant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-repository-grant.js","sourceRoot":"","sources":["../src/cloud-repository-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAchD,MAAM,UAAU,GAAG,oCAAoC,CAAC;AAExD,SAAS,oBAAoB,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG;QAAE,OAAO,KAAK,CAAC;IAClE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CACpE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAClG,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ;WAC3B,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC;WAClD,KAAK,KAAK,MAAM;WAChB,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;WACrB,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;WACrB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAChC,IAAI,KAAK,EAAE,IAAI,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,CAAC,CAAC,EAAE,CAAC;QAC3D,GAAG,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-schedule.d.ts","sourceRoot":"","sources":["../src/cloud-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,
|
|
1
|
+
{"version":3,"file":"cloud-schedule.d.ts","sourceRoot":"","sources":["../src/cloud-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAA6C,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAA+C,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;GAMG;AAEH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,6GAA6G;IAC7G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAKjG;AAWD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,IAAI,CAWrG;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,oBAAoB,EAAE,OAAO,GAAE,sBAA2B,GAChE,OAAO,CAAC,aAAa,CAAC,CA0CxB;AAiBD,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CASvG;AAED,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/G;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D"}
|
package/dist/cloud-schedule.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cronGrid, everyToMs, parseCron } from '@relayflows/surface';
|
|
2
|
-
import { CloudFlowError, cloudFetch,
|
|
2
|
+
import { CloudFlowError, cloudFetch, isCloudRecord } from './cloud-http.js';
|
|
3
3
|
import { cloudSubmissionBody, prepareCloudSubmission } from './cloud-run.js';
|
|
4
4
|
const SCHEDULE_ID = /^[A-Za-z0-9_-]{1,128}$/u;
|
|
5
5
|
/** `every("5m")` as a cron the server accepts; only intervals cron can express exactly. */
|
|
@@ -121,7 +121,7 @@ function toCloudSchedule(row) {
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
export async function listCloudSchedules(options = {}) {
|
|
124
|
-
const payload = await
|
|
124
|
+
const payload = await cloudFetch('/api/v1/workflows/schedules', options, { method: 'GET', detail: true });
|
|
125
125
|
if (!isCloudRecord(payload) || !Array.isArray(payload.schedules)) {
|
|
126
126
|
throw new CloudFlowError('invalid_response', 'Cloud did not return a schedules list.');
|
|
127
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-schedule.js","sourceRoot":"","sources":["../src/cloud-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAA8B,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"cloud-schedule.js","sourceRoot":"","sources":["../src/cloud-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAA8B,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAwB,MAAM,gBAAgB,CAAC;AAqCnG,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,2FAA2F;AAC3F,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAM,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC;IAC5B,IAAI,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,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OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,+FAA+F;AAC/F,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,kBAAkB,EAAE,OAAO,GAAE,sBAA2B,GAC9D,OAAO,CAAC,sBAAsB,CAAC,CA6DjC;AAED,0GAA0G;AAC1G,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAClE,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,sBAAsB,CAAA;CAAE,CAAC,CAc/E"}
|
package/dist/cloud-versions.js
CHANGED
|
@@ -90,7 +90,10 @@ export async function deployVersionToCloud(input, options = {}) {
|
|
|
90
90
|
const connected = listener.status !== 'listening' || input.checkConnections === false
|
|
91
91
|
? []
|
|
92
92
|
: (await ensureIntegrationsConnected(requirements, {
|
|
93
|
-
...options,
|
|
93
|
+
...options,
|
|
94
|
+
workspaceId: workspace.id,
|
|
95
|
+
eventIngressProviders: listener.sources.map(source => source.provider),
|
|
96
|
+
...(input.connect === undefined ? {} : { prompt: input.connect }),
|
|
94
97
|
})).connected;
|
|
95
98
|
options.signal?.throwIfAborted();
|
|
96
99
|
const result = await cloudFetch(`/api/v1/flows/listeners/${encodeURIComponent(agentId)}/versions`, options, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-versions.js","sourceRoot":"","sources":["../src/cloud-versions.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AAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relayflows/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.65",
|
|
4
4
|
"description": "TypeScript-first authoring SDK for Relayflows. Compiles specs; speaks the journal protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
51
51
|
"@relayfile/adapter-core": "0.8.5",
|
|
52
52
|
"@relayfile/relay-helpers": "0.6.1",
|
|
53
|
-
"@relayflows/surface": "2.0.
|
|
53
|
+
"@relayflows/surface": "2.0.65",
|
|
54
54
|
"@types/js-yaml": "^4.0.9",
|
|
55
55
|
"acorn": "^8.18.0",
|
|
56
56
|
"ai-hist": "0.4.1",
|
package/src/cli/cloud-deploy.ts
CHANGED
|
@@ -200,15 +200,16 @@ export async function runCloudUndeployCli({ agentId, json }: { agentId: string;
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
export function reportCloudFailure(error: unknown, json: boolean, io: CliIo, harnesses: readonly string[] = []): 1 | 2 {
|
|
203
|
-
const code = error instanceof CloudFlowError ? error.code : 'cloud_deploy_failed';
|
|
203
|
+
const code = error instanceof CloudFlowError ? error.refusal?.code ?? error.code : 'cloud_deploy_failed';
|
|
204
204
|
let message = error instanceof Error ? error.message : 'Cloud deploy failed.';
|
|
205
205
|
// Cloud names the missing coding-agent credential on activation; say how it is connected.
|
|
206
206
|
message += harnessRemedy(error, harnesses);
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
// Older Cloud deployments used the typed `session_required` refusal for
|
|
208
|
+
// routes that needed browser or cli:auth credentials. Current Cloud also
|
|
209
|
+
// accepts scoped deployment tokens and names missing scopes itself. Other
|
|
210
|
+
// 403s keep that server-provided remedy intact.
|
|
211
|
+
if (error instanceof CloudFlowError && error.refusal?.code === 'session_required') {
|
|
212
|
+
message += ' Deploying needs an interactive `cli:auth` credential: run `agent-relay cloud login`.';
|
|
212
213
|
}
|
|
213
214
|
if (json) io.stdout(JSON.stringify({ ok: false, code, message }));
|
|
214
215
|
else io.stderr(`${code}: ${message}`);
|
|
@@ -144,11 +144,12 @@ export async function runCloudUnscheduleCli(
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
function reportFailure(error: unknown, json: boolean, io: CliIo, harnesses: readonly string[] = []): 1 | 2 {
|
|
147
|
-
const code = error instanceof CloudFlowError ? error.code : 'cloud_schedule_failed';
|
|
147
|
+
const code = error instanceof CloudFlowError ? error.refusal?.code ?? error.code : 'cloud_schedule_failed';
|
|
148
148
|
let message = error instanceof Error ? error.message : 'Cloud schedule failed.';
|
|
149
149
|
message += harnessRemedy(error, harnesses);
|
|
150
|
-
//
|
|
151
|
-
|
|
150
|
+
// Only the typed refusal means this valid credential is the wrong kind for
|
|
151
|
+
// the route. Other 403s carry their own authorisation remedy.
|
|
152
|
+
if (error instanceof CloudFlowError && error.refusal?.code === 'session_required') {
|
|
152
153
|
message += ' Scheduling needs an interactive `cli:auth` credential: run `agent-relay cloud login`.';
|
|
153
154
|
}
|
|
154
155
|
if (json) io.stdout(JSON.stringify({ ok: false, code, message }));
|
package/src/cloud-answer.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
3
3
|
import { CloudFlowError, cloudFetch, cloudRunId, isCloudRecord, type CloudConnectionOptions } from './cloud-http.js';
|
|
4
4
|
import { cloudRunState } from './cloud-run-record.js';
|
|
5
5
|
import { readCloudHumanWaitValue } from './cloud-human-wait.js';
|
|
6
|
+
import { readCloudRepositoryGrant } from './cloud-repository-grant.js';
|
|
6
7
|
import { readSurfaceAuthority, type SurfaceModuleAuthority } from './authored-flow-loader.js';
|
|
7
8
|
import type { CloudAuthoredAuthority } from './cloud-run.js';
|
|
8
9
|
|
|
@@ -29,24 +30,32 @@ export class CloudAnswerError extends Error {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
interface CloudRecordedHumanAnswer {
|
|
34
|
+
waitId: string;
|
|
35
|
+
answer: boolean;
|
|
36
|
+
note?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
const route = (runId: string): string => `/api/v1/workflows/runs/${runId}`;
|
|
33
40
|
const get = (path: string, options: CloudConnectionOptions): Promise<unknown> =>
|
|
34
41
|
cloudFetch(path, options, { method: 'GET', detail: true });
|
|
35
42
|
const post = (path: string, body: unknown, options: CloudConnectionOptions): Promise<unknown> =>
|
|
36
43
|
cloudFetch(path, options, { method: 'POST', body: JSON.stringify(body), detail: true });
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*/
|
|
43
|
-
export async function readCloudHumanWait(runId: string, options: CloudConnectionOptions = {}) {
|
|
44
|
-
cloudRunId(runId);
|
|
45
|
-
const body = await get(`${route(runId)}/answer`, options);
|
|
45
|
+
function readCloudHumanAnswerRecord(body: unknown, runId: string): {
|
|
46
|
+
wait?: ReturnType<typeof readCloudHumanWaitValue>;
|
|
47
|
+
recorded?: CloudRecordedHumanAnswer;
|
|
48
|
+
} {
|
|
46
49
|
if (!isCloudRecord(body)) throw new CloudFlowError('invalid_response', 'Cloud returned no human answer record.');
|
|
47
|
-
if (body.runId !==
|
|
50
|
+
if (body.runId !== runId) {
|
|
48
51
|
throw new CloudFlowError('invalid_response', 'Cloud returned a human answer record for a different run.');
|
|
49
52
|
}
|
|
53
|
+
if (body.error !== undefined && body.error !== null) {
|
|
54
|
+
throw new CloudFlowError('invalid_response', 'Cloud returned an error beside a human answer record.');
|
|
55
|
+
}
|
|
56
|
+
if (body.ok !== undefined && body.ok !== true) {
|
|
57
|
+
throw new CloudFlowError('invalid_response', 'Cloud explicitly refused the human answer record.');
|
|
58
|
+
}
|
|
50
59
|
// An absent and a null field mean the same thing everywhere below.
|
|
51
60
|
const present = (key: string): boolean => body[key] !== undefined && body[key] !== null;
|
|
52
61
|
if (['humanWait', 'wait', 'openWaits'].filter(present).length > 1) {
|
|
@@ -59,12 +68,18 @@ export async function readCloudHumanWait(runId: string, options: CloudConnection
|
|
|
59
68
|
}
|
|
60
69
|
const wait = readCloudHumanWaitValue(candidates[0]);
|
|
61
70
|
if (candidates.length === 1 && !wait) throw new CloudFlowError('invalid_response', 'Cloud returned an invalid open human wait.');
|
|
62
|
-
|
|
71
|
+
if (['humanAnswer', 'answer'].filter(present).length > 1) {
|
|
72
|
+
throw new CloudFlowError('invalid_response', 'Cloud returned competing recorded human answer fields.');
|
|
73
|
+
}
|
|
74
|
+
const recorded = body.humanAnswer ?? body.answer;
|
|
63
75
|
if (recorded !== undefined && recorded !== null
|
|
64
76
|
&& (!isCloudRecord(recorded) || !readCloudHumanWaitValue(recorded) || typeof recorded.answer !== 'boolean'
|
|
65
77
|
|| (recorded.note !== undefined && recorded.note !== null && typeof recorded.note !== 'string'))) {
|
|
66
78
|
throw new CloudFlowError('invalid_response', 'Cloud returned an invalid recorded human answer.');
|
|
67
79
|
}
|
|
80
|
+
if (wait && isCloudRecord(recorded) && recorded.waitId !== wait.waitId) {
|
|
81
|
+
throw new CloudFlowError('invalid_response', 'Cloud returned a human answer for a different wait.');
|
|
82
|
+
}
|
|
68
83
|
return { wait, recorded: isCloudRecord(recorded)
|
|
69
84
|
// Like the wait fields, a null note means absent.
|
|
70
85
|
? { waitId: recorded.waitId as string, answer: recorded.answer as boolean,
|
|
@@ -72,6 +87,30 @@ export async function readCloudHumanWait(runId: string, options: CloudConnection
|
|
|
72
87
|
: undefined };
|
|
73
88
|
}
|
|
74
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Accepted answer route shapes are explicit: humanWait (or wait), or openWaits,
|
|
92
|
+
* and an optional recorded humanAnswer (legacy: answer) { waitId, answer, note? }.
|
|
93
|
+
* Unknown fields are additive, but competing or cross-run/wait shapes refuse.
|
|
94
|
+
*/
|
|
95
|
+
export async function readCloudHumanWait(runId: string, options: CloudConnectionOptions = {}) {
|
|
96
|
+
cloudRunId(runId);
|
|
97
|
+
return readCloudHumanAnswerRecord(await get(`${route(runId)}/answer`, options), runId);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function normalizedAnswerNote(note: string | undefined): string | undefined {
|
|
101
|
+
const normalized = note?.trim();
|
|
102
|
+
return normalized === undefined || normalized.length === 0 ? undefined : normalized;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function sameRecordedAnswer(
|
|
106
|
+
recorded: CloudRecordedHumanAnswer,
|
|
107
|
+
waitId: string,
|
|
108
|
+
answer: boolean,
|
|
109
|
+
note: string | undefined,
|
|
110
|
+
): boolean {
|
|
111
|
+
return recorded.waitId === waitId && recorded.answer === answer && recorded.note === note;
|
|
112
|
+
}
|
|
113
|
+
|
|
75
114
|
const HEX64 = /^[a-f0-9]{64}$/u;
|
|
76
115
|
|
|
77
116
|
function isSurfaceAuthority(value: unknown): value is SurfaceModuleAuthority {
|
|
@@ -125,6 +164,10 @@ async function resumeBody(record: Record<string, unknown>, runId: string, source
|
|
|
125
164
|
throw new CloudFlowError('unsupported_source', 'Cannot resume a run with extensions: Cloud must expose their original submissions.');
|
|
126
165
|
}
|
|
127
166
|
}
|
|
167
|
+
const repositoryGrant = readCloudRepositoryGrant(authority.repository);
|
|
168
|
+
if (authority.repository !== undefined && repositoryGrant === undefined) {
|
|
169
|
+
throw new CloudFlowError('invalid_response', 'Cloud run carries an invalid repository grant; refusing to widen or alter it.');
|
|
170
|
+
}
|
|
128
171
|
let workflow = record.workflow;
|
|
129
172
|
if (source !== undefined) {
|
|
130
173
|
try { workflow = await readFile(source, 'utf8'); }
|
|
@@ -144,6 +187,7 @@ async function resumeBody(record: Record<string, unknown>, runId: string, source
|
|
|
144
187
|
surface: await resumeSurface(authority.source.surface, source),
|
|
145
188
|
});
|
|
146
189
|
return { workflow, authoredAuthority, fileType: 'ts', relayflowVersion: 'v2', resume: runId,
|
|
190
|
+
...(repositoryGrant === undefined ? {} : { repositoryGrant }),
|
|
147
191
|
...(typeof record.workspaceId === 'string' ? { workspaceId: record.workspaceId } : {}) };
|
|
148
192
|
}
|
|
149
193
|
|
|
@@ -160,18 +204,19 @@ export async function answerCloudFlow(runId: string, answer: boolean, options: C
|
|
|
160
204
|
if (!waitId || (state.humanWait && state.humanWait.waitId !== waitId)) {
|
|
161
205
|
throw new CloudFlowError('invalid_response', 'Cloud answer record does not identify the run’s parked wait.');
|
|
162
206
|
}
|
|
163
|
-
|
|
164
|
-
if (recorded && (recorded
|
|
165
|
-
|| (recorded.note !== undefined && recorded.note !== options.note))) {
|
|
207
|
+
const note = normalizedAnswerNote(options.note);
|
|
208
|
+
if (recorded && !sameRecordedAnswer(recorded, waitId, answer, note)) {
|
|
166
209
|
throw new CloudFlowError('invalid_input', 'The recorded answer differs; a closed human wait cannot be changed.');
|
|
167
210
|
}
|
|
168
211
|
const body = await resumeBody(record as Record<string, unknown>, runId, options.source);
|
|
169
212
|
let answerRecorded = recorded !== undefined;
|
|
170
213
|
try {
|
|
171
214
|
if (!answerRecorded) {
|
|
172
|
-
const accepted = await post(`${route(runId)}/answer`, { waitId, answer, ...(
|
|
173
|
-
|
|
174
|
-
if (!
|
|
215
|
+
const accepted = await post(`${route(runId)}/answer`, { waitId, answer, ...(note === undefined ? {} : { note }) }, options);
|
|
216
|
+
const acknowledged = readCloudHumanAnswerRecord(accepted, runId);
|
|
217
|
+
if (!acknowledged.wait || !acknowledged.recorded
|
|
218
|
+
|| acknowledged.wait.waitId !== waitId
|
|
219
|
+
|| !sameRecordedAnswer(acknowledged.recorded, waitId, answer, note)) {
|
|
175
220
|
throw new CloudFlowError('invalid_response', 'Cloud did not confirm the human answer.');
|
|
176
221
|
}
|
|
177
222
|
answerRecorded = true;
|
package/src/cloud-connect.ts
CHANGED
|
@@ -30,6 +30,8 @@ export interface ConnectPrompt {
|
|
|
30
30
|
|
|
31
31
|
export interface EnsureConnectionsOptions extends CloudConnectionOptions {
|
|
32
32
|
workspaceId: string;
|
|
33
|
+
/** Providers this submission is activating as hosted event listeners. Direct runs and schedules omit this. */
|
|
34
|
+
eventIngressProviders?: readonly string[];
|
|
33
35
|
/** Omitted (`--no-connect`, or no TTY) means a missing integration is a refusal, never a prompt. */
|
|
34
36
|
prompt?: ConnectPrompt;
|
|
35
37
|
/** Status poll cadence while the browser connect is pending. Default 2 seconds. */
|
|
@@ -105,6 +107,9 @@ export async function ensureIntegrationsConnected(
|
|
|
105
107
|
options.signal?.throwIfAborted();
|
|
106
108
|
const probe = await probeIntegration(options.workspaceId, integration.provider, options);
|
|
107
109
|
if (probe.ready) {
|
|
110
|
+
if (needsEventIngress(integration, options) && eventIngressReady(probe.status) === false) {
|
|
111
|
+
throw eventIngressNotReady(integration, probe.status);
|
|
112
|
+
}
|
|
108
113
|
outcome.ready.push(integration.provider);
|
|
109
114
|
continue;
|
|
110
115
|
}
|
|
@@ -115,12 +120,41 @@ export async function ensureIntegrationsConnected(
|
|
|
115
120
|
if (!await options.prompt.confirm(`Connect ${label} now? (opens browser) [Y/n] `)) {
|
|
116
121
|
throw notConnected(integration, options);
|
|
117
122
|
}
|
|
118
|
-
await connectIntegration(integration.provider, options, options.prompt);
|
|
123
|
+
const connectedProbe = await connectIntegration(integration.provider, options, options.prompt);
|
|
124
|
+
if (needsEventIngress(integration, options) && eventIngressReady(connectedProbe.status) === false) {
|
|
125
|
+
throw eventIngressNotReady(integration, connectedProbe.status);
|
|
126
|
+
}
|
|
119
127
|
outcome.connected.push(integration.provider);
|
|
120
128
|
}
|
|
121
129
|
return outcome;
|
|
122
130
|
}
|
|
123
131
|
|
|
132
|
+
function needsEventIngress(
|
|
133
|
+
integration: FlowIntegrationRequirement, options: EnsureConnectionsOptions,
|
|
134
|
+
): boolean {
|
|
135
|
+
return integration.provider === 'gitlab'
|
|
136
|
+
&& options.eventIngressProviders?.includes(integration.provider) === true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function eventIngressReady(status: Record<string, unknown> | null): boolean | null {
|
|
140
|
+
if (status === null) return null;
|
|
141
|
+
return typeof status['eventIngressReady'] === 'boolean' ? status['eventIngressReady'] : null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function eventIngressNotReady(
|
|
145
|
+
integration: FlowIntegrationRequirement,
|
|
146
|
+
status: Record<string, unknown> | null,
|
|
147
|
+
): CloudFlowError {
|
|
148
|
+
const label = providerLabel(integration.provider);
|
|
149
|
+
const details = readinessDetails(status);
|
|
150
|
+
return new CloudFlowError('integration_not_ready',
|
|
151
|
+
`${label} is ready for scheduled sync, but webhook ingress is not verified for this flow source (${integration.detail})`
|
|
152
|
+
+ `${details === '' ? '.' : `: ${details}.`} `
|
|
153
|
+
+ 'Select the project and configure its matching webhook, then deliver a test event. '
|
|
154
|
+
+ 'Waiting for scheduled polling does not make a hosted listener ready. '
|
|
155
|
+
+ 'Keep the existing connection; do not log in again, reconnect, or switch auth type.');
|
|
156
|
+
}
|
|
157
|
+
|
|
124
158
|
function notReady(integration: FlowIntegrationRequirement, status: Record<string, unknown> | null): CloudFlowError {
|
|
125
159
|
const label = providerLabel(integration.provider);
|
|
126
160
|
const details = readinessDetails(status);
|
|
@@ -135,7 +169,9 @@ function notReady(integration: FlowIntegrationRequirement, status: Record<string
|
|
|
135
169
|
+ `${details === '' ? '.' : `: ${details}.`} ${remedy}`);
|
|
136
170
|
}
|
|
137
171
|
|
|
138
|
-
async function connectIntegration(
|
|
172
|
+
async function connectIntegration(
|
|
173
|
+
provider: string, options: EnsureConnectionsOptions, prompt: ConnectPrompt,
|
|
174
|
+
): Promise<IntegrationProbe> {
|
|
139
175
|
const base = `/api/v1/workspaces/${encodeURIComponent(options.workspaceId)}/integrations`;
|
|
140
176
|
const session = await cloudFetch(`${base}/connect-session`, options, {
|
|
141
177
|
method: 'POST', detail: true,
|
|
@@ -160,9 +196,10 @@ async function connectIntegration(provider: string, options: EnsureConnectionsOp
|
|
|
160
196
|
while (Date.now() < deadline) {
|
|
161
197
|
await sleep(interval, options.signal);
|
|
162
198
|
options.signal?.throwIfAborted();
|
|
163
|
-
|
|
199
|
+
const probe = await probeIntegration(options.workspaceId, provider, options);
|
|
200
|
+
if (probe.ready) {
|
|
164
201
|
prompt.info(`${providerLabel(provider)} connected.`);
|
|
165
|
-
return;
|
|
202
|
+
return probe;
|
|
166
203
|
}
|
|
167
204
|
}
|
|
168
205
|
throw new CloudFlowError('integration_not_connected',
|
package/src/cloud-deploy.ts
CHANGED
|
@@ -315,7 +315,10 @@ export async function deployToCloud(
|
|
|
315
315
|
const connected = manual || input.draft || input.checkConnections === false
|
|
316
316
|
? []
|
|
317
317
|
: (await ensureIntegrationsConnected(requirements, {
|
|
318
|
-
...options,
|
|
318
|
+
...options,
|
|
319
|
+
workspaceId: workspace.id,
|
|
320
|
+
eventIngressProviders: sources.map(source => source.provider),
|
|
321
|
+
...(input.connect === undefined ? {} : { prompt: input.connect }),
|
|
319
322
|
})).connected;
|
|
320
323
|
options.signal?.throwIfAborted();
|
|
321
324
|
const result = await cloudFetch('/api/v1/flows/deploy', options, { method: 'POST', detail: true, body: JSON.stringify({
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { isCloudRecord } from './cloud-http.js';
|
|
2
|
+
|
|
3
|
+
export interface CloudRepositoryGrant {
|
|
4
|
+
host?: 'gitlab';
|
|
5
|
+
owner: string;
|
|
6
|
+
repo: string;
|
|
7
|
+
baseBranch: string;
|
|
8
|
+
baseSha: string;
|
|
9
|
+
branch: string;
|
|
10
|
+
mode?: 'head';
|
|
11
|
+
workflows?: true;
|
|
12
|
+
access?: 'read';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const coordinate = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$/u;
|
|
16
|
+
|
|
17
|
+
function validGitlabNamespace(value: unknown): value is string {
|
|
18
|
+
if (typeof value !== 'string' || value.length > 255) return false;
|
|
19
|
+
const parts = value.split('/');
|
|
20
|
+
return parts.length >= 1 && parts.length <= 20 && parts.every(part => (
|
|
21
|
+
coordinate.test(part) && !part.endsWith('.') && !part.endsWith('.git') && !part.endsWith('.atom')
|
|
22
|
+
));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function validRepositoryBranch(value: unknown): value is string {
|
|
26
|
+
return typeof value === 'string'
|
|
27
|
+
&& /^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$/u.test(value)
|
|
28
|
+
&& value !== 'HEAD'
|
|
29
|
+
&& !value.includes('..')
|
|
30
|
+
&& !value.includes('//')
|
|
31
|
+
&& value.split('/').every(part => (
|
|
32
|
+
part !== '' && !part.startsWith('.') && !part.endsWith('.') && !part.endsWith('.lock')
|
|
33
|
+
));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Rebuild the request portion of persisted Cloud repository authority.
|
|
38
|
+
* Cloud re-admits this request against the persisted identity and current
|
|
39
|
+
* connection; the SDK must neither infer missing authority nor widen it.
|
|
40
|
+
*/
|
|
41
|
+
export function readCloudRepositoryGrant(value: unknown): CloudRepositoryGrant | undefined {
|
|
42
|
+
if (value === undefined) return undefined;
|
|
43
|
+
if (!isCloudRecord(value)) return undefined;
|
|
44
|
+
const gitlab = value.host === 'gitlab';
|
|
45
|
+
if ((value.host !== undefined && value.host !== 'github' && value.host !== 'gitlab')
|
|
46
|
+
|| typeof value.owner !== 'string'
|
|
47
|
+
|| !(gitlab ? validGitlabNamespace(value.owner) : coordinate.test(value.owner))
|
|
48
|
+
|| typeof value.repo !== 'string'
|
|
49
|
+
|| !/^[A-Za-z0-9_.-]{1,100}$/u.test(value.repo)
|
|
50
|
+
|| value.repo === '.' || value.repo === '..'
|
|
51
|
+
|| (gitlab && (value.repo.endsWith('.git') || value.repo.endsWith('.atom') || value.repo.endsWith('.')))
|
|
52
|
+
|| !validRepositoryBranch(value.baseBranch)
|
|
53
|
+
|| !validRepositoryBranch(value.branch)
|
|
54
|
+
|| (value.mode !== undefined && value.mode !== 'new' && value.mode !== 'head')
|
|
55
|
+
|| (value.workflows !== undefined && typeof value.workflows !== 'boolean')
|
|
56
|
+
|| (gitlab && value.workflows === true)
|
|
57
|
+
|| (value.access !== undefined && value.access !== 'read')
|
|
58
|
+
|| (value.access === 'read' && value.workflows === true)
|
|
59
|
+
|| (gitlab && value.access === 'read')
|
|
60
|
+
|| (value.mode !== 'head' && !value.branch.startsWith('relayflow/'))
|
|
61
|
+
|| value.branch === value.baseBranch
|
|
62
|
+
|| typeof value.baseSha !== 'string'
|
|
63
|
+
|| !/^[a-f0-9]{40}$/u.test(value.baseSha)) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
...(gitlab ? { host: 'gitlab' as const } : {}),
|
|
68
|
+
owner: value.owner.toLowerCase(),
|
|
69
|
+
repo: value.repo.toLowerCase(),
|
|
70
|
+
baseBranch: value.baseBranch,
|
|
71
|
+
baseSha: value.baseSha,
|
|
72
|
+
branch: value.branch,
|
|
73
|
+
...(value.mode === 'head' ? { mode: 'head' as const } : {}),
|
|
74
|
+
...(value.workflows === true ? { workflows: true as const } : {}),
|
|
75
|
+
...(value.access === 'read' ? { access: 'read' as const } : {}),
|
|
76
|
+
};
|
|
77
|
+
}
|
package/src/cloud-schedule.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cronGrid, everyToMs, parseCron, type ScheduleTriggerSource } from '@relayflows/surface';
|
|
2
|
-
import { CloudFlowError, cloudFetch,
|
|
2
|
+
import { CloudFlowError, cloudFetch, isCloudRecord, type CloudConnectionOptions } from './cloud-http.js';
|
|
3
3
|
import { cloudSubmissionBody, prepareCloudSubmission, type CloudFlowSource } from './cloud-run.js';
|
|
4
4
|
import type { JsonValue } from './json-value.js';
|
|
5
5
|
|
|
@@ -150,7 +150,7 @@ function toCloudSchedule(row: Record<string, unknown>): CloudSchedule {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
export async function listCloudSchedules(options: CloudConnectionOptions = {}): Promise<CloudSchedule[]> {
|
|
153
|
-
const payload = await
|
|
153
|
+
const payload = await cloudFetch('/api/v1/workflows/schedules', options, { method: 'GET', detail: true });
|
|
154
154
|
if (!isCloudRecord(payload) || !Array.isArray(payload.schedules)) {
|
|
155
155
|
throw new CloudFlowError('invalid_response', 'Cloud did not return a schedules list.');
|
|
156
156
|
}
|
package/src/cloud-versions.ts
CHANGED
|
@@ -133,7 +133,10 @@ export async function deployVersionToCloud(
|
|
|
133
133
|
const connected = listener.status !== 'listening' || input.checkConnections === false
|
|
134
134
|
? []
|
|
135
135
|
: (await ensureIntegrationsConnected(requirements, {
|
|
136
|
-
...options,
|
|
136
|
+
...options,
|
|
137
|
+
workspaceId: workspace.id,
|
|
138
|
+
eventIngressProviders: listener.sources.map(source => source.provider),
|
|
139
|
+
...(input.connect === undefined ? {} : { prompt: input.connect }),
|
|
137
140
|
})).connected;
|
|
138
141
|
options.signal?.throwIfAborted();
|
|
139
142
|
const result = await cloudFetch(`/api/v1/flows/listeners/${encodeURIComponent(agentId)}/versions`, options, {
|