@installagent/sdk 0.13.0 → 0.14.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/index.d.ts CHANGED
@@ -31,7 +31,7 @@ export { type HoursExportScheduleOptions, type HoursExportScheduleResult, instal
31
31
  export { buildHoursLedger, CLIENT_FIELDS, DEFAULT_HOURS_LEDGER_DIR, type HoursLedgerConfig, type HoursLedgerData, type HoursLedgerIngest, type HoursLedgerOptions, type HoursLedgerPersonTotal, type HoursLedgerResult, type HoursLedgerRow, identityMatches, LEDGER_WINDOW_START, OTHER_LEAD_SLUG, TEAM_FIELDS, } from "./hours-ledger.js";
32
32
  export { CLIENT_TEMPLATE_URL, type InitStep, type InitWorkspaceOptions, type InitWorkspaceResult, initWorkspace, MCP_RECOMMENDATIONS, type McpRecommendation, TEAM_CLIENTS_URL, } from "./init.js";
33
33
  export { type HookInstallFn, type InstallClientHooksResult, installClientHooks, unhookedClientRepos, } from "./lefthook-hooks.js";
34
- export { findProjectBySlugId, LINEAR_API_TOKEN_ENV, LinearAuthError, type LinearIssue, LinearProjectNotFoundError, type LinearProjectOptions, type LinearProjectResult, linearProject, linearProjectIssues, linearRequest, type ProjectNode, } from "./linear-project.js";
34
+ export { CLIENT_LINE_MAX, clientLineOf, findProjectBySlugId, LINEAR_API_TOKEN_ENV, LinearAuthError, type LinearIssue, LinearProjectNotFoundError, type LinearProjectOptions, type LinearProjectResult, linearProject, linearProjectIssues, linearRequest, type ProjectNode, } from "./linear-project.js";
35
35
  export { type CreateLoggerOptions, createLogger, type LogFields, type Logger, type LogLevel, redactFields, } from "./log.js";
36
36
  export { applyClientDefaults, clientWorkflowName, DEFAULT_EXECUTION_TIMEOUT_S, DEFAULT_GET_RETRY, DEFAULT_WORKFLOW_SETTINGS, ERROR_WORKFLOW_PLACEHOLDER, IA_ERROR_WORKFLOW_ID, type LintFileResult, type LintFinding, type LintOptions, lintN8nWorkflow, lintWorkflowFiles, WORKFLOW_NAME_PATTERN, } from "./n8n-defaults.js";
37
37
  export { type ExtractNodeOutputsOptions, extractNodeOutputs, listN8nExecutions, listNodesRun, type N8nExecutionDetail, type N8nExecutionStatus, type N8nExecutionSummary, type N8nExecutionsInput, type N8nExecutionsOptions, type N8nExecutionsResult, type N8nNodeOutput, unflattenExecutionData, } from "./n8n-executions.js";
@@ -43,7 +43,7 @@ export { detectPlatform, detectPlatformInfo, detectShell, opNeedsAnotherShell, t
43
43
  export { DEFAULT_PORTAL_URL, PORTAL_ADMIN_SECRET_ENV, PORTAL_BUILD_TYPES, PORTAL_PASSWORD_WARNING, PORTAL_SYNC_MAX_DAYS, PORTAL_TODO_ACCESS_TABS, PORTAL_TODO_CHANGES, PORTAL_TODO_KINDS, PORTAL_URL_ENV, type PortalAddTodoInput, type PortalAddTodoResult, type PortalAddUserInput, type PortalAddUserResult, PortalAdminAuthError, type PortalAdminOptions, type PortalAgent, type PortalAgentSyncRow, type PortalBuild, type PortalBuildType, type PortalCreateAgentInput, type PortalCreateBuildInput, type PortalCreateOrgInput, type PortalCreateOrgResult, type PortalListAgentsResult, type PortalListBuildsResult, type PortalListOrgsResult, type PortalListTodosResult, type PortalOrg, type PortalOrgUser, PortalRequestError, type PortalSetAgentNameInput, type PortalSetAgentNameResult, type PortalSetAgentStatusInput, type PortalSetAgentStatusResult, type PortalSetAgentTriageResult, type PortalSetAgentWorkflowInput, type PortalSetAgentWorkflowResult, type PortalSetBuildDetailsInput, type PortalSetBuildDetailsResult, type PortalSetBuildStatusInput, type PortalSetDriveFolderResult, type PortalSetPasswordResult, type PortalSetTodoInput, type PortalSetTodoResult, type PortalSetUserInput, type PortalSetUserResult, type PortalSyncRunsResult, type PortalTodo, type PortalTodoAccessTab, type PortalTodoChange, type PortalTodoKind, type PortalTodoStatus, type PortalTriageBackfillResult, type PortalTriageProvider, type PortalTriageRecordsPage, portalAddTodo, portalAddUser, portalBackfillTriageRecords, portalBuildType, portalBuildWorkflowId, portalCreateAgent, portalCreateBuild, portalCreateOrg, portalListAgents, portalListBuilds, portalListOrgs, portalListTodos, portalReadTriageRecords, portalSetAgentName, portalSetAgentStatus, portalSetAgentTriage, portalSetAgentWorkflow, portalSetBuildDetails, portalSetBuildName, portalSetBuildStatus, portalSetBuildTriage, portalSetBuildWorkflow, portalSetDriveFolder, portalSetOrgSlackChannel, portalSetPassword, portalSetTodo, portalSetUser, portalSyncRuns, validatePortalBuildFields, } from "./portal-admin.js";
44
44
  export { BUILD_DESCRIPTION_MAX, BUILD_NAME_MAX, BUILDS_MANIFEST_END, BUILDS_MANIFEST_START, type BuildsManifest, type BuildsManifestSource, type BuildsManifestState, type BuildsSyncAction, type BuildsSyncActionResult, type BuildsSyncOptions, type BuildsSyncOrgResult, type BuildsSyncPlan, type BuildsSyncResult, type ManifestBuild, type ManifestBuildStatus, parseBuildsManifest, planBuildsSync, type RemoteClientMdReader, syncBuilds, } from "./portal-sync-builds.js";
45
45
  export { expectedGithubAccount, type PrOpenOptions, type PrOpenResult, parseGithubRemote, prOpen, } from "./pr-open.js";
46
- export { CLIENT_LINE_MAX, parseRoadmapRows, ROADMAP_LABELS, ROADMAP_SOURCES, type RoadmapMigrateClient, type RoadmapMigrateOptions, type RoadmapMigrateResult, type RoadmapMigrateRow, type RoadmapRow, roadmapMigrate, } from "./roadmap-migrate.js";
46
+ export { parseRoadmapRows, ROADMAP_LABELS, ROADMAP_SOURCES, type RoadmapMigrateClient, type RoadmapMigrateOptions, type RoadmapMigrateResult, type RoadmapMigrateRow, type RoadmapRow, roadmapMigrate, } from "./roadmap-migrate.js";
47
47
  export { type OnboardingChange, type OnboardingRetirePlan, planOnboardingRetire, ROADMAP_ARCHIVE, ROADMAP_FILE, type RoadmapRetireClient, type RoadmapRetireOptions, type RoadmapRetireResult, roadmapRetire, } from "./roadmap-retire.js";
48
48
  export { type StandupCallPrep, type StandupCallPrepStatus, type StandupGitState, type StandupIssueRef, type StandupLinear, type StandupOptions, type StandupRepo, type StandupRepoLint, type StandupResult, type StandupStaleTodo, standup, } from "./standup.js";
49
49
  export { type SyncRepoResult, type SyncRepoStatus, type SyncReposOptions, type SyncReposResult, syncRepos, workspaceRepoNames, } from "./sync-repos.js";
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ export { installHoursExportSchedule, uninstallHoursExportSchedule, } from "./hou
34
34
  export { buildHoursLedger, CLIENT_FIELDS, DEFAULT_HOURS_LEDGER_DIR, identityMatches, LEDGER_WINDOW_START, OTHER_LEAD_SLUG, TEAM_FIELDS, } from "./hours-ledger.js";
35
35
  export { CLIENT_TEMPLATE_URL, initWorkspace, MCP_RECOMMENDATIONS, TEAM_CLIENTS_URL, } from "./init.js";
36
36
  export { installClientHooks, unhookedClientRepos, } from "./lefthook-hooks.js";
37
- export { findProjectBySlugId, LINEAR_API_TOKEN_ENV, LinearAuthError, LinearProjectNotFoundError, linearProject, linearProjectIssues, linearRequest, } from "./linear-project.js";
37
+ export { CLIENT_LINE_MAX, clientLineOf, findProjectBySlugId, LINEAR_API_TOKEN_ENV, LinearAuthError, LinearProjectNotFoundError, linearProject, linearProjectIssues, linearRequest, } from "./linear-project.js";
38
38
  export { createLogger, redactFields, } from "./log.js";
39
39
  export { applyClientDefaults, clientWorkflowName, DEFAULT_EXECUTION_TIMEOUT_S, DEFAULT_GET_RETRY, DEFAULT_WORKFLOW_SETTINGS, ERROR_WORKFLOW_PLACEHOLDER, IA_ERROR_WORKFLOW_ID, lintN8nWorkflow, lintWorkflowFiles, WORKFLOW_NAME_PATTERN, } from "./n8n-defaults.js";
40
40
  export { extractNodeOutputs, listN8nExecutions, listNodesRun, unflattenExecutionData, } from "./n8n-executions.js";
@@ -46,7 +46,7 @@ export { detectPlatform, detectPlatformInfo, detectShell, opNeedsAnotherShell, }
46
46
  export { DEFAULT_PORTAL_URL, PORTAL_ADMIN_SECRET_ENV, PORTAL_BUILD_TYPES, PORTAL_PASSWORD_WARNING, PORTAL_SYNC_MAX_DAYS, PORTAL_TODO_ACCESS_TABS, PORTAL_TODO_CHANGES, PORTAL_TODO_KINDS, PORTAL_URL_ENV, PortalAdminAuthError, PortalRequestError, portalAddTodo, portalAddUser, portalBackfillTriageRecords, portalBuildType, portalBuildWorkflowId, portalCreateAgent, portalCreateBuild, portalCreateOrg, portalListAgents, portalListBuilds, portalListOrgs, portalListTodos, portalReadTriageRecords, portalSetAgentName, portalSetAgentStatus, portalSetAgentTriage, portalSetAgentWorkflow, portalSetBuildDetails, portalSetBuildName, portalSetBuildStatus, portalSetBuildTriage, portalSetBuildWorkflow, portalSetDriveFolder, portalSetOrgSlackChannel, portalSetPassword, portalSetTodo, portalSetUser, portalSyncRuns, validatePortalBuildFields, } from "./portal-admin.js";
47
47
  export { BUILD_DESCRIPTION_MAX, BUILD_NAME_MAX, BUILDS_MANIFEST_END, BUILDS_MANIFEST_START, parseBuildsManifest, planBuildsSync, syncBuilds, } from "./portal-sync-builds.js";
48
48
  export { expectedGithubAccount, parseGithubRemote, prOpen, } from "./pr-open.js";
49
- export { CLIENT_LINE_MAX, parseRoadmapRows, ROADMAP_LABELS, ROADMAP_SOURCES, roadmapMigrate, } from "./roadmap-migrate.js";
49
+ export { parseRoadmapRows, ROADMAP_LABELS, ROADMAP_SOURCES, roadmapMigrate, } from "./roadmap-migrate.js";
50
50
  export { planOnboardingRetire, ROADMAP_ARCHIVE, ROADMAP_FILE, roadmapRetire, } from "./roadmap-retire.js";
51
51
  export { standup, } from "./standup.js";
52
52
  export { syncRepos, workspaceRepoNames, } from "./sync-repos.js";
@@ -9,6 +9,11 @@ export interface LinearIssue {
9
9
  assignee: string | null;
10
10
  labels: string[];
11
11
  updatedAt: string;
12
+ /**
13
+ * The `Client line:` of the description: the one sentence the client portal
14
+ * shows for this issue in Now / Next / Later. Null = an internal issue.
15
+ */
16
+ clientLine: string | null;
12
17
  }
13
18
  export interface LinearProjectResult {
14
19
  project: {
@@ -71,6 +76,13 @@ export interface LinearIssueState {
71
76
  export declare function linearProjectIssueStates(fetchImpl: typeof fetch, token: string, project: ProjectNode, options?: {
72
77
  maxPages?: number;
73
78
  }): Promise<LinearIssueState[]>;
79
+ /**
80
+ * The portal hides a client line over this length (team-web
81
+ * apps/portal/lib/client-plan.ts CLIENT_LINE_MAX). Change both together.
82
+ */
83
+ export declare const CLIENT_LINE_MAX = 90;
84
+ /** The text of a description's `Client line:`, whatever its length; null when there is none. */
85
+ export declare function clientLineOf(description: string | null): string | null;
74
86
  /**
75
87
  * Open (not completed/canceled/duplicate) issues in an already-resolved
76
88
  * Linear project — "what's left to do" for that project. Either returns the
@@ -140,6 +140,17 @@ export async function linearProjectIssueStates(fetchImpl, token, project, option
140
140
  }
141
141
  return out;
142
142
  }
143
+ // The portal's pattern (team-web apps/portal/lib/client-plan.ts CLIENT_LINE).
144
+ const CLIENT_LINE_PATTERN = /^[ \t]*(?:[-*][ \t]+)?(?:\*\*)?client line:(?:\*\*)?[ \t]*(.*?)[ \t]*$/im;
145
+ /**
146
+ * The portal hides a client line over this length (team-web
147
+ * apps/portal/lib/client-plan.ts CLIENT_LINE_MAX). Change both together.
148
+ */
149
+ export const CLIENT_LINE_MAX = 90;
150
+ /** The text of a description's `Client line:`, whatever its length; null when there is none. */
151
+ export function clientLineOf(description) {
152
+ return CLIENT_LINE_PATTERN.exec(description ?? "")?.[1]?.trim() || null;
153
+ }
143
154
  function toIssue(node) {
144
155
  return {
145
156
  identifier: node.identifier,
@@ -151,6 +162,7 @@ function toIssue(node) {
151
162
  assignee: node.assignee?.name ?? null,
152
163
  labels: node.labels.nodes.map((l) => l.name),
153
164
  updatedAt: node.updatedAt,
165
+ clientLine: clientLineOf(node.description),
154
166
  };
155
167
  }
156
168
  function countOccurrences(text, term) {
@@ -1,5 +1,4 @@
1
1
  export declare const ROADMAP_SOURCES: string[];
2
- export declare const CLIENT_LINE_MAX = 140;
3
2
  export declare const ROADMAP_LABELS: readonly ["value", "client-ask", "parked"];
4
3
  export interface RoadmapRow {
5
4
  rank: string;
@@ -17,15 +17,14 @@
17
17
  // It never changes a state, a title, a priority or an assignee: a state that
18
18
  // does not match the row is a report line for a person. It refuses a Client
19
19
  // line with `$` (Linear is shared by all staff: no dollar amounts), a ticket
20
- // id, or more than 140 characters. Angello runs `--apply`.
20
+ // id, or more than 90 characters. Angello runs `--apply`.
21
21
  import { existsSync, readFileSync } from "node:fs";
22
22
  import { join, resolve } from "node:path";
23
23
  import { parseLinearProjectSlugId } from "./client-linear.js";
24
24
  import { readManifestKey } from "./client-manifest.js";
25
- import { findProjectBySlugId, LINEAR_API_TOKEN_ENV, linearRequest } from "./linear-project.js";
25
+ import { CLIENT_LINE_MAX, findProjectBySlugId, LINEAR_API_TOKEN_ENV, linearRequest, } from "./linear-project.js";
26
26
  import { adhocReason, selectClientSlugs } from "./template-sync.js";
27
27
  export const ROADMAP_SOURCES = ["docs/06-roadmap.md", "docs/archive/06-roadmap.md"];
28
- export const CLIENT_LINE_MAX = 140;
29
28
  export const ROADMAP_LABELS = ["value", "client-ask", "parked"];
30
29
  const ISSUE_ID = /\bINS-\d+\b/g;
31
30
  const TICKET_ID = /\b[A-Z][A-Z0-9]{1,9}-\d+\b/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@installagent/sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Install Agent's shared SDK for internal team operations (client repos, n8n workflows, docs search, and more).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -78,10 +78,14 @@ portal reads **Now / Next / Later** from the client's project at request time.
78
78
  | Rank | priority, then the project's manual sort order. The account owner moves ranks; a technician moves states | the order inside each list |
79
79
  | Who it serves | label `value` (moves the number we committed to), `client-ask` (the client asked); both labels = both | — |
80
80
  | Why this rank | the issue description | — |
81
- | The client-safe line | one line in the description: `Client line: <one sentence, 140 characters at most>` | the only text the client sees |
82
-
83
- **Client line rules:** plain words, no tool names, no ticket numbers, **no
84
- dollar amounts** (Linear is shared by all staff). An issue with no `Client
81
+ | The client-safe line | one line in the description: `Client line: <one short sentence, 90 characters at most>` | the only text the client sees |
82
+
83
+ **Client line rules:** one idea, said directly: the result for the client, not
84
+ how we do it. **90 characters at most**, so it fits two rows of a portal card;
85
+ the portal hides a longer line. Plain words, no tool names, no ticket numbers,
86
+ **no dollar amounts** (Linear is shared by all staff). Check a project with
87
+ `ia client-linear <slug> --client-lines`: it prints each line with its length
88
+ and marks one over the limit. `Client line: none` marks an internal issue. An issue with no `Client
85
89
  line:` is internal: the client never sees it. The portal never shows an issue
86
90
  title or any other part of the description, and drops a line with `$` or a
87
91
  ticket id.