@flytedesk/app-kit 7.5.0 → 8.0.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 (42) hide show
  1. package/README.md +45 -10
  2. package/dist/auth/client/authSession.d.ts +6 -0
  3. package/dist/auth/client/authSession.js +34 -10
  4. package/dist/auth/client/authSession.js.map +1 -1
  5. package/dist/auth/client/httpClient.d.ts +1 -3
  6. package/dist/auth/client/httpClient.js +4 -3
  7. package/dist/auth/client/httpClient.js.map +1 -1
  8. package/dist/bigquery/client.d.ts +3 -0
  9. package/dist/bigquery/client.js +2 -0
  10. package/dist/bigquery/client.js.map +1 -1
  11. package/dist/bigquery/errors.d.ts +26 -0
  12. package/dist/bigquery/errors.js +41 -0
  13. package/dist/bigquery/errors.js.map +1 -1
  14. package/dist/bigquery/index.d.ts +6 -3
  15. package/dist/bigquery/index.js +3 -2
  16. package/dist/bigquery/index.js.map +1 -1
  17. package/dist/bigquery/insert.d.ts +10 -0
  18. package/dist/bigquery/insert.js +22 -0
  19. package/dist/bigquery/insert.js.map +1 -0
  20. package/dist/bigquery/query.js +4 -2
  21. package/dist/bigquery/query.js.map +1 -1
  22. package/dist/bigquery/types.d.ts +11 -0
  23. package/dist/bigquery/values.d.ts +3 -0
  24. package/dist/bigquery/values.js +5 -0
  25. package/dist/bigquery/values.js.map +1 -1
  26. package/dist/chat/callback-secret.js +6 -1
  27. package/dist/chat/callback-secret.js.map +1 -1
  28. package/dist/chat/env.js.map +1 -1
  29. package/dist/chat/index.d.ts +8 -4
  30. package/dist/chat/index.js +7 -3
  31. package/dist/chat/index.js.map +1 -1
  32. package/dist/chat/job-status.js +10 -3
  33. package/dist/chat/job-status.js.map +1 -1
  34. package/dist/chat/launcher.d.ts +3 -4
  35. package/dist/chat/launcher.js +37 -29
  36. package/dist/chat/launcher.js.map +1 -1
  37. package/dist/chat/mcp-protocol.js +45 -13
  38. package/dist/chat/mcp-protocol.js.map +1 -1
  39. package/dist/chat/mcp-server.js +6 -2
  40. package/dist/chat/mcp-server.js.map +1 -1
  41. package/dist/chat/types.d.ts +10 -11
  42. package/package.json +1 -1
@@ -34,10 +34,13 @@ export interface DanxbotLauncherOptions {
34
34
  * (see the README "Chat" section). */
35
35
  profile: string;
36
36
  }
37
- /** What a one-shot job needs on top of the launcher's board and profile. */
38
- export type LaunchJobInput = {
37
+ /** What one dispatch needs on top of the launcher's board and profile. */
38
+ export type DispatchInput = {
39
39
  task: string;
40
40
  overlay: Record<string, string>;
41
+ /** The job whose Claude session to resume (`/api/resume`); absent or null launches
42
+ * a fresh session (`/api/launch`). */
43
+ parentJobId?: string | null;
41
44
  /** Where danxbot PUTs `{status, message?, data?}` as the job runs and ends
42
45
  * (see job-status.ts). */
43
46
  statusUrl: string;
@@ -56,16 +59,12 @@ export type LaunchJobInput = {
56
59
  effort: string;
57
60
  });
58
61
  export interface DanxbotLauncher {
59
- /** Dispatch one chat turn — see dispatchChatTurn's own doc comment for the
60
- * launch-vs-resume branching. */
61
- dispatchChatTurn(input: {
62
- task: string;
63
- overlay: Record<string, string>;
64
- parentJobId?: string | null;
65
- }): Promise<DanxbotDispatchResult>;
66
- /** Launch a one-shot job that reports its end to a URL — see launchJob's own doc
62
+ /** Launch or resume one agent session, always carrying the status callback - see
63
+ * dispatch's own doc comment in launcher.ts. */
64
+ dispatch(input: DispatchInput): Promise<DanxbotDispatchResult>;
65
+ /** Stop a running job and free its danxbot worker slot - see cancelJob's own doc
67
66
  * comment in launcher.ts. */
68
- launchJob(input: LaunchJobInput): Promise<DanxbotDispatchResult>;
67
+ cancelJob(jobId: string, reason: string): Promise<void>;
69
68
  getJobStatus(jobId: string): Promise<DanxbotJobStatus>;
70
69
  }
71
70
  /** One MCP tool-result content block — the two kinds this module's tools ever return. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flytedesk/app-kit",
3
- "version": "7.5.0",
3
+ "version": "8.0.0",
4
4
  "description": "Shared platform kit for flytedesk apps: flytedesk-id auth (BFF/OIDC client) and a Postgres-native trace/audit layer.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",