intentdna 1.7.4 → 1.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.
Files changed (152) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/LICENSE +201 -0
  4. package/README.md +143 -194
  5. package/dist/assets/candidates.d.ts +124 -0
  6. package/dist/assets/candidates.js +1249 -0
  7. package/dist/assets/catalog.d.ts +101 -0
  8. package/dist/assets/catalog.js +311 -0
  9. package/dist/assets/evidence.d.ts +93 -0
  10. package/dist/assets/evidence.js +391 -0
  11. package/dist/assets/index.d.ts +4 -0
  12. package/dist/assets/index.js +4 -0
  13. package/dist/assets/metadata.d.ts +19 -0
  14. package/dist/assets/metadata.js +227 -0
  15. package/dist/cli/commands/assets.d.ts +65 -0
  16. package/dist/cli/commands/assets.js +2871 -0
  17. package/dist/cli/commands/auth.d.ts +322 -0
  18. package/dist/cli/commands/auth.js +1592 -0
  19. package/dist/cli/commands/cloud-auth-guidance.d.ts +2 -0
  20. package/dist/cli/commands/cloud-auth-guidance.js +4 -0
  21. package/dist/cli/commands/cloud.d.ts +1359 -0
  22. package/dist/cli/commands/cloud.js +8364 -0
  23. package/dist/cli/commands/evolve.js +18 -2
  24. package/dist/cli/commands/generate.js +25 -2
  25. package/dist/cli/commands/guard.d.ts +1 -1
  26. package/dist/cli/commands/guard.js +1 -1
  27. package/dist/cli/commands/guide.d.ts +15 -0
  28. package/dist/cli/commands/guide.js +1747 -0
  29. package/dist/cli/commands/init.d.ts +12 -0
  30. package/dist/cli/commands/init.js +95 -60
  31. package/dist/cli/commands/org.d.ts +16 -0
  32. package/dist/cli/commands/org.js +2393 -0
  33. package/dist/cli/commands/release.d.ts +59 -0
  34. package/dist/cli/commands/release.js +716 -0
  35. package/dist/cli/commands/report.d.ts +82 -0
  36. package/dist/cli/commands/report.js +1516 -0
  37. package/dist/cli/commands/run.d.ts +6 -1
  38. package/dist/cli/commands/run.js +95 -26
  39. package/dist/cli/commands/sync.d.ts +8 -1
  40. package/dist/cli/commands/sync.js +436 -141
  41. package/dist/cli/commands/templates.d.ts +64 -0
  42. package/dist/cli/commands/templates.js +2151 -1
  43. package/dist/cli/commands/workflow.d.ts +26 -0
  44. package/dist/cli/commands/workflow.js +3053 -0
  45. package/dist/cli/index.js +719 -42
  46. package/dist/compiler/cascade.js +4 -9
  47. package/dist/compiler/compile.js +1 -0
  48. package/dist/governance/evidence-capture-attribution.d.ts +12 -0
  49. package/dist/governance/evidence-capture-attribution.js +46 -0
  50. package/dist/governance/index.d.ts +2 -0
  51. package/dist/governance/index.js +1 -0
  52. package/dist/hooks/cli.d.ts +6 -0
  53. package/dist/hooks/cli.js +168 -12
  54. package/dist/hooks/enforce.d.ts +1 -0
  55. package/dist/hooks/protocol.d.ts +1 -1
  56. package/dist/hooks/protocol.js +1 -1
  57. package/dist/hooks/state.d.ts +41 -0
  58. package/dist/hooks/state.js +126 -2
  59. package/dist/index.d.ts +3 -0
  60. package/dist/index.js +3 -0
  61. package/dist/mcp/tools-state.js +2 -0
  62. package/dist/organization/index.d.ts +121 -0
  63. package/dist/organization/index.js +413 -0
  64. package/dist/runtime/claude-sync-target.d.ts +49 -0
  65. package/dist/runtime/claude-sync-target.js +280 -0
  66. package/dist/runtime/codex-adapter.d.ts +254 -0
  67. package/dist/runtime/codex-adapter.js +1204 -0
  68. package/dist/runtime/codex-sync-target.d.ts +33 -0
  69. package/dist/runtime/codex-sync-target.js +241 -0
  70. package/dist/runtime/index.d.ts +8 -0
  71. package/dist/runtime/index.js +4 -0
  72. package/dist/runtime/output-artifact-registry.d.ts +1 -1
  73. package/dist/runtime/output-artifact-registry.js +2 -0
  74. package/dist/runtime/settings-adapter.d.ts +1 -1
  75. package/dist/runtime/settings-adapter.js +1 -1
  76. package/dist/runtime/skill-adapter.d.ts +5 -1
  77. package/dist/runtime/skill-adapter.js +120 -34
  78. package/dist/runtime/sync-artifact-registry.d.ts +99 -0
  79. package/dist/runtime/sync-artifact-registry.js +194 -0
  80. package/dist/runtime/sync-target-plan.d.ts +45 -0
  81. package/dist/runtime/sync-target-plan.js +19 -0
  82. package/dist/schema/controller-registry.d.ts +8 -1
  83. package/dist/schema/controller-registry.js +8 -0
  84. package/dist/schema/types.d.ts +35 -23
  85. package/dist/schema/types.js +10 -1
  86. package/dist/schema/validate.js +22 -22
  87. package/dist/schema/validators/controllers.js +38 -20
  88. package/dist/schema/workflow-authoring-contract.d.ts +29 -0
  89. package/dist/schema/workflow-authoring-contract.js +109 -0
  90. package/dist/schema/yaml-parser.js +18 -0
  91. package/dist/templates/api-backend.dna.yaml +19 -0
  92. package/dist/templates/brainstorming-first.dna.yaml +19 -0
  93. package/dist/templates/code-cleanup.dna.yaml +19 -0
  94. package/dist/templates/code-review-pipeline.dna.yaml +18 -0
  95. package/dist/templates/documentation-writer.dna.yaml +19 -0
  96. package/dist/templates/flutter-behavior-lock.dna.yaml +19 -0
  97. package/dist/templates/flutter-refactoring-rescue.dna.yaml +19 -0
  98. package/dist/templates/flutter-rewrite-diagnosis-review.dna.yaml +210 -0
  99. package/dist/templates/flutter-rewrite-fix-review-loop.dna.yaml +260 -0
  100. package/dist/templates/flutter-rewrite-new.dna.yaml +506 -0
  101. package/dist/templates/flutter-rewrite.dna.yaml +20 -0
  102. package/dist/templates/frontend-quality.dna.yaml +19 -0
  103. package/dist/templates/full-pipeline.dna.yaml +20 -0
  104. package/dist/templates/marketplace.d.ts +92 -0
  105. package/dist/templates/marketplace.js +502 -0
  106. package/dist/templates/metadata.d.ts +25 -0
  107. package/dist/templates/metadata.js +136 -3
  108. package/dist/templates/mobile-dev.dna.yaml +19 -0
  109. package/dist/templates/multi-agent-handoff-coordination.dna.yaml +156 -0
  110. package/dist/templates/multi-perspective-review.dna.yaml +19 -0
  111. package/dist/templates/persistent-executor.dna.yaml +19 -0
  112. package/dist/templates/qa-loop.dna.yaml +18 -0
  113. package/dist/templates/release-evidence-gate.dna.yaml +131 -0
  114. package/dist/templates/requirements-gate.dna.yaml +19 -0
  115. package/dist/templates/research-orchestration.dna.yaml +19 -0
  116. package/dist/templates/root-cause-analysis.dna.yaml +19 -0
  117. package/dist/templates/safe-refactoring.dna.yaml +321 -0
  118. package/dist/templates/secure-dev.dna.yaml +19 -0
  119. package/dist/templates/subagent-parallel.dna.yaml +19 -0
  120. package/dist/templates/systematic-debugging.dna.yaml +19 -0
  121. package/dist/templates/tdd-strict.dna.yaml +19 -0
  122. package/dist/templates/ui-visual-regression-qa.dna.yaml +133 -0
  123. package/dist/templates/workflow-author.dna.yaml +302 -0
  124. package/dist/templates/workflow-blocked-scope-triage.dna.yaml +242 -0
  125. package/dist/templates/workflow-completion-audit.dna.yaml +254 -0
  126. package/dist/templates/workflow-cross-boundary-resource-approval.dna.yaml +249 -0
  127. package/dist/templates/workflow-evidence-review.dna.yaml +198 -0
  128. package/dist/templates/workflow-module-inventory.dna.yaml +257 -0
  129. package/dist/templates/workflow-runtime-smoke-review.dna.yaml +252 -0
  130. package/dist/templates/workflow-verification-command-routing.dna.yaml +278 -0
  131. package/dist/workflow/authoring-packet.d.ts +67 -0
  132. package/dist/workflow/authoring-packet.js +218 -0
  133. package/dist/workflow/draft.d.ts +159 -0
  134. package/dist/workflow/draft.js +800 -0
  135. package/dist/workflow/index.d.ts +3 -0
  136. package/dist/workflow/index.js +3 -0
  137. package/dist/workflow/suggestion-review.d.ts +65 -0
  138. package/dist/workflow/suggestion-review.js +245 -0
  139. package/package.json +1 -1
  140. package/spec/README.md +15 -48
  141. package/spec/codex-adapter-contract.md +176 -0
  142. package/spec/sync-target-plan.md +158 -0
  143. package/spec/workflow-capability-ir.md +153 -0
  144. package/spec/agent-dispatch-fix.md +0 -116
  145. package/spec/control-plane-convergence-handoff-2026-04-24.md +0 -432
  146. package/spec/flutter-rewrite-template-optimization.md +0 -301
  147. package/spec/foundation-hardening.md +0 -178
  148. package/spec/hooks-infra-harness-hardening.md +0 -741
  149. package/spec/multi-config.md +0 -172
  150. package/spec/parallel-isolation.md +0 -268
  151. package/spec/template-version-namespace-fix.md +0 -653
  152. package/spec/workflow-pipeline.md +0 -101
@@ -0,0 +1,322 @@
1
+ export interface AuthOptions {
2
+ subcommand: string;
3
+ tokenAction?: string;
4
+ userJwtAction?: string;
5
+ token?: string;
6
+ tokenId?: string;
7
+ userJwt?: string;
8
+ endpoint?: string;
9
+ projectId?: string;
10
+ organizationId?: string;
11
+ tokenName?: string;
12
+ orgName?: string;
13
+ projectName?: string;
14
+ orgSlug?: string;
15
+ projectSlug?: string;
16
+ projectHint?: string;
17
+ scopes?: string[];
18
+ expiresAt?: string;
19
+ includeRevoked?: boolean;
20
+ limit?: number;
21
+ dryRun?: boolean;
22
+ yes?: boolean;
23
+ json?: boolean;
24
+ env?: NodeJS.ProcessEnv;
25
+ configDir?: string;
26
+ fetch?: typeof globalThis.fetch;
27
+ }
28
+ interface StoredAuthConfig {
29
+ schema_version: "intentdna.auth_config.v1";
30
+ token: string;
31
+ token_preview: string;
32
+ token_prefix: string;
33
+ created_at: string;
34
+ updated_at: string;
35
+ }
36
+ interface StoredSupabaseUserJwtConfig {
37
+ schema_version: "intentdna.supabase_user_jwt_config.v1";
38
+ token: string;
39
+ token_preview: string;
40
+ token_prefix: string;
41
+ created_at: string;
42
+ updated_at: string;
43
+ }
44
+ interface AuthStatus {
45
+ schema_version: "intentdna.auth_status.v1";
46
+ mode: "api_token_auth_status";
47
+ authenticated: boolean;
48
+ credential_present: boolean;
49
+ verified_online: false;
50
+ network_performed: false;
51
+ runtime_authority: false;
52
+ source: "env" | "user_config" | "none";
53
+ config_path: string;
54
+ token_preview?: string;
55
+ missing: string[];
56
+ boundaries: string[];
57
+ next_commands: string[];
58
+ }
59
+ interface AuthTokenResult {
60
+ schema_version: "intentdna.auth_token_result.v1";
61
+ action: "set" | "clear";
62
+ status: "stored" | "cleared" | "already_clear" | "rejected";
63
+ config_path: string;
64
+ token_preview?: string;
65
+ raw_token_printed: false;
66
+ network_performed: false;
67
+ runtime_authority: false;
68
+ reason?: string;
69
+ boundaries: string[];
70
+ }
71
+ interface SupabaseUserJwtStatus {
72
+ schema_version: "intentdna.supabase_user_jwt_status.v1";
73
+ mode: "supabase_user_jwt_account_bridge_status";
74
+ credential_present: boolean;
75
+ credential_expired: boolean;
76
+ verified_online: false;
77
+ network_performed: false;
78
+ runtime_authority: false;
79
+ source: SupabaseUserJwtSource;
80
+ config_path: string;
81
+ token_preview?: string;
82
+ expires_at?: string;
83
+ missing: string[];
84
+ boundaries: string[];
85
+ next_commands: string[];
86
+ }
87
+ interface SupabaseUserJwtResult {
88
+ schema_version: "intentdna.supabase_user_jwt_result.v1";
89
+ action: "set" | "clear";
90
+ status: "stored" | "cleared" | "already_clear" | "rejected";
91
+ config_path: string;
92
+ token_preview?: string;
93
+ raw_token_printed: false;
94
+ network_performed: false;
95
+ runtime_authority: false;
96
+ reason?: string;
97
+ boundaries: string[];
98
+ }
99
+ type AuthIssueTokenStatus = "dry_run" | "issued" | "pending" | "rejected";
100
+ type AuthBootstrapAccountStatus = "dry_run" | "bootstrapped" | "pending" | "rejected";
101
+ type AuthProjectsStatus = "dry_run" | "ready" | "pending" | "rejected";
102
+ type AuthTokensStatus = "dry_run" | "ready" | "revoked" | "pending" | "rejected";
103
+ type AuthOnboardStatus = "dry_run" | "issued" | "pending" | "rejected";
104
+ type SupabaseUserJwtSource = "option" | "env" | "user_config" | "none";
105
+ interface AuthIssueTokenRequest {
106
+ schema_version: "intentdna.api_token_issue_request.v1";
107
+ name?: string;
108
+ organization_id?: string;
109
+ project_id?: string;
110
+ scopes: string[];
111
+ expires_at: string | null;
112
+ }
113
+ interface AuthBootstrapAccountRequest {
114
+ schema_version: "intentdna.account_bootstrap_request.v1";
115
+ organization_name?: string;
116
+ organization_slug?: string;
117
+ project_name?: string;
118
+ project_slug?: string;
119
+ local_project_hint?: string | null;
120
+ }
121
+ interface AuthBootstrapAccountResult {
122
+ schema_version: "intentdna.auth_bootstrap_account_result.v1";
123
+ generated_at: string;
124
+ status: AuthBootstrapAccountStatus;
125
+ endpoint?: string;
126
+ request: AuthBootstrapAccountRequest;
127
+ auth: {
128
+ supabase_user_jwt_present: boolean;
129
+ source: SupabaseUserJwtSource;
130
+ };
131
+ transport: {
132
+ network_performed: boolean;
133
+ hidden_transport: false;
134
+ };
135
+ mutation_performed: boolean;
136
+ runtime_authority: false;
137
+ bootstrap_receipt?: Record<string, unknown>;
138
+ missing: string[];
139
+ reasons: string[];
140
+ boundaries: string[];
141
+ next_commands: string[];
142
+ }
143
+ interface AuthIssueTokenResult {
144
+ schema_version: "intentdna.auth_issue_token_result.v1";
145
+ generated_at: string;
146
+ status: AuthIssueTokenStatus;
147
+ endpoint?: string;
148
+ request: AuthIssueTokenRequest;
149
+ auth: {
150
+ supabase_user_jwt_present: boolean;
151
+ source: SupabaseUserJwtSource;
152
+ };
153
+ local_storage: {
154
+ stored: boolean;
155
+ config_path: string;
156
+ token_preview?: string;
157
+ };
158
+ transport: {
159
+ network_performed: boolean;
160
+ hidden_transport: false;
161
+ };
162
+ runtime_authority: false;
163
+ raw_token_printed: false;
164
+ issue_receipt?: Record<string, unknown>;
165
+ missing: string[];
166
+ reasons: string[];
167
+ boundaries: string[];
168
+ }
169
+ interface AuthProjectsRequest {
170
+ schema_version: "intentdna.account_projects_request.v1";
171
+ method: "POST";
172
+ function: "list-projects";
173
+ body: null;
174
+ }
175
+ interface AuthProjectsResult {
176
+ schema_version: "intentdna.auth_projects_result.v1";
177
+ generated_at: string;
178
+ status: AuthProjectsStatus;
179
+ endpoint?: string;
180
+ request: AuthProjectsRequest;
181
+ auth: {
182
+ supabase_user_jwt_present: boolean;
183
+ source: SupabaseUserJwtSource;
184
+ };
185
+ transport: {
186
+ network_performed: boolean;
187
+ hidden_transport: false;
188
+ };
189
+ runtime_authority: false;
190
+ projects_receipt?: Record<string, unknown>;
191
+ missing: string[];
192
+ reasons: string[];
193
+ boundaries: string[];
194
+ }
195
+ interface AuthTokensRequest {
196
+ schema_version: "intentdna.api_tokens_manage_request.v1";
197
+ action: "list" | "revoke";
198
+ organization_id?: string;
199
+ project_id?: string;
200
+ token_id?: string;
201
+ include_revoked: boolean;
202
+ limit: number;
203
+ }
204
+ interface AuthTokensResult {
205
+ schema_version: "intentdna.auth_tokens_result.v1";
206
+ generated_at: string;
207
+ action: "list" | "revoke";
208
+ status: AuthTokensStatus;
209
+ endpoint?: string;
210
+ request: AuthTokensRequest;
211
+ auth: {
212
+ supabase_user_jwt_present: boolean;
213
+ source: SupabaseUserJwtSource;
214
+ };
215
+ mutation_confirmed: boolean;
216
+ transport: {
217
+ network_performed: boolean;
218
+ hidden_transport: false;
219
+ };
220
+ runtime_authority: false;
221
+ token_management_receipt?: Record<string, unknown>;
222
+ missing: string[];
223
+ reasons: string[];
224
+ boundaries: string[];
225
+ }
226
+ interface AuthOnboardResult {
227
+ schema_version: "intentdna.auth_onboard_result.v1";
228
+ generated_at: string;
229
+ status: AuthOnboardStatus;
230
+ selected_project: {
231
+ project_id?: string;
232
+ organization_id?: string;
233
+ project_name?: string;
234
+ organization_name?: string;
235
+ source: "explicit" | "single_project" | "unselected";
236
+ project_count: number;
237
+ ambiguous: boolean;
238
+ };
239
+ endpoints: {
240
+ list_projects?: string;
241
+ issue_api_token?: string;
242
+ };
243
+ auth: {
244
+ supabase_user_jwt_present: boolean;
245
+ source: SupabaseUserJwtSource;
246
+ };
247
+ local_storage: {
248
+ stored: boolean;
249
+ config_path: string;
250
+ token_preview?: string;
251
+ };
252
+ transport: {
253
+ network_performed: boolean;
254
+ hidden_transport: false;
255
+ };
256
+ runtime_authority: false;
257
+ raw_token_printed: false;
258
+ projects_result: AuthProjectsResult;
259
+ issue_result?: AuthIssueTokenResult;
260
+ auth_status?: AuthStatus;
261
+ missing: string[];
262
+ reasons: string[];
263
+ boundaries: string[];
264
+ next_commands: string[];
265
+ }
266
+ export interface ResolvedAuthToken {
267
+ token?: string;
268
+ source: "env" | "user_config" | "none";
269
+ configPath: string;
270
+ }
271
+ export interface ResolvedSupabaseUserJwt {
272
+ token?: string;
273
+ source: SupabaseUserJwtSource;
274
+ configPath: string;
275
+ expiresAt?: string;
276
+ expired: boolean;
277
+ }
278
+ export declare function maskAuthToken(value: string | undefined): string | undefined;
279
+ export declare function authConfigPath(env?: NodeJS.ProcessEnv, configDir?: string): string;
280
+ export declare function supabaseUserJwtConfigPath(env?: NodeJS.ProcessEnv, configDir?: string): string;
281
+ export declare function resolveAuthToken(params?: {
282
+ env?: NodeJS.ProcessEnv;
283
+ configDir?: string;
284
+ }): Promise<ResolvedAuthToken>;
285
+ export declare function isRejectedServiceRoleToken(token: string, env: NodeJS.ProcessEnv): boolean;
286
+ export declare function buildAccountEndpoint(opts: AuthOptions, functionName: "bootstrap-account" | "list-projects" | "manage-api-tokens" | "list-receipts"): string | undefined;
287
+ export declare function resolveSupabaseUserJwt(opts: Pick<AuthOptions, "userJwt" | "env" | "configDir"> & Partial<Pick<AuthOptions, "subcommand">>): Promise<ResolvedSupabaseUserJwt>;
288
+ export declare function readStoredAuth(path: string): Promise<StoredAuthConfig | undefined>;
289
+ export declare function readStoredSupabaseUserJwt(path: string): Promise<StoredSupabaseUserJwtConfig | undefined>;
290
+ export declare function buildAuthStatus(params?: {
291
+ env?: NodeJS.ProcessEnv;
292
+ configDir?: string;
293
+ }): Promise<AuthStatus>;
294
+ export declare function buildSupabaseUserJwtStatus(params?: {
295
+ env?: NodeJS.ProcessEnv;
296
+ configDir?: string;
297
+ }): Promise<SupabaseUserJwtStatus>;
298
+ export declare function storeAuthToken(params: {
299
+ token: string;
300
+ env?: NodeJS.ProcessEnv;
301
+ configDir?: string;
302
+ }): Promise<AuthTokenResult>;
303
+ export declare function storeSupabaseUserJwt(params: {
304
+ token: string;
305
+ env?: NodeJS.ProcessEnv;
306
+ configDir?: string;
307
+ }): Promise<SupabaseUserJwtResult>;
308
+ export declare function clearAuthToken(params?: {
309
+ env?: NodeJS.ProcessEnv;
310
+ configDir?: string;
311
+ }): Promise<AuthTokenResult>;
312
+ export declare function clearSupabaseUserJwt(params?: {
313
+ env?: NodeJS.ProcessEnv;
314
+ configDir?: string;
315
+ }): Promise<SupabaseUserJwtResult>;
316
+ export declare function issueAuthToken(options: AuthOptions): Promise<AuthIssueTokenResult>;
317
+ export declare function bootstrapAccount(options: AuthOptions): Promise<AuthBootstrapAccountResult>;
318
+ export declare function listAuthProjects(options: AuthOptions): Promise<AuthProjectsResult>;
319
+ export declare function manageAuthTokens(options: AuthOptions): Promise<AuthTokensResult>;
320
+ export declare function onboardAuth(options: AuthOptions): Promise<AuthOnboardResult>;
321
+ export declare function runAuth(options: AuthOptions): Promise<number>;
322
+ export {};