@installagent/sdk 0.1.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/dist/agent-templates.d.ts +90 -0
- package/dist/agent-templates.js +211 -0
- package/dist/client-build.d.ts +50 -0
- package/dist/client-build.js +155 -0
- package/dist/client-context.d.ts +40 -0
- package/dist/client-context.js +70 -0
- package/dist/client-drive.d.ts +67 -0
- package/dist/client-drive.js +278 -0
- package/dist/client-intake.d.ts +68 -0
- package/dist/client-intake.js +189 -0
- package/dist/client-linear.d.ts +30 -0
- package/dist/client-linear.js +85 -0
- package/dist/docs-search.d.ts +44 -0
- package/dist/docs-search.js +187 -0
- package/dist/doctor.d.ts +43 -0
- package/dist/doctor.js +425 -0
- package/dist/env-file.d.ts +25 -0
- package/dist/env-file.js +69 -0
- package/dist/env-fill.d.ts +43 -0
- package/dist/env-fill.js +161 -0
- package/dist/env-push.d.ts +37 -0
- package/dist/env-push.js +137 -0
- package/dist/env-registry.d.ts +49 -0
- package/dist/env-registry.js +230 -0
- package/dist/exec.d.ts +14 -0
- package/dist/exec.js +16 -0
- package/dist/fathom-webhook.d.ts +44 -0
- package/dist/fathom-webhook.js +123 -0
- package/dist/fs-utils.d.ts +9 -0
- package/dist/fs-utils.js +34 -0
- package/dist/gcp-service-account-key.d.ts +37 -0
- package/dist/gcp-service-account-key.js +66 -0
- package/dist/gemini-api-key.d.ts +47 -0
- package/dist/gemini-api-key.js +132 -0
- package/dist/git.d.ts +16 -0
- package/dist/git.js +29 -0
- package/dist/github-token.d.ts +24 -0
- package/dist/github-token.js +30 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +28 -0
- package/dist/init.d.ts +47 -0
- package/dist/init.js +101 -0
- package/dist/linear-project.d.ts +81 -0
- package/dist/linear-project.js +192 -0
- package/dist/new-client.d.ts +32 -0
- package/dist/new-client.js +89 -0
- package/dist/ping.d.ts +6 -0
- package/dist/ping.js +7 -0
- package/dist/portal-admin.d.ts +133 -0
- package/dist/portal-admin.js +144 -0
- package/dist/sync-templates.d.ts +58 -0
- package/dist/sync-templates.js +109 -0
- package/dist/template-sync.d.ts +55 -0
- package/dist/template-sync.js +90 -0
- package/dist/templates.d.ts +19 -0
- package/dist/templates.js +24 -0
- package/dist/wizard.d.ts +78 -0
- package/dist/wizard.js +213 -0
- package/package.json +30 -0
- package/templates/env.example +60 -0
- package/templates/workspace-root/.claude/settings.json +39 -0
- package/templates/workspace-root/AGENT.md +205 -0
- package/templates/workspace-root/AGENTS.md +11 -0
- package/templates/workspace-root/CLAUDE.md +63 -0
- package/templates/workspace-root/GEMINI.md +24 -0
- package/templates/workspace-root/ONBOARDING.md +164 -0
- package/templates/workspace-root/README.md +67 -0
- package/templates/workspace-root/skills/CLAUDE.md +79 -0
- package/templates/workspace-root/skills/client-deliverables/SKILL.md +131 -0
- package/templates/workspace-root/skills/client-deliverables/references/package-layout.md +103 -0
- package/templates/workspace-root/skills/client-facing-docs/SKILL.md +131 -0
- package/templates/workspace-root/skills/client-facing-docs/references/doc-structures.md +81 -0
- package/templates/workspace-root/skills/client-llm-setup/SKILL.md +97 -0
- package/templates/workspace-root/skills/client-llm-setup/references/guide-template.md +87 -0
- package/templates/workspace-root/skills/client-workflow-diagram/SKILL.md +141 -0
- package/templates/workspace-root/skills/client-workflow-diagram/references/excalidraw-format.md +140 -0
- package/templates/workspace-root/skills/contract-tech-agnostic/SKILL.md +99 -0
- package/templates/workspace-root/skills/contract-tech-agnostic/references/Install_Agent_SOW_Template.docx +0 -0
- package/templates/workspace-root/skills/design-system/SKILL.md +118 -0
- package/templates/workspace-root/skills/design-system/references/tokens.md +139 -0
- package/templates/workspace-root/skills/engagement-spec/SKILL.md +272 -0
- package/templates/workspace-root/skills/engagement-spec/references/spec-templates.md +220 -0
- package/templates/workspace-root/skills/house-voice/SKILL.md +158 -0
- package/templates/workspace-root/skills/house-voice/references/source-copy.md +173 -0
- package/templates/workspace-root/skills/ia-cli/SKILL.md +87 -0
- package/templates/workspace-root/skills/installagent-brand-kit/SKILL.md +112 -0
- package/templates/workspace-root/skills/installagent-brand-kit/assets/installagent-logo.svg +1 -0
- package/templates/workspace-root/skills/installagent-brand-kit/assets/installagent-mark.svg +1 -0
- package/templates/workspace-root/skills/installagent-brand-kit/references/brand-tokens.md +71 -0
- package/templates/workspace-root/skills/installagent-brand-kit/references/branded-pdf.md +66 -0
- package/templates/workspace-root/skills/installagent-brand-kit/references/excalidraw-red-theme.md +73 -0
- package/templates/workspace-root/skills/installagent-brand-kit/scripts/brand.py +175 -0
- package/templates/workspace-root/skills/linear/SKILL.md +186 -0
- package/templates/workspace-root/skills/tech-call-prep/SKILL.md +141 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const FATHOM_API_BASE_URL = "https://api.fathom.ai";
|
|
2
|
+
export declare const FATHOM_API_KEY_ENV = "FATHOM_API_KEY";
|
|
3
|
+
/** Valid `triggered_for` values (developers.fathom.ai, verified 2026-07-11). */
|
|
4
|
+
export declare const FATHOM_TRIGGERS: readonly ["my_recordings", "shared_external_recordings", "my_shared_with_team_recordings", "shared_team_recordings"];
|
|
5
|
+
/** Payload contents the webhook can include; the API requires at least one. */
|
|
6
|
+
export declare const FATHOM_INCLUDES: readonly ["transcript", "summary", "action_items", "crm_matches"];
|
|
7
|
+
export interface MintFathomWebhookOptions {
|
|
8
|
+
/** HTTPS URL Fathom will POST call payloads to (e.g. an n8n webhook). */
|
|
9
|
+
destinationUrl: string;
|
|
10
|
+
/** Which recordings fire the webhook — see FATHOM_TRIGGERS. */
|
|
11
|
+
triggers: string[];
|
|
12
|
+
/** Payload contents — see FATHOM_INCLUDES. Defaults to ["summary"]. */
|
|
13
|
+
include?: string[];
|
|
14
|
+
/** Defaults to the FATHOM_API_KEY env var (the account key itself is dashboard-only). */
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
/** Injectable for tests; defaults to global fetch. */
|
|
18
|
+
fetchImpl?: typeof fetch;
|
|
19
|
+
}
|
|
20
|
+
export type MintFathomWebhookResult = {
|
|
21
|
+
ok: true;
|
|
22
|
+
webhookId: string;
|
|
23
|
+
destinationUrl: string;
|
|
24
|
+
triggers: string[];
|
|
25
|
+
include: string[];
|
|
26
|
+
/** The whsec_... signing secret — held in memory only, shown once. */
|
|
27
|
+
webhookSecret: string;
|
|
28
|
+
/** Hand-off warning both adapters must surface before the secret. */
|
|
29
|
+
warning: string;
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
error: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Register a Fathom webhook (`POST /external/v1/webhooks`) and return the
|
|
36
|
+
* signing secret Fathom generates at creation time — the only moment it is
|
|
37
|
+
* ever visible. ia never persists it; printing/relaying it once is the
|
|
38
|
+
* caller's job.
|
|
39
|
+
*
|
|
40
|
+
* Assumes a Fathom API key already exists (FATHOM_API_KEY): the account key
|
|
41
|
+
* itself has no creation API — it's minted by a human in the Fathom
|
|
42
|
+
* dashboard (docs/secrets-minting-plan.md).
|
|
43
|
+
*/
|
|
44
|
+
export declare function mintFathomWebhook(options: MintFathomWebhookOptions): Promise<MintFathomWebhookResult>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { MINT_HANDOFF_WARNING } from "./gcp-service-account-key.js";
|
|
2
|
+
export const FATHOM_API_BASE_URL = "https://api.fathom.ai";
|
|
3
|
+
export const FATHOM_API_KEY_ENV = "FATHOM_API_KEY";
|
|
4
|
+
/** Valid `triggered_for` values (developers.fathom.ai, verified 2026-07-11). */
|
|
5
|
+
export const FATHOM_TRIGGERS = [
|
|
6
|
+
"my_recordings",
|
|
7
|
+
"shared_external_recordings",
|
|
8
|
+
"my_shared_with_team_recordings",
|
|
9
|
+
"shared_team_recordings",
|
|
10
|
+
];
|
|
11
|
+
/** Payload contents the webhook can include; the API requires at least one. */
|
|
12
|
+
export const FATHOM_INCLUDES = ["transcript", "summary", "action_items", "crm_matches"];
|
|
13
|
+
/**
|
|
14
|
+
* Register a Fathom webhook (`POST /external/v1/webhooks`) and return the
|
|
15
|
+
* signing secret Fathom generates at creation time — the only moment it is
|
|
16
|
+
* ever visible. ia never persists it; printing/relaying it once is the
|
|
17
|
+
* caller's job.
|
|
18
|
+
*
|
|
19
|
+
* Assumes a Fathom API key already exists (FATHOM_API_KEY): the account key
|
|
20
|
+
* itself has no creation API — it's minted by a human in the Fathom
|
|
21
|
+
* dashboard (docs/secrets-minting-plan.md).
|
|
22
|
+
*/
|
|
23
|
+
export async function mintFathomWebhook(options) {
|
|
24
|
+
const destinationUrl = options.destinationUrl.trim();
|
|
25
|
+
const triggers = options.triggers;
|
|
26
|
+
const include = options.include ?? ["summary"];
|
|
27
|
+
validateInputs(destinationUrl, triggers, include);
|
|
28
|
+
const apiKey = options.apiKey ?? process.env[FATHOM_API_KEY_ENV];
|
|
29
|
+
if (!apiKey) {
|
|
30
|
+
throw new Error([
|
|
31
|
+
`No Fathom API key found — pass apiKey or set ${FATHOM_API_KEY_ENV}.`,
|
|
32
|
+
"Fathom API keys cannot be minted programmatically; generate one in the",
|
|
33
|
+
"Fathom dashboard (Settings → API Access) and export it:",
|
|
34
|
+
` export ${FATHOM_API_KEY_ENV}="<your key>"`,
|
|
35
|
+
].join("\n"));
|
|
36
|
+
}
|
|
37
|
+
const base = (options.baseUrl ?? FATHOM_API_BASE_URL).replace(/\/+$/, "");
|
|
38
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
39
|
+
const endpoint = `${base}/external/v1/webhooks`;
|
|
40
|
+
let res;
|
|
41
|
+
try {
|
|
42
|
+
res = await fetchImpl(endpoint, {
|
|
43
|
+
method: "POST",
|
|
44
|
+
headers: { "X-Api-Key": apiKey, "content-type": "application/json" },
|
|
45
|
+
body: JSON.stringify({
|
|
46
|
+
destination_url: destinationUrl,
|
|
47
|
+
triggered_for: triggers,
|
|
48
|
+
include_transcript: include.includes("transcript"),
|
|
49
|
+
include_summary: include.includes("summary"),
|
|
50
|
+
include_action_items: include.includes("action_items"),
|
|
51
|
+
include_crm_matches: include.includes("crm_matches"),
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
57
|
+
return { ok: false, error: `POST ${endpoint} failed: ${detail}` };
|
|
58
|
+
}
|
|
59
|
+
if (res.status === 401 || res.status === 403) {
|
|
60
|
+
return {
|
|
61
|
+
ok: false,
|
|
62
|
+
error: `Fathom rejected the API key (HTTP ${res.status}) — check that ${FATHOM_API_KEY_ENV} is a current key from the Fathom dashboard (Settings → API Access).`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (!res.ok) {
|
|
66
|
+
// Failed creations return error JSON, never a secret — safe to echo.
|
|
67
|
+
const body = (await res.text()).slice(0, 300);
|
|
68
|
+
return { ok: false, error: `Fathom webhook creation failed (HTTP ${res.status}): ${body}` };
|
|
69
|
+
}
|
|
70
|
+
// 2xx bodies contain the secret — never echo them into error messages.
|
|
71
|
+
let data;
|
|
72
|
+
try {
|
|
73
|
+
data = await res.json();
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return { ok: false, error: "Fathom returned a 2xx response that was not JSON — unexpected." };
|
|
77
|
+
}
|
|
78
|
+
const webhook = data;
|
|
79
|
+
if (typeof webhook.id !== "string" || typeof webhook.secret !== "string" || !webhook.secret) {
|
|
80
|
+
return {
|
|
81
|
+
ok: false,
|
|
82
|
+
error: "Fathom returned an unexpected response shape (no id/secret field) — the webhook may " +
|
|
83
|
+
"still have been created; check the Fathom dashboard before retrying.",
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
ok: true,
|
|
88
|
+
webhookId: webhook.id,
|
|
89
|
+
destinationUrl,
|
|
90
|
+
triggers,
|
|
91
|
+
include,
|
|
92
|
+
webhookSecret: webhook.secret,
|
|
93
|
+
warning: MINT_HANDOFF_WARNING,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function validateInputs(destinationUrl, triggers, include) {
|
|
97
|
+
let parsed;
|
|
98
|
+
try {
|
|
99
|
+
parsed = new URL(destinationUrl);
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
// handled below
|
|
103
|
+
}
|
|
104
|
+
if (parsed?.protocol !== "https:") {
|
|
105
|
+
throw new Error(`invalid destination URL "${destinationUrl}" — pass the full https:// URL Fathom should POST to (webhook payloads are signed secrets-adjacent traffic; plain http is not supported)`);
|
|
106
|
+
}
|
|
107
|
+
if (triggers.length === 0) {
|
|
108
|
+
throw new Error(`pass at least one trigger — valid values: ${FATHOM_TRIGGERS.join(", ")}`);
|
|
109
|
+
}
|
|
110
|
+
for (const trigger of triggers) {
|
|
111
|
+
if (!FATHOM_TRIGGERS.includes(trigger)) {
|
|
112
|
+
throw new Error(`unknown trigger "${trigger}" — valid values: ${FATHOM_TRIGGERS.join(", ")}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (include.length === 0) {
|
|
116
|
+
throw new Error(`pass at least one include value (the Fathom API requires it) — valid values: ${FATHOM_INCLUDES.join(", ")}`);
|
|
117
|
+
}
|
|
118
|
+
for (const item of include) {
|
|
119
|
+
if (!FATHOM_INCLUDES.includes(item)) {
|
|
120
|
+
throw new Error(`unknown include value "${item}" — valid values: ${FATHOM_INCLUDES.join(", ")}`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Directories never copied out of a source tree (build output, VCS state). */
|
|
2
|
+
export declare const COPY_SKIP_DIRS: Set<string>;
|
|
3
|
+
/**
|
|
4
|
+
* Files safe to read as UTF-8 for token substitution. Mirrors the text-file
|
|
5
|
+
* list in client-template's ci/repo-lint.mjs.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TEXT_FILE: RegExp;
|
|
8
|
+
/** Recursively list files under `dir` as relative POSIX paths. */
|
|
9
|
+
export declare function listFiles(dir: string, prefix?: string): Promise<string[]>;
|
package/dist/fs-utils.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
/** Directories never copied out of a source tree (build output, VCS state). */
|
|
4
|
+
export const COPY_SKIP_DIRS = new Set([
|
|
5
|
+
".git",
|
|
6
|
+
"node_modules",
|
|
7
|
+
".pnpm-store",
|
|
8
|
+
".next",
|
|
9
|
+
"dist",
|
|
10
|
+
"build",
|
|
11
|
+
"out",
|
|
12
|
+
"coverage",
|
|
13
|
+
]);
|
|
14
|
+
const SKIP_FILES = new Set([".DS_Store"]);
|
|
15
|
+
/**
|
|
16
|
+
* Files safe to read as UTF-8 for token substitution. Mirrors the text-file
|
|
17
|
+
* list in client-template's ci/repo-lint.mjs.
|
|
18
|
+
*/
|
|
19
|
+
export const TEXT_FILE = /\.(md|json|txt|yml|yaml|js|mjs|cjs|ts|tsx|html|css|excalidraw)$/i;
|
|
20
|
+
/** Recursively list files under `dir` as relative POSIX paths. */
|
|
21
|
+
export async function listFiles(dir, prefix = "") {
|
|
22
|
+
const out = [];
|
|
23
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
if (COPY_SKIP_DIRS.has(entry.name))
|
|
26
|
+
continue;
|
|
27
|
+
out.push(...(await listFiles(join(dir, entry.name), `${prefix}${entry.name}/`)));
|
|
28
|
+
}
|
|
29
|
+
else if (entry.isFile() && !SKIP_FILES.has(entry.name)) {
|
|
30
|
+
out.push(`${prefix}${entry.name}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ExecFileFn } from "./exec.js";
|
|
2
|
+
export type { ExecFileFn } from "./exec.js";
|
|
3
|
+
/** GCP project IDs: lowercase letters, digits, hyphens; never flag-shaped. */
|
|
4
|
+
export declare const GCP_PROJECT_PATTERN: RegExp;
|
|
5
|
+
export interface MintGcpServiceAccountKeyOptions {
|
|
6
|
+
/** GCP project ID the service account lives in. */
|
|
7
|
+
project: string;
|
|
8
|
+
/** Existing service-account email, e.g. `<name>@<project>.iam.gserviceaccount.com`. */
|
|
9
|
+
serviceAccountEmail: string;
|
|
10
|
+
/** Injectable for tests; defaults to real `execFile("gcloud", ...)`. */
|
|
11
|
+
execFileImpl?: ExecFileFn;
|
|
12
|
+
}
|
|
13
|
+
export type MintGcpServiceAccountKeyResult = {
|
|
14
|
+
ok: true;
|
|
15
|
+
project: string;
|
|
16
|
+
serviceAccountEmail: string;
|
|
17
|
+
/** The full service-account key JSON — held in memory only, shown once. */
|
|
18
|
+
keyJson: string;
|
|
19
|
+
/** Hand-off warning both adapters must surface before the secret. */
|
|
20
|
+
warning: string;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const MINT_HANDOFF_WARNING = "This key is shown once and not stored anywhere by ia \u2014 save it to the client's 1Password vault now.";
|
|
26
|
+
/**
|
|
27
|
+
* Mint a JSON key for an EXISTING GCP service account by wrapping
|
|
28
|
+
* `gcloud iam service-accounts keys create`. gcloud insists on writing the
|
|
29
|
+
* key to a file, so this writes to a private temp dir, reads it back, and
|
|
30
|
+
* deletes it before returning — no key file is left on disk.
|
|
31
|
+
*
|
|
32
|
+
* Deliberate boundaries (docs/secrets-minting-plan.md):
|
|
33
|
+
* - never creates the service account — the IAM principal must pre-exist;
|
|
34
|
+
* - never manages GCP auth — the operator's own `gcloud auth login` is used;
|
|
35
|
+
* - never persists the secret — printing/relaying it once is the caller's job.
|
|
36
|
+
*/
|
|
37
|
+
export declare function mintGcpServiceAccountKey(options: MintGcpServiceAccountKeyOptions): Promise<MintGcpServiceAccountKeyResult>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { execFailureDetail, execFileAsync } from "./exec.js";
|
|
5
|
+
/** GCP project IDs: lowercase letters, digits, hyphens; never flag-shaped. */
|
|
6
|
+
export const GCP_PROJECT_PATTERN = /^[a-z][a-z0-9-]*[a-z0-9]$/;
|
|
7
|
+
/** Every GCP service-account email ends here — human accounts never do. */
|
|
8
|
+
const SA_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.gserviceaccount\.com$/;
|
|
9
|
+
export const MINT_HANDOFF_WARNING = "This key is shown once and not stored anywhere by ia — save it to the client's 1Password vault now.";
|
|
10
|
+
/**
|
|
11
|
+
* Mint a JSON key for an EXISTING GCP service account by wrapping
|
|
12
|
+
* `gcloud iam service-accounts keys create`. gcloud insists on writing the
|
|
13
|
+
* key to a file, so this writes to a private temp dir, reads it back, and
|
|
14
|
+
* deletes it before returning — no key file is left on disk.
|
|
15
|
+
*
|
|
16
|
+
* Deliberate boundaries (docs/secrets-minting-plan.md):
|
|
17
|
+
* - never creates the service account — the IAM principal must pre-exist;
|
|
18
|
+
* - never manages GCP auth — the operator's own `gcloud auth login` is used;
|
|
19
|
+
* - never persists the secret — printing/relaying it once is the caller's job.
|
|
20
|
+
*/
|
|
21
|
+
export async function mintGcpServiceAccountKey(options) {
|
|
22
|
+
const project = options.project.trim();
|
|
23
|
+
const serviceAccountEmail = options.serviceAccountEmail.trim();
|
|
24
|
+
if (!GCP_PROJECT_PATTERN.test(project)) {
|
|
25
|
+
throw new Error(`invalid GCP project "${project}" — pass the project ID (lowercase letters, digits, hyphens; e.g. "acme-hvac-prod")`);
|
|
26
|
+
}
|
|
27
|
+
if (!SA_EMAIL_PATTERN.test(serviceAccountEmail)) {
|
|
28
|
+
throw new Error(`"${serviceAccountEmail}" is not a service-account email — expected <name>@<project>.iam.gserviceaccount.com (ia mints keys for service accounts, not user accounts)`);
|
|
29
|
+
}
|
|
30
|
+
const execFileImpl = options.execFileImpl ?? execFileAsync;
|
|
31
|
+
const tempDir = await mkdtemp(join(tmpdir(), "ia-gcp-key-"));
|
|
32
|
+
const keyPath = join(tempDir, "key.json");
|
|
33
|
+
try {
|
|
34
|
+
await execFileImpl("gcloud", [
|
|
35
|
+
"iam",
|
|
36
|
+
"service-accounts",
|
|
37
|
+
"keys",
|
|
38
|
+
"create",
|
|
39
|
+
keyPath,
|
|
40
|
+
`--iam-account=${serviceAccountEmail}`,
|
|
41
|
+
`--project=${project}`,
|
|
42
|
+
"--quiet",
|
|
43
|
+
]);
|
|
44
|
+
const keyJson = await readFile(keyPath, "utf8");
|
|
45
|
+
return { ok: true, project, serviceAccountEmail, keyJson, warning: MINT_HANDOFF_WARNING };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
return { ok: false, error: describeGcloudFailure(error, project, serviceAccountEmail) };
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function describeGcloudFailure(error, project, email) {
|
|
55
|
+
const { code, detail } = execFailureDetail(error);
|
|
56
|
+
if (code === "ENOENT") {
|
|
57
|
+
return "gcloud CLI not found — install the Google Cloud SDK (https://cloud.google.com/sdk) and run `gcloud auth login`, then retry.";
|
|
58
|
+
}
|
|
59
|
+
if (/NOT_FOUND|does not exist/i.test(detail)) {
|
|
60
|
+
return `service account ${email} was not found in project ${project} — ia never creates IAM principals, so the account must already exist. Create it first (Console → IAM → Service Accounts, or \`gcloud iam service-accounts create\`), then retry. gcloud said: ${detail}`;
|
|
61
|
+
}
|
|
62
|
+
if (/PERMISSION_DENIED|UNAUTHENTICATED|reauthentication|do not currently have an active account|credentials/i.test(detail)) {
|
|
63
|
+
return `gcloud was not authorized for this operation — run \`gcloud auth login\` with an account that has iam.serviceAccountKeys.create on ${project}. gcloud said: ${detail}`;
|
|
64
|
+
}
|
|
65
|
+
return `gcloud iam service-accounts keys create failed: ${detail}`;
|
|
66
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ExecFileFn } from "./exec.js";
|
|
2
|
+
/**
|
|
3
|
+
* A Gemini (AI Studio) API key is a plain GCP API key under the hood — AI
|
|
4
|
+
* Studio just creates one in a Google Cloud project for you. Minting one
|
|
5
|
+
* ourselves means creating an API key restricted to this service
|
|
6
|
+
* (docs.cloud.google.com/api-keys, verified 2026-07-11).
|
|
7
|
+
*/
|
|
8
|
+
export declare const GEMINI_API_TARGET = "generativelanguage.googleapis.com";
|
|
9
|
+
export declare const DEFAULT_GEMINI_KEY_DISPLAY_NAME = "ia-minted Gemini API key";
|
|
10
|
+
export interface MintGeminiApiKeyOptions {
|
|
11
|
+
/** GCP project ID the key is created in (the project pays for Gemini usage). */
|
|
12
|
+
project: string;
|
|
13
|
+
/** Human label shown in the Cloud Console key list. */
|
|
14
|
+
displayName?: string;
|
|
15
|
+
/** Injectable for tests; defaults to real `execFile("gcloud", ...)`. */
|
|
16
|
+
execFileImpl?: ExecFileFn;
|
|
17
|
+
}
|
|
18
|
+
export type MintGeminiApiKeyResult = {
|
|
19
|
+
ok: true;
|
|
20
|
+
project: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
/** Full key resource name (projects/.../keys/...) — for later rotation/deletion. */
|
|
23
|
+
keyName: string;
|
|
24
|
+
/** The API the key is locked to (Gemini / Generative Language only). */
|
|
25
|
+
restrictedTo: string;
|
|
26
|
+
/** The AIza... key string — held in memory only, shown once. */
|
|
27
|
+
keyString: string;
|
|
28
|
+
/** Hand-off warning both adapters must surface before the secret. */
|
|
29
|
+
warning: string;
|
|
30
|
+
nextSteps: string[];
|
|
31
|
+
} | {
|
|
32
|
+
ok: false;
|
|
33
|
+
error: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Mint a Gemini API key by wrapping `gcloud services api-keys create`,
|
|
37
|
+
* restricted via `--api-target` so the key can only call the Generative
|
|
38
|
+
* Language (Gemini) API — equivalent to what AI Studio hands out, but
|
|
39
|
+
* created in the client's own project and least-privilege by default.
|
|
40
|
+
*
|
|
41
|
+
* Deliberate boundaries (docs/secrets-minting-plan.md):
|
|
42
|
+
* - never creates or configures the project — it must pre-exist, and ia does
|
|
43
|
+
* not enable services on it (a nextSteps entry says how, if needed);
|
|
44
|
+
* - never manages GCP auth — the operator's own `gcloud auth login` is used;
|
|
45
|
+
* - never persists the secret — printing/relaying it once is the caller's job.
|
|
46
|
+
*/
|
|
47
|
+
export declare function mintGeminiApiKey(options: MintGeminiApiKeyOptions): Promise<MintGeminiApiKeyResult>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { execFailureDetail, execFileAsync } from "./exec.js";
|
|
2
|
+
import { GCP_PROJECT_PATTERN, MINT_HANDOFF_WARNING } from "./gcp-service-account-key.js";
|
|
3
|
+
/**
|
|
4
|
+
* A Gemini (AI Studio) API key is a plain GCP API key under the hood — AI
|
|
5
|
+
* Studio just creates one in a Google Cloud project for you. Minting one
|
|
6
|
+
* ourselves means creating an API key restricted to this service
|
|
7
|
+
* (docs.cloud.google.com/api-keys, verified 2026-07-11).
|
|
8
|
+
*/
|
|
9
|
+
export const GEMINI_API_TARGET = "generativelanguage.googleapis.com";
|
|
10
|
+
export const DEFAULT_GEMINI_KEY_DISPLAY_NAME = "ia-minted Gemini API key";
|
|
11
|
+
/** Display names reach gcloud as a flag value — never flag-shaped, keep them tame. */
|
|
12
|
+
const DISPLAY_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$/;
|
|
13
|
+
/**
|
|
14
|
+
* Mint a Gemini API key by wrapping `gcloud services api-keys create`,
|
|
15
|
+
* restricted via `--api-target` so the key can only call the Generative
|
|
16
|
+
* Language (Gemini) API — equivalent to what AI Studio hands out, but
|
|
17
|
+
* created in the client's own project and least-privilege by default.
|
|
18
|
+
*
|
|
19
|
+
* Deliberate boundaries (docs/secrets-minting-plan.md):
|
|
20
|
+
* - never creates or configures the project — it must pre-exist, and ia does
|
|
21
|
+
* not enable services on it (a nextSteps entry says how, if needed);
|
|
22
|
+
* - never manages GCP auth — the operator's own `gcloud auth login` is used;
|
|
23
|
+
* - never persists the secret — printing/relaying it once is the caller's job.
|
|
24
|
+
*/
|
|
25
|
+
export async function mintGeminiApiKey(options) {
|
|
26
|
+
const project = options.project.trim();
|
|
27
|
+
const displayName = (options.displayName ?? DEFAULT_GEMINI_KEY_DISPLAY_NAME).trim();
|
|
28
|
+
if (!GCP_PROJECT_PATTERN.test(project)) {
|
|
29
|
+
throw new Error(`invalid GCP project "${project}" — pass the project ID (lowercase letters, digits, hyphens; e.g. "acme-hvac-prod")`);
|
|
30
|
+
}
|
|
31
|
+
if (!DISPLAY_NAME_PATTERN.test(displayName)) {
|
|
32
|
+
throw new Error(`invalid display name "${displayName}" — use letters, digits, spaces, dots, hyphens, underscores (must not start with "-")`);
|
|
33
|
+
}
|
|
34
|
+
const execFileImpl = options.execFileImpl ?? execFileAsync;
|
|
35
|
+
let createStdout;
|
|
36
|
+
try {
|
|
37
|
+
const { stdout } = await execFileImpl("gcloud", [
|
|
38
|
+
"services",
|
|
39
|
+
"api-keys",
|
|
40
|
+
"create",
|
|
41
|
+
`--project=${project}`,
|
|
42
|
+
`--display-name=${displayName}`,
|
|
43
|
+
`--api-target=service=${GEMINI_API_TARGET}`,
|
|
44
|
+
"--format=json",
|
|
45
|
+
"--quiet",
|
|
46
|
+
]);
|
|
47
|
+
createStdout = stdout;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return { ok: false, error: describeGcloudFailure(error, project) };
|
|
51
|
+
}
|
|
52
|
+
// The create output is the completed operation; the key lives under
|
|
53
|
+
// `response`. NEVER echo this stdout into errors — it contains keyString.
|
|
54
|
+
const created = parseKey(createStdout);
|
|
55
|
+
if (!created.keyName) {
|
|
56
|
+
return {
|
|
57
|
+
ok: false,
|
|
58
|
+
error: "gcloud services api-keys create returned an unexpected shape — the key may still have " +
|
|
59
|
+
`been created; inspect with \`gcloud services api-keys list --project=${project}\` ` +
|
|
60
|
+
"and delete any stray key before retrying.",
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
let keyString = created.keyString;
|
|
64
|
+
if (!keyString) {
|
|
65
|
+
// Older gcloud versions omit keyString from the operation — fetch it.
|
|
66
|
+
try {
|
|
67
|
+
const { stdout } = await execFileImpl("gcloud", [
|
|
68
|
+
"services",
|
|
69
|
+
"api-keys",
|
|
70
|
+
"get-key-string",
|
|
71
|
+
created.keyName,
|
|
72
|
+
"--format=json",
|
|
73
|
+
"--quiet",
|
|
74
|
+
]);
|
|
75
|
+
keyString = parseKey(stdout).keyString;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
return { ok: false, error: describeGcloudFailure(error, project) };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (!keyString) {
|
|
82
|
+
return {
|
|
83
|
+
ok: false,
|
|
84
|
+
error: `the key was created (${created.keyName}) but gcloud would not return its key string — ` +
|
|
85
|
+
`retrieve it with \`gcloud services api-keys get-key-string ${created.keyName}\`, or ` +
|
|
86
|
+
"delete the key and retry.",
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
ok: true,
|
|
91
|
+
project,
|
|
92
|
+
displayName,
|
|
93
|
+
keyName: created.keyName,
|
|
94
|
+
restrictedTo: GEMINI_API_TARGET,
|
|
95
|
+
keyString,
|
|
96
|
+
warning: MINT_HANDOFF_WARNING,
|
|
97
|
+
nextSteps: [
|
|
98
|
+
`If Gemini calls return 403 SERVICE_DISABLED, enable the API once per project: gcloud services enable ${GEMINI_API_TARGET} --project=${project}`,
|
|
99
|
+
`Rotate/revoke later with: gcloud services api-keys delete ${created.keyName}`,
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Extract key name/string from create or get-key-string JSON, tolerating both shapes. */
|
|
104
|
+
function parseKey(stdout) {
|
|
105
|
+
let data;
|
|
106
|
+
try {
|
|
107
|
+
data = JSON.parse(stdout);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return {};
|
|
111
|
+
}
|
|
112
|
+
if (typeof data !== "object" || data === null)
|
|
113
|
+
return {};
|
|
114
|
+
const outer = data;
|
|
115
|
+
const key = (typeof outer.response === "object" && outer.response !== null ? outer.response : outer);
|
|
116
|
+
const name = typeof key.name === "string" && key.name.includes("/keys/") ? key.name : undefined;
|
|
117
|
+
const keyString = typeof key.keyString === "string" && key.keyString ? key.keyString : undefined;
|
|
118
|
+
return { keyName: name, keyString };
|
|
119
|
+
}
|
|
120
|
+
function describeGcloudFailure(error, project) {
|
|
121
|
+
const { code, detail } = execFailureDetail(error);
|
|
122
|
+
if (code === "ENOENT") {
|
|
123
|
+
return "gcloud CLI not found — install the Google Cloud SDK (https://cloud.google.com/sdk) and run `gcloud auth login`, then retry.";
|
|
124
|
+
}
|
|
125
|
+
if (/NOT_FOUND|does not exist|not found/i.test(detail)) {
|
|
126
|
+
return `project ${project} was not found (or you can't see it) — ia never creates GCP projects, so it must already exist. gcloud said: ${detail}`;
|
|
127
|
+
}
|
|
128
|
+
if (/PERMISSION_DENIED|UNAUTHENTICATED|reauthentication|do not currently have an active account|credentials/i.test(detail)) {
|
|
129
|
+
return `gcloud was not authorized for this operation — run \`gcloud auth login\` with an account that has apikeys.keys.create on ${project} (e.g. roles/serviceusage.apiKeysAdmin). gcloud said: ${detail}`;
|
|
130
|
+
}
|
|
131
|
+
return `gcloud services api-keys create failed: ${detail}`;
|
|
132
|
+
}
|
package/dist/git.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CloneOptions {
|
|
2
|
+
depth?: number;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Injectable clone function — operations take a `clone` option so tests can
|
|
6
|
+
* substitute a fake (or clone from a local fixture path instead of GitHub).
|
|
7
|
+
*/
|
|
8
|
+
export type CloneFn = (url: string, dest: string, options?: CloneOptions) => Promise<void>;
|
|
9
|
+
export declare const gitClone: CloneFn;
|
|
10
|
+
/**
|
|
11
|
+
* Injectable pull function — fast-forward only, so a repo with local commits
|
|
12
|
+
* or uncommitted work fails loudly instead of being merged or clobbered.
|
|
13
|
+
*/
|
|
14
|
+
export type PullFn = (dir: string) => Promise<void>;
|
|
15
|
+
export declare const gitPullFfOnly: PullFn;
|
|
16
|
+
export declare function gitInit(dir: string): Promise<void>;
|
package/dist/git.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
const execFileAsync = promisify(execFile);
|
|
4
|
+
export const gitClone = async (url, dest, options) => {
|
|
5
|
+
const args = ["clone"];
|
|
6
|
+
if (options?.depth) {
|
|
7
|
+
args.push("--depth", String(options.depth));
|
|
8
|
+
}
|
|
9
|
+
args.push("--", url, dest);
|
|
10
|
+
try {
|
|
11
|
+
await execFileAsync("git", args);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
15
|
+
throw new Error(`git clone failed for ${url}: ${detail}`);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export const gitPullFfOnly = async (dir) => {
|
|
19
|
+
try {
|
|
20
|
+
await execFileAsync("git", ["pull", "--ff-only"], { cwd: dir });
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
24
|
+
throw new Error(`git pull --ff-only failed in ${dir}: ${detail}`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export async function gitInit(dir) {
|
|
28
|
+
await execFileAsync("git", ["init"], { cwd: dir });
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ExecFileFn } from "./exec.js";
|
|
2
|
+
export declare const GITHUB_API_TOKEN_ENV = "GITHUB_API_TOKEN";
|
|
3
|
+
/** The one next step for GitHub auth errors, shared by every caller. */
|
|
4
|
+
export declare const GITHUB_TOKEN_FIX: string;
|
|
5
|
+
export interface ResolveGithubTokenOptions {
|
|
6
|
+
/** Explicit token — always wins. */
|
|
7
|
+
token?: string;
|
|
8
|
+
/** Environment to consult; defaults to process.env. */
|
|
9
|
+
env?: Record<string, string | undefined>;
|
|
10
|
+
/** Injectable for tests; defaults to real `gh auth token`. */
|
|
11
|
+
execFileImpl?: ExecFileFn;
|
|
12
|
+
}
|
|
13
|
+
export interface ResolvedGithubToken {
|
|
14
|
+
token: string;
|
|
15
|
+
source: "option" | "env" | "gh-cli";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* GitHub token resolution for every SDK operation that calls api.github.com:
|
|
19
|
+
* explicit option → $GITHUB_API_TOKEN → the gh CLI's OAuth token
|
|
20
|
+
* (`gh auth token`). Returns null instead of throwing when nothing is
|
|
21
|
+
* available (gh not installed, not logged in) — callers raise their own
|
|
22
|
+
* typed auth errors with GITHUB_TOKEN_FIX as the remedy.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveGithubToken(options?: ResolveGithubTokenOptions): Promise<ResolvedGithubToken | null>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { execFileAsync } from "./exec.js";
|
|
2
|
+
export const GITHUB_API_TOKEN_ENV = "GITHUB_API_TOKEN";
|
|
3
|
+
/** The one next step for GitHub auth errors, shared by every caller. */
|
|
4
|
+
export const GITHUB_TOKEN_FIX = "run `gh auth login` (one-time GitHub OAuth — no PAT, no org-approval wait) " +
|
|
5
|
+
`or set ${GITHUB_API_TOKEN_ENV} to override`;
|
|
6
|
+
/**
|
|
7
|
+
* GitHub token resolution for every SDK operation that calls api.github.com:
|
|
8
|
+
* explicit option → $GITHUB_API_TOKEN → the gh CLI's OAuth token
|
|
9
|
+
* (`gh auth token`). Returns null instead of throwing when nothing is
|
|
10
|
+
* available (gh not installed, not logged in) — callers raise their own
|
|
11
|
+
* typed auth errors with GITHUB_TOKEN_FIX as the remedy.
|
|
12
|
+
*/
|
|
13
|
+
export async function resolveGithubToken(options = {}) {
|
|
14
|
+
if (options.token)
|
|
15
|
+
return { token: options.token, source: "option" };
|
|
16
|
+
const env = options.env ?? process.env;
|
|
17
|
+
const fromEnv = env[GITHUB_API_TOKEN_ENV];
|
|
18
|
+
if (fromEnv)
|
|
19
|
+
return { token: fromEnv, source: "env" };
|
|
20
|
+
const execFileImpl = options.execFileImpl ?? execFileAsync;
|
|
21
|
+
try {
|
|
22
|
+
const { stdout } = await execFileImpl("gh", ["auth", "token"]);
|
|
23
|
+
const token = stdout.trim();
|
|
24
|
+
return token.length > 0 ? { token, source: "gh-cli" } : null;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// gh missing (ENOENT) or not logged in (non-zero exit) — nothing to use.
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { type AgentBankOptions, type AgentTemplateInfo, type CreateFromTemplateInput, type CreateFromTemplateResult, createFromAgentTemplate, type ListAgentTemplatesResult, listAgentTemplates, N8N_API_KEY_ENV, N8N_API_URL_ENV, N8nAuthError, type SanitizedWorkflow, type SaveAgentTemplateInput, type SaveAgentTemplateOptions, type SaveAgentTemplateResult, type StrippedCredential, sanitizeN8nWorkflow, saveAgentTemplate, } from "./agent-templates.js";
|
|
2
|
+
export { ClientBuildAuthError, type ClientBuildDoc, type ClientBuildOptions, type ClientBuildResult, clientBuild, GITHUB_API_TOKEN_ENV, } from "./client-build.js";
|
|
3
|
+
export { type ClientCall, type ClientContextOptions, type ClientContextResult, clientContext, } from "./client-context.js";
|
|
4
|
+
export { AIRTABLE_API_TOKEN_ENV, buildAssertionClaims, ClientDriveAuthError, type ClientDriveDoc, type ClientDriveSearchOptions, type ClientDriveSearchResult, clientDriveSearch, GOOGLE_SERVICE_ACCOUNT_KEY_ENV, parseServiceAccountKey, } from "./client-drive.js";
|
|
5
|
+
export { ClientIntakeAuthError, type ClientIntakeInput, type ClientIntakeOptions, type ClientIntakeResult, type ClientIntakeStep, clientIntake, LINEAR_CLIENT_TEAM_ID_ENV, } from "./client-intake.js";
|
|
6
|
+
export { ClientLinearAuthError, type ClientLinearProjectOptions, clientLinearProject, } from "./client-linear.js";
|
|
7
|
+
export { DOCS_SESSION_ENV, type DocsSearchOptions, type DocsSearchResponse, type DocsSearchResult, DocsSessionError, docsSearch, TEAM_DOCS_BASE_URL, } from "./docs-search.js";
|
|
8
|
+
export { type DoctorCheck, type DoctorOptions, type DoctorResult, type DoctorStatus, doctor, } from "./doctor.js";
|
|
9
|
+
export { findWorkspaceRoot, type LoadWorkspaceEnvOptions, type LoadWorkspaceEnvResult, loadWorkspaceEnv, parseEnvFile, } from "./env-file.js";
|
|
10
|
+
export { type EnvFillOptions, type EnvFillResult, type EnvFillVarResult, type EnvFillVarStatus, envFill, } from "./env-fill.js";
|
|
11
|
+
export { type EnvPushOptions, type EnvPushResult, type EnvPushVarResult, type EnvPushVarStatus, envPush, } from "./env-push.js";
|
|
12
|
+
export { DEFAULT_TECH_VAULT, ENV_VARS, type EnvVarSource, type EnvVarSpec, type EnvVarTier, INFRA_VAULT, opSecretReference, renderEnvExample, } from "./env-registry.js";
|
|
13
|
+
export { FATHOM_API_BASE_URL, FATHOM_API_KEY_ENV, FATHOM_INCLUDES, FATHOM_TRIGGERS, type MintFathomWebhookOptions, type MintFathomWebhookResult, mintFathomWebhook, } from "./fathom-webhook.js";
|
|
14
|
+
export { type ExecFileFn, MINT_HANDOFF_WARNING, type MintGcpServiceAccountKeyOptions, type MintGcpServiceAccountKeyResult, mintGcpServiceAccountKey, } from "./gcp-service-account-key.js";
|
|
15
|
+
export { DEFAULT_GEMINI_KEY_DISPLAY_NAME, GEMINI_API_TARGET, type MintGeminiApiKeyOptions, type MintGeminiApiKeyResult, mintGeminiApiKey, } from "./gemini-api-key.js";
|
|
16
|
+
export { type CloneFn, type CloneOptions, gitClone, gitPullFfOnly, type PullFn } from "./git.js";
|
|
17
|
+
export { GITHUB_TOKEN_FIX, type ResolvedGithubToken, type ResolveGithubTokenOptions, resolveGithubToken, } from "./github-token.js";
|
|
18
|
+
export { CLIENT_TEMPLATE_URL, type InitStep, type InitWorkspaceOptions, type InitWorkspaceResult, initWorkspace, MCP_RECOMMENDATIONS, type McpRecommendation, TEAM_CLIENTS_URL, } from "./init.js";
|
|
19
|
+
export { findProjectBySlugId, LINEAR_API_TOKEN_ENV, LinearAuthError, type LinearIssue, LinearProjectNotFoundError, type LinearProjectOptions, type LinearProjectResult, linearProject, linearProjectIssues, type ProjectNode, } from "./linear-project.js";
|
|
20
|
+
export { type NewClientOptions, type NewClientResult, newClient, SLUG_PATTERN, } from "./new-client.js";
|
|
21
|
+
export { type PingResult, ping } from "./ping.js";
|
|
22
|
+
export { DEFAULT_PORTAL_URL, PORTAL_ADMIN_SECRET_ENV, PORTAL_PASSWORD_WARNING, PORTAL_SYNC_MAX_DAYS, PORTAL_URL_ENV, type PortalAddUserInput, type PortalAddUserResult, PortalAdminAuthError, type PortalAdminOptions, type PortalAgent, type PortalAgentSyncRow, type PortalCreateAgentInput, type PortalCreateOrgInput, type PortalCreateOrgResult, type PortalListAgentsResult, type PortalListOrgsResult, type PortalOrg, type PortalOrgUser, type PortalSetAgentStatusInput, type PortalSetAgentStatusResult, type PortalSetDriveFolderResult, type PortalSetPasswordResult, type PortalSyncRunsResult, portalAddUser, portalCreateAgent, portalCreateOrg, portalListAgents, portalListOrgs, portalSetAgentStatus, portalSetDriveFolder, portalSetPassword, portalSyncRuns, } from "./portal-admin.js";
|
|
23
|
+
export { type SyncTemplatesFileResult, type SyncTemplatesFileStatus, type SyncTemplatesOptions, type SyncTemplatesResult, syncTemplates, TEMPLATE_CLAUDE_SETTINGS, TEMPLATE_ROOT_DOCS, } from "./sync-templates.js";
|
|
24
|
+
export { TEMPLATE_SYNCED_FILES, type TemplateSyncFileResult, type TemplateSyncFileStatus, type TemplateSyncOptions, type TemplateSyncRepoResult, type TemplateSyncResult, templateSync, } from "./template-sync.js";
|
|
25
|
+
export { WIZARD_REPO_NAMES, type WizardStep, type WizardWorkspaceOptions, type WizardWorkspaceResult, wizardWorkspace, } from "./wizard.js";
|