@tnunamak/dalan 0.6.2 → 0.8.0
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/CHANGELOG.md +53 -0
- package/CONTRIBUTING.md +4 -0
- package/PROTOCOL.md +2 -0
- package/README.md +81 -84
- package/bin/dalan.mjs +9 -0
- package/bin/dot-worker.mjs +29 -4
- package/contracts/adapter-qualification.schema.json +170 -0
- package/docs/chatgpt-worker-onboarding.md +10 -14
- package/docs/claude-worker-onboarding.md +9 -8
- package/docs/codex-to-muse.md +21 -35
- package/docs/connect-chatgpt.md +10 -16
- package/docs/dalan-upgrade.md +4 -2
- package/docs/local-agent-mcp.md +24 -4
- package/docs/local-agent-requester.md +46 -0
- package/docs/manual-setup.md +2 -2
- package/docs/operations.md +12 -13
- package/docs/pull-workers.md +1 -2
- package/docs/service-setup.md +110 -163
- package/docs/setup-reference.md +6 -6
- package/docs/t3-question-relationship.md +43 -0
- package/docs/t3-reverse-control.md +12 -8
- package/docs/t3-wake-fence-r4.md +42 -0
- package/docs/test-suite-isolation.md +204 -0
- package/docs/worker-clients.md +6 -4
- package/package.json +5 -3
- package/qualification/README.md +13 -0
- package/qualification/mcp.json +121 -0
- package/qualification/protocol-v0.json +127 -0
- package/scripts/dalan-try-selfcheck.mjs +8 -7
- package/scripts/worker-bridge-setup.mjs +91 -81
- package/src/admin-socket.mjs +2 -1
- package/src/answer-journal.mjs +200 -0
- package/src/as-store.mjs +5 -3
- package/src/as.mjs +35 -26
- package/src/auth-check.mjs +59 -0
- package/src/cli-help.mjs +16 -16
- package/src/client-approval.mjs +57 -0
- package/src/client-convenience.mjs +166 -0
- package/src/client-conveniences.json +106 -0
- package/src/client-conveniences.schema.json +97 -0
- package/src/connect-cli.mjs +5 -5
- package/src/default-home.mjs +36 -0
- package/src/destinations/index.mjs +6 -0
- package/src/destinations/none.mjs +3 -0
- package/src/destinations/t3.mjs +63 -6
- package/src/execution.mjs +20 -2
- package/src/follow-current.mjs +27 -0
- package/src/gozar-routes.mjs +315 -0
- package/src/host-budget.mjs +17 -11
- package/src/host-execution-policy.mjs +2 -2
- package/src/host-stop-reverify.mjs +6 -4
- package/src/integrator.mjs +3 -1
- package/src/redirect-policy.mjs +61 -0
- package/src/route-setting.mjs +71 -12
- package/src/server.mjs +64 -12
- package/src/service-auto-update.mjs +8 -1
- package/src/service-launchd.mjs +186 -0
- package/src/service-migrate-workers.mjs +12 -2
- package/src/service-update-runtime.mjs +40 -6
- package/src/service-update.mjs +20 -14
- package/src/service.mjs +211 -63
- package/src/setup.mjs +55 -44
- package/src/store.mjs +77 -14
- package/src/submission-policy.mjs +8 -4
- package/src/t3.mjs +21 -2
- package/src/tool-registry.mjs +54 -8
- package/src/try-exposure.mjs +7 -657
- package/src/try-hosted.mjs +71 -101
- package/src/try-selfcheck.mjs +15 -8
- package/src/try.mjs +9 -13
- package/src/workers.mjs +4 -3
- package/src/workspace.mjs +94 -15
- package/scripts/lib/expose-tailscale.mjs +0 -408
- package/src/try-hosted-clients.mjs +0 -46
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// What the owner is told to click in a hosted client, and which OAuth callback that client uses. This is data and copy only:
|
|
2
|
-
// the bridge's OAuth rules live in src/as.mjs. The callbacks below are the vendors' published ones and are also in the bridge's
|
|
3
|
-
// default callback list (src/as-files.mjs), so a hosted trial adds no new trust.
|
|
4
|
-
import { terminalSafe } from './terminal-safe.mjs';
|
|
5
|
-
|
|
6
|
-
export const CONNECTOR_NAME = 'Dalan Trial';
|
|
7
|
-
|
|
8
|
-
export const CLIENTS = {
|
|
9
|
-
chatgpt: {
|
|
10
|
-
label: 'ChatGPT',
|
|
11
|
-
// https://developers.openai.com/apps-sdk/build/auth: the stable redirect, and the connection-specific one that ChatGPT
|
|
12
|
-
// uses when it does not accept the issuer's identification. Both are vendor-published; anything else is refused here.
|
|
13
|
-
callbacks: ['https://chatgpt.com/connector_platform_oauth_redirect', /^https:\/\/chatgpt\.com\/connector\/oauth\/[A-Za-z0-9_-]+$/],
|
|
14
|
-
steps: [
|
|
15
|
-
'Open ChatGPT, then Settings → Apps (older accounts: Settings → Connectors → Advanced → Developer mode), and choose Create or Add a custom MCP server.',
|
|
16
|
-
`Name it "${CONNECTOR_NAME}", paste the URL above, choose OAuth (automatic registration if asked), accept the notice and create it.`,
|
|
17
|
-
`Open a new chat, enable "${CONNECTOR_NAME}" from the + menu, start sign-in, and approve the matching code in this terminal.`,
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
claude: {
|
|
21
|
-
label: 'claude.ai',
|
|
22
|
-
callbacks: ['https://claude.ai/api/mcp/auth_callback'],
|
|
23
|
-
steps: [
|
|
24
|
-
'Open claude.ai, then Customize → Connectors → + → Add custom connector. (If your organization manages connectors, an owner adds it under Organization settings → Connectors first.)',
|
|
25
|
-
`Name it "${CONNECTOR_NAME}", paste the URL above, leave the OAuth client fields empty (automatic registration), then Add and sign in.`,
|
|
26
|
-
`Approve the matching code in this terminal when Dalan asks.`,
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const CLIENT_NAMES = Object.keys(CLIENTS);
|
|
32
|
-
|
|
33
|
-
export const callbackAllowed = (client, redirect) => CLIENTS[client].callbacks.some(c => typeof c === 'string' ? c === redirect : c.test(redirect));
|
|
34
|
-
|
|
35
|
-
export const hostedPrompt = (requestId, requestPhrase) =>
|
|
36
|
-
`Use ${CONNECTOR_NAME} to list pending jobs, claim only ${requestId}, read its brief, and finish it with the requested report (${requestPhrase}). Stop if the job is missing or cancelled. Do not read files, run commands, or call other services.`;
|
|
37
|
-
|
|
38
|
-
// The connector handoff: every value is filled in. `url` is a credential, so the caller writes this text to the owner's terminal
|
|
39
|
-
// only, never to a log.
|
|
40
|
-
export function handoffText({ client, url }) {
|
|
41
|
-
const spec = CLIENTS[client];
|
|
42
|
-
return [
|
|
43
|
-
`Connector name: ${CONNECTOR_NAME}`, 'Paste this URL into your connector (it is a secret; it stays on this terminal and in the private resource-url file):', url, '',
|
|
44
|
-
spec.label, ...spec.steps.map((step, i) => `${i + 1}. ${step}`),
|
|
45
|
-
].map(line => terminalSafe(line)).join('\n');
|
|
46
|
-
}
|