@retainer/extension 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/agent.d.ts +29 -0
- package/dist/agent.js +49 -0
- package/dist/agent.js.map +1 -0
- package/dist/cron.d.ts +2 -0
- package/dist/cron.js +56 -0
- package/dist/cron.js.map +1 -0
- package/dist/index.d.ts +1066 -0
- package/dist/index.js +1010 -0
- package/dist/index.js.map +1 -0
- package/dist/model.d.ts +14 -0
- package/dist/model.js +25 -0
- package/dist/model.js.map +1 -0
- package/dist/nango-gmail.d.ts +56 -0
- package/dist/nango-gmail.js +244 -0
- package/dist/nango-gmail.js.map +1 -0
- package/dist/protocol.d.ts +137 -0
- package/dist/protocol.js +144 -0
- package/dist/protocol.js.map +1 -0
- package/dist/semver.d.ts +30 -0
- package/dist/semver.js +115 -0
- package/dist/semver.js.map +1 -0
- package/dist/webhook.d.ts +30 -0
- package/dist/webhook.js +61 -0
- package/dist/webhook.js.map +1 -0
- package/package.json +57 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Retainer contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @retainer/extension
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MIT build-time helpers for reviewed Retainer packages. `defineExtension`,
|
|
4
|
+
`defineFunction` and `defineView` validate JSON; they never register or execute
|
|
5
|
+
code in the server. Workspace callers cannot upload manifests or executables.
|
|
6
|
+
|
|
7
|
+
This initial contract supports additive objects/fields and table views. All
|
|
8
|
+
schema identities are UUIDs, field data remains keyed by permanent field keys,
|
|
9
|
+
and installation ownership is separate from schema `owner`.
|
|
10
|
+
|
|
11
|
+
The initial catalog accepts exact supported server versions, Node 24 and
|
|
12
|
+
protocol v1. Cron uses five UTC fields with lists, ranges, steps and month/weekday names. Settings are typed
|
|
13
|
+
scalar values; executable defaults, remote schemas/code and unknown kinds fail
|
|
14
|
+
validation. Nested input schemas require closed objects and bounded arrays.
|
|
15
|
+
|
|
16
|
+
The server supports reviewed installation approval, lifecycle, isolated hosted
|
|
17
|
+
jobs, source revisions, files, webhooks and change triggers. Table views are
|
|
18
|
+
created through the existing view service and retained across uninstall/reinstall.
|
|
19
|
+
The default catalog is empty; operators explicitly bundle reviewed releases and
|
|
20
|
+
configure their execution prerequisites before activation.
|
|
21
|
+
|
|
22
|
+
## Retries
|
|
23
|
+
|
|
24
|
+
Retry is opt-in. A hosted handler retries only when it returns
|
|
25
|
+
`{status: 'retry'}` or throws `RetryLater`:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { RetryLater } from '@retainer/extension';
|
|
29
|
+
|
|
30
|
+
if (response.status === 429 || response.status >= 500)
|
|
31
|
+
throw new RetryLater({ code: 'provider_unavailable', retryAfterSeconds: 60 });
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Any other exception fails the run for good, including raw network errors from
|
|
35
|
+
your own `fetch` calls: catch them and throw `RetryLater` if they are transient.
|
|
36
|
+
Runs that hit the function's timeout retry as `execution_timeout`, with backoff.
|
|
37
|
+
|
|
38
|
+
Standalone manifests use `execution: 'standalone'` and may pin the registered
|
|
39
|
+
`oauthClientId` used for accounts-mode REST consent. Client identity is part of
|
|
40
|
+
the release digest and cannot change across releases of one registration.
|
|
41
|
+
Key-mode admins instead issue installation keys. Both identify the approved
|
|
42
|
+
workspace app and have no personal-memory access. Hosted queue/KV/secrets and
|
|
43
|
+
managed-source attestation continue to require a leased hosted invocation.
|
|
44
|
+
See [standalone app connections](../../docs/standalone-apps.md) for registration,
|
|
45
|
+
consent, SDK usage, credential rotation and source-write boundaries.
|
|
46
|
+
|
|
47
|
+
See `docs/specs/extensions.md` for the full acceptance specification and
|
|
48
|
+
`docs/specs/extensions-implementation.md` for outstanding delivery phases.
|
|
49
|
+
|
|
50
|
+
## Configure before turn-on
|
|
51
|
+
|
|
52
|
+
A hosted release may declare one `{ kind: 'configure' }` function with explicit
|
|
53
|
+
`scopes: ['read']` and a mapping or non-secret settings to suggest. A human first
|
|
54
|
+
approves read access and declared secrets. Retainer queues configure while the
|
|
55
|
+
installation is `configuring`; the final human approval applies schema, mapping
|
|
56
|
+
and write access and queues install.
|
|
57
|
+
|
|
58
|
+
Configure receives server-defined input:
|
|
59
|
+
`{ reason: 'install' | 'upgrade' | 'requested', previousVersion, newOutputs }`.
|
|
60
|
+
Use `RetainerClient.saveExtensionSuggestions(installationId, { mapping, settings })`
|
|
61
|
+
to save a partial suggestion. Mapping choices use current API field names and may
|
|
62
|
+
include a short `reason`. Suggestions are visible only after success, are checked
|
|
63
|
+
against the current schema, and never apply without human review. Each retry
|
|
64
|
+
starts with empty suggestions. Configure may read KV, but cannot write it, enqueue
|
|
65
|
+
children, write records, attest sources, register webhooks or write secrets.
|
|
66
|
+
Provider calls must not create durable resources; setup belongs to install.
|
|
67
|
+
|
|
68
|
+
Reviewed upgrades run target code with a separate release-pinned access approval;
|
|
69
|
+
the installed release keeps its code, grant and credentials until final approval.
|
|
70
|
+
See [the lifecycle contract](../../docs/specs/extensions-configure.md).
|
package/dist/agent.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type AgentResult, type AgentTaskRequest } from '@retainer/shared';
|
|
2
|
+
import type { ExecutionResult, Invocation } from './protocol.js';
|
|
3
|
+
/**
|
|
4
|
+
* Hands the workspace agent a task from an extension function (agent spec
|
|
5
|
+
* §9.2). The function can't replay, so it stages the task, returns
|
|
6
|
+
* `waitFor(taskId)` and ends; when the task finishes, Retainer calls the
|
|
7
|
+
* function again with the same input and `invocation.agentResult`, which
|
|
8
|
+
* `withAgentResult` routes to the function's `onAgentResult`.
|
|
9
|
+
*
|
|
10
|
+
* `start` only stages the task: nothing runs until Retainer accepts the
|
|
11
|
+
* function's `{ wait }`. A staged task the function doesn't wait for is
|
|
12
|
+
* dropped. Needs `uses: ['agent']` and `agent.tools` on the function, and the
|
|
13
|
+
* installation's grant.
|
|
14
|
+
*/
|
|
15
|
+
export declare function agentClient(invocation: Pick<Invocation, 'apiOrigin' | 'runToken' | 'installationId'>, transport?: typeof fetch): {
|
|
16
|
+
start(request: AgentTaskRequest): Promise<{
|
|
17
|
+
taskId: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/** The outcome that parks the invocation on a staged task (agent spec §9.2). */
|
|
21
|
+
export declare function waitFor(taskId: string): ExecutionResult;
|
|
22
|
+
/**
|
|
23
|
+
* Routes an invocation: the answer of a task it waited for goes to
|
|
24
|
+
* `onAgentResult`, anything else to `run`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function withAgentResult(invocation: Invocation, handlers: {
|
|
27
|
+
run: (invocation: Invocation) => Promise<ExecutionResult>;
|
|
28
|
+
onAgentResult: (result: AgentResult, invocation: Invocation) => Promise<ExecutionResult>;
|
|
29
|
+
}): Promise<ExecutionResult>;
|
package/dist/agent.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { agentTaskRequestSchema } from '@retainer/shared';
|
|
2
|
+
/**
|
|
3
|
+
* Hands the workspace agent a task from an extension function (agent spec
|
|
4
|
+
* §9.2). The function can't replay, so it stages the task, returns
|
|
5
|
+
* `waitFor(taskId)` and ends; when the task finishes, Retainer calls the
|
|
6
|
+
* function again with the same input and `invocation.agentResult`, which
|
|
7
|
+
* `withAgentResult` routes to the function's `onAgentResult`.
|
|
8
|
+
*
|
|
9
|
+
* `start` only stages the task: nothing runs until Retainer accepts the
|
|
10
|
+
* function's `{ wait }`. A staged task the function doesn't wait for is
|
|
11
|
+
* dropped. Needs `uses: ['agent']` and `agent.tools` on the function, and the
|
|
12
|
+
* installation's grant.
|
|
13
|
+
*/
|
|
14
|
+
export function agentClient(invocation, transport = fetch) {
|
|
15
|
+
return {
|
|
16
|
+
async start(request) {
|
|
17
|
+
const body = agentTaskRequestSchema.parse(request);
|
|
18
|
+
const response = await transport(new URL(`/v1/extensions/${invocation.installationId}/runtime/agent-tasks`, invocation.apiOrigin), {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: {
|
|
21
|
+
authorization: `Bearer ${invocation.runToken}`,
|
|
22
|
+
'content-type': 'application/json',
|
|
23
|
+
},
|
|
24
|
+
body: JSON.stringify(body),
|
|
25
|
+
});
|
|
26
|
+
const json = (await response.json().catch(() => ({})));
|
|
27
|
+
if (response.status !== 201 || typeof json.taskId !== 'string')
|
|
28
|
+
throw Object.assign(new Error(`agent task refused: ${json.code ?? response.status}`), {
|
|
29
|
+
status: response.status,
|
|
30
|
+
code: json.code ?? 'agent_task_failed',
|
|
31
|
+
});
|
|
32
|
+
return { taskId: json.taskId };
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** The outcome that parks the invocation on a staged task (agent spec §9.2). */
|
|
37
|
+
export function waitFor(taskId) {
|
|
38
|
+
return { status: 'succeeded', wait: taskId };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Routes an invocation: the answer of a task it waited for goes to
|
|
42
|
+
* `onAgentResult`, anything else to `run`.
|
|
43
|
+
*/
|
|
44
|
+
export function withAgentResult(invocation, handlers) {
|
|
45
|
+
return invocation.agentResult
|
|
46
|
+
? handlers.onAgentResult(invocation.agentResult, invocation)
|
|
47
|
+
: handlers.run(invocation);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAGnG;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CACzB,UAAyE,EACzE,SAAS,GAAiB,KAAK;IAE/B,OAAO;QACL,KAAK,CAAC,KAAK,CAAC,OAAyB;YACnC,MAAM,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAC9B,IAAI,GAAG,CACL,kBAAkB,UAAU,CAAC,cAAc,sBAAsB,EACjE,UAAU,CAAC,SAAS,CACrB,EACD;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,UAAU,CAAC,QAAQ,EAAE;oBAC9C,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CACF,CAAC;YACF,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAGpD,CAAC;YACF,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAC5D,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE;oBACpF,MAAM,EAAE,QAAQ,CAAC,MAAM;oBACvB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,mBAAmB;iBACvC,CAAC,CAAC;YACL,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAsB,EACtB,QAGC;IAED,OAAO,UAAU,CAAC,WAAW;QAC3B,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC;QAC5D,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/cron.d.ts
ADDED
package/dist/cron.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const MONTHS = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
|
|
2
|
+
const DAYS = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
|
|
3
|
+
function field(raw, min, max, names = []) {
|
|
4
|
+
const text = raw.toUpperCase().replace(/[A-Z]+/g, (name) => {
|
|
5
|
+
const index = names.indexOf(name);
|
|
6
|
+
if (index < 0)
|
|
7
|
+
throw new Error('invalid UTC cron name');
|
|
8
|
+
return String(index + min);
|
|
9
|
+
});
|
|
10
|
+
const allowed = new Set();
|
|
11
|
+
for (const part of text.split(',')) {
|
|
12
|
+
const match = /^(\*|\d{1,2}(?:-\d{1,2})?)(?:\/(\d{1,2}))?$/.exec(part);
|
|
13
|
+
if (!match)
|
|
14
|
+
throw new Error('invalid UTC cron field');
|
|
15
|
+
const base = match[1], step = match[2] === undefined ? 1 : Number(match[2]);
|
|
16
|
+
if (!base || step < 1 || step > max - min + 1)
|
|
17
|
+
throw new Error('invalid UTC cron step');
|
|
18
|
+
const range = base === '*' ? [min, max] : base.split('-').map(Number);
|
|
19
|
+
const start = range[0], end = range[1] ?? (match[2] === undefined ? start : max);
|
|
20
|
+
if (start === undefined || end === undefined || start < min || end > max || end < start)
|
|
21
|
+
throw new Error('invalid UTC cron range');
|
|
22
|
+
for (let value = start; value <= end; value += step)
|
|
23
|
+
allowed.add(value);
|
|
24
|
+
}
|
|
25
|
+
return [...allowed].sort((a, b) => a - b);
|
|
26
|
+
}
|
|
27
|
+
/** Five-field UTC cron with lists, ranges, steps and month/weekday names; DOM/DOW use OR. */
|
|
28
|
+
export function nextOccurrence(cron, after) {
|
|
29
|
+
if (!Number.isFinite(after.getTime()))
|
|
30
|
+
throw new Error('invalid scheduling time');
|
|
31
|
+
const parts = cron.trim().split(/\s+/);
|
|
32
|
+
if (parts.length !== 5)
|
|
33
|
+
throw new Error('invalid UTC cron');
|
|
34
|
+
const [minuteText, hourText, dayText, monthText, weekdayText] = parts;
|
|
35
|
+
if (!minuteText || !hourText || !dayText || !monthText || !weekdayText)
|
|
36
|
+
throw new Error('invalid UTC cron');
|
|
37
|
+
const minutes = field(minuteText, 0, 59), hours = field(hourText, 0, 23), days = field(dayText, 1, 31), months = field(monthText, 1, 12, MONTHS), weekdays = field(weekdayText, 0, 7, DAYS).map((day) => (day === 7 ? 0 : day));
|
|
38
|
+
const date = new Date(after);
|
|
39
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
40
|
+
for (let n = 0; n <= 366 * 8 + 1; n++, date.setUTCDate(date.getUTCDate() + 1)) {
|
|
41
|
+
if (!months.includes(date.getUTCMonth() + 1))
|
|
42
|
+
continue;
|
|
43
|
+
const dom = days.includes(date.getUTCDate()), dow = weekdays.includes(date.getUTCDay());
|
|
44
|
+
if (!(dayText !== '*' && weekdayText !== '*' ? dom || dow : dom && dow))
|
|
45
|
+
continue;
|
|
46
|
+
for (const hour of hours)
|
|
47
|
+
for (const minute of minutes) {
|
|
48
|
+
const next = new Date(date);
|
|
49
|
+
next.setUTCHours(hour, minute, 0, 0);
|
|
50
|
+
if (next > after)
|
|
51
|
+
return next;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
throw new Error('cron has no occurrence in the next eight years');
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=cron.js.map
|
package/dist/cron.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron.js","sourceRoot":"","sources":["../src/cron.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACpG,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAC/D,SAAS,KAAK,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAE,KAAK,GAAa,EAAE;IACxE,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;QACzD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC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