@airstore/sdk 0.1.1 → 0.1.4

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 (109) hide show
  1. package/README.md +108 -12
  2. package/dist/cjs/airstore.js +42 -69
  3. package/dist/cjs/airstore.js.map +1 -1
  4. package/dist/cjs/index.js +46 -3
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/resources/access-log.js +101 -0
  7. package/dist/cjs/resources/access-log.js.map +1 -0
  8. package/dist/cjs/resources/agents.js +28 -0
  9. package/dist/cjs/resources/agents.js.map +1 -0
  10. package/dist/cjs/resources/filesystem.js +5 -2
  11. package/dist/cjs/resources/filesystem.js.map +1 -1
  12. package/dist/cjs/resources/index.js +9 -3
  13. package/dist/cjs/resources/index.js.map +1 -1
  14. package/dist/cjs/resources/runs.js +36 -0
  15. package/dist/cjs/resources/runs.js.map +1 -0
  16. package/dist/cjs/resources/tasks.js +82 -0
  17. package/dist/cjs/resources/tasks.js.map +1 -0
  18. package/dist/cjs/resources/views.js +107 -0
  19. package/dist/cjs/resources/views.js.map +1 -0
  20. package/dist/cjs/resources/workspaces.js +1 -1
  21. package/dist/cjs/types/{smart-folders.js → access-log.js} +1 -1
  22. package/dist/cjs/types/access-log.js.map +1 -0
  23. package/dist/cjs/types/agents.js +3 -0
  24. package/dist/cjs/types/agents.js.map +1 -0
  25. package/dist/cjs/types/index.js +4 -1
  26. package/dist/cjs/types/index.js.map +1 -1
  27. package/dist/cjs/types/runs.js +3 -0
  28. package/dist/cjs/types/runs.js.map +1 -0
  29. package/dist/cjs/types/tasks.js +23 -0
  30. package/dist/cjs/types/tasks.js.map +1 -0
  31. package/dist/cjs/types/views.js +29 -0
  32. package/dist/cjs/types/views.js.map +1 -0
  33. package/dist/esm/airstore.js +42 -69
  34. package/dist/esm/airstore.js.map +1 -1
  35. package/dist/esm/index.js +8 -1
  36. package/dist/esm/index.js.map +1 -1
  37. package/dist/esm/resources/access-log.js +97 -0
  38. package/dist/esm/resources/access-log.js.map +1 -0
  39. package/dist/esm/resources/agents.js +24 -0
  40. package/dist/esm/resources/agents.js.map +1 -0
  41. package/dist/esm/resources/filesystem.js +5 -2
  42. package/dist/esm/resources/filesystem.js.map +1 -1
  43. package/dist/esm/resources/index.js +4 -1
  44. package/dist/esm/resources/index.js.map +1 -1
  45. package/dist/esm/resources/runs.js +32 -0
  46. package/dist/esm/resources/runs.js.map +1 -0
  47. package/dist/esm/resources/tasks.js +78 -0
  48. package/dist/esm/resources/tasks.js.map +1 -0
  49. package/dist/esm/resources/views.js +103 -0
  50. package/dist/esm/resources/views.js.map +1 -0
  51. package/dist/esm/resources/workspaces.js +1 -1
  52. package/dist/esm/types/access-log.js +2 -0
  53. package/dist/esm/types/access-log.js.map +1 -0
  54. package/dist/esm/types/agents.js +2 -0
  55. package/dist/esm/types/agents.js.map +1 -0
  56. package/dist/esm/types/index.js +4 -1
  57. package/dist/esm/types/index.js.map +1 -1
  58. package/dist/esm/types/runs.js +2 -0
  59. package/dist/esm/types/runs.js.map +1 -0
  60. package/dist/esm/types/tasks.js +20 -0
  61. package/dist/esm/types/tasks.js.map +1 -0
  62. package/dist/esm/types/views.js +26 -0
  63. package/dist/esm/types/views.js.map +1 -0
  64. package/dist/types/airstore.d.ts +37 -68
  65. package/dist/types/airstore.d.ts.map +1 -1
  66. package/dist/types/index.d.ts +12 -2
  67. package/dist/types/index.d.ts.map +1 -1
  68. package/dist/types/resources/access-log.d.ts +72 -0
  69. package/dist/types/resources/access-log.d.ts.map +1 -0
  70. package/dist/types/resources/agents.d.ts +13 -0
  71. package/dist/types/resources/agents.d.ts.map +1 -0
  72. package/dist/types/resources/filesystem.d.ts +4 -2
  73. package/dist/types/resources/filesystem.d.ts.map +1 -1
  74. package/dist/types/resources/index.d.ts +4 -1
  75. package/dist/types/resources/index.d.ts.map +1 -1
  76. package/dist/types/resources/runs.d.ts +17 -0
  77. package/dist/types/resources/runs.d.ts.map +1 -0
  78. package/dist/types/resources/tasks.d.ts +12 -0
  79. package/dist/types/resources/tasks.d.ts.map +1 -0
  80. package/dist/types/resources/views.d.ts +66 -0
  81. package/dist/types/resources/views.d.ts.map +1 -0
  82. package/dist/types/resources/workspaces.d.ts +1 -1
  83. package/dist/types/types/access-log.d.ts +123 -0
  84. package/dist/types/types/access-log.d.ts.map +1 -0
  85. package/dist/types/types/agents.d.ts +17 -0
  86. package/dist/types/types/agents.d.ts.map +1 -0
  87. package/dist/types/types/index.d.ts +4 -1
  88. package/dist/types/types/index.d.ts.map +1 -1
  89. package/dist/types/types/runs.d.ts +50 -0
  90. package/dist/types/types/runs.d.ts.map +1 -0
  91. package/dist/types/types/shared.d.ts +1 -1
  92. package/dist/types/types/shared.d.ts.map +1 -1
  93. package/dist/types/types/tasks.d.ts +104 -0
  94. package/dist/types/types/tasks.d.ts.map +1 -0
  95. package/dist/types/types/views.d.ts +207 -0
  96. package/dist/types/types/views.d.ts.map +1 -0
  97. package/dist/types/types/workspaces.d.ts +1 -1
  98. package/package.json +7 -2
  99. package/dist/cjs/resources/smart-folders.js +0 -102
  100. package/dist/cjs/resources/smart-folders.js.map +0 -1
  101. package/dist/cjs/types/smart-folders.js.map +0 -1
  102. package/dist/esm/resources/smart-folders.js +0 -98
  103. package/dist/esm/resources/smart-folders.js.map +0 -1
  104. package/dist/esm/types/smart-folders.js +0 -2
  105. package/dist/esm/types/smart-folders.js.map +0 -1
  106. package/dist/types/resources/smart-folders.d.ts +0 -70
  107. package/dist/types/resources/smart-folders.d.ts.map +0 -1
  108. package/dist/types/types/smart-folders.d.ts +0 -45
  109. package/dist/types/types/smart-folders.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,uCAAmC;AAA1B,iGAAA,KAAK,OAAA;AACd,iDAA6C;AAApC,2GAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,uCAAmC;AAA1B,iGAAA,KAAK,OAAA;AACd,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,uCAAmC;AAA1B,iGAAA,KAAK,OAAA;AACd,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,uCAAmC;AAA1B,iGAAA,KAAK,OAAA;AACd,qCAAiC;AAAxB,+FAAA,IAAI,OAAA"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Runs = void 0;
4
+ /**
5
+ * Read and control run lifecycle state (snapshots, events).
6
+ */
7
+ class Runs {
8
+ client;
9
+ constructor(client) {
10
+ this.client = client;
11
+ }
12
+ async list(workspaceId, options) {
13
+ return this.client.request('GET', `/workspaces/${workspaceId}/runs`, undefined, undefined, options);
14
+ }
15
+ async retrieve(workspaceId, runId, options) {
16
+ return this.client.request('GET', `/workspaces/${workspaceId}/runs/${runId}`, undefined, undefined, options);
17
+ }
18
+ async listSnapshots(workspaceId, runId, options) {
19
+ return this.client.request('GET', `/workspaces/${workspaceId}/runs/${runId}/snapshots`, undefined, undefined, options);
20
+ }
21
+ async listEvents(workspaceId, runId, options) {
22
+ return this.client.request('GET', `/workspaces/${workspaceId}/runs/${runId}/events`, undefined, undefined, options);
23
+ }
24
+ async input(workspaceId, runId, params, options) {
25
+ return this.client.request('POST', `/workspaces/${workspaceId}/runs/${runId}/input`, {
26
+ message: params.message,
27
+ idempotency_key: params.idempotencyKey,
28
+ queue_mode: params.queueMode,
29
+ }, undefined, options);
30
+ }
31
+ async cancel(workspaceId, runId, options) {
32
+ return this.client.request('POST', `/workspaces/${workspaceId}/runs/${runId}/cancel`, undefined, undefined, options);
33
+ }
34
+ }
35
+ exports.Runs = Runs;
36
+ //# sourceMappingURL=runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/resources/runs.ts"],"names":[],"mappings":";;;AASA;;GAEG;AACH,MAAa,IAAI;IACc;IAA7B,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD,KAAK,CAAC,IAAI,CAAC,WAAmB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,eAAe,WAAW,OAAO,EACjC,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,WAAmB,EACnB,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,eAAe,WAAW,SAAS,KAAK,EAAE,EAC1C,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,WAAmB,EACnB,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,eAAe,WAAW,SAAS,KAAK,YAAY,EACpD,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,WAAmB,EACnB,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,eAAe,WAAW,SAAS,KAAK,SAAS,EACjD,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,KAAK,CACT,WAAmB,EACnB,KAAa,EACb,MAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,eAAe,WAAW,SAAS,KAAK,QAAQ,EAChD;YACE,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,eAAe,EAAE,MAAM,CAAC,cAAc;YACtC,UAAU,EAAE,MAAM,CAAC,SAAS;SAC7B,EACD,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,eAAe,WAAW,SAAS,KAAK,SAAS,EACjD,SAAS,EACT,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAvFD,oBAuFC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tasks = void 0;
4
+ const tasks_js_1 = require("../types/tasks.js");
5
+ /**
6
+ * Task APIs for agents.
7
+ */
8
+ class Tasks {
9
+ client;
10
+ constructor(client) {
11
+ this.client = client;
12
+ }
13
+ async create(workspaceId, params, options) {
14
+ return this.client.request('POST', `/workspaces/${workspaceId}/tasks`, {
15
+ message: params.message,
16
+ agent_id: params.agentId,
17
+ session_id: params.sessionId,
18
+ session_key: params.sessionKey,
19
+ deliver: params.deliver,
20
+ timeout_ms: params.timeoutMs,
21
+ policy: toPolicyBody(params.policy),
22
+ lane: params.lane,
23
+ extra_system_prompt: params.extraSystemPrompt,
24
+ input_provenance: toInputProvenanceBody(params.inputProvenance),
25
+ routing: toRoutingBody(params.routing),
26
+ attachments: params.attachments,
27
+ idempotency_key: params.idempotencyKey,
28
+ label: params.label,
29
+ spawned_by: params.spawnedBy,
30
+ }, undefined, options);
31
+ }
32
+ async retrieve(workspaceId, taskId, options) {
33
+ return this.client.request('GET', `/workspaces/${workspaceId}/tasks/${taskId}`, undefined, undefined, options);
34
+ }
35
+ }
36
+ exports.Tasks = Tasks;
37
+ function toRoutingBody(routing) {
38
+ if (!routing)
39
+ return {};
40
+ return {
41
+ to: routing.to,
42
+ reply_to: routing.replyTo,
43
+ channel: routing.channel,
44
+ reply_channel: routing.replyChannel,
45
+ account_id: routing.accountId,
46
+ reply_account_id: routing.replyAccountId,
47
+ thread_id: routing.threadId,
48
+ group_id: routing.groupId,
49
+ group_channel: routing.groupChannel,
50
+ group_space: routing.groupSpace,
51
+ };
52
+ }
53
+ function toInputProvenanceBody(provenance) {
54
+ if (!provenance)
55
+ return undefined;
56
+ return {
57
+ source: provenance.source,
58
+ message_id: provenance.messageId,
59
+ channel: provenance.channel,
60
+ tool_call_id: provenance.toolCallId,
61
+ correlation_id: provenance.correlationId,
62
+ };
63
+ }
64
+ function toPolicyBody(policy) {
65
+ if (!policy)
66
+ return undefined;
67
+ return {
68
+ host: policy.host ?? tasks_js_1.EXEC_HOST_SANDBOX,
69
+ security: policy.security ?? tasks_js_1.EXEC_SECURITY_ALLOWLIST,
70
+ ask: policy.ask ?? tasks_js_1.EXEC_ASK_OFF,
71
+ runtime_type: policy.runtimeType ?? tasks_js_1.RUNTIME_TYPE_GVISOR,
72
+ workspace_access: policy.workspaceAccess ?? tasks_js_1.WORKSPACE_ACCESS_RW,
73
+ network_enabled: policy.networkEnabled ?? true,
74
+ interactive: policy.interactive ?? false,
75
+ resources: policy.resources ?? {},
76
+ retry: {
77
+ max_attempts: policy.retry?.maxAttempts ?? tasks_js_1.RETRY_DEFAULT_MAX_ATTEMPTS,
78
+ delay_ms: policy.retry?.delayMs ?? tasks_js_1.RETRY_DEFAULT_DELAY_MS,
79
+ },
80
+ };
81
+ }
82
+ //# sourceMappingURL=tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/resources/tasks.ts"],"names":[],"mappings":";;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EAAE,MAAM,CAAC,KAAK,EAAE,WAAW,IAAI,qCAA0B;YACrE,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,iCAAsB;SAC1D;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Views = void 0;
4
+ /**
5
+ * Manage source views within a workspace.
6
+ *
7
+ * Source views are materialized queries over connected data sources.
8
+ * In **smart** mode the query is LLM-inferred from natural language guidance;
9
+ * in **query** mode the query is built from a structured per-integration filter.
10
+ *
11
+ * @example Smart mode (LLM-inferred)
12
+ * ```ts
13
+ * await airstore.views.create("ws_abc", {
14
+ * integration: "gmail",
15
+ * name: "Recent Emails",
16
+ * guidance: "Last 7 days of emails",
17
+ * });
18
+ * ```
19
+ *
20
+ * @example Query mode (structured filter)
21
+ * ```ts
22
+ * await airstore.views.create("ws_abc", {
23
+ * integration: "gmail",
24
+ * name: "Unread from boss",
25
+ * filter: { from: "boss@company.com", is_unread: true },
26
+ * });
27
+ * ```
28
+ */
29
+ class Views {
30
+ client;
31
+ constructor(client) {
32
+ this.client = client;
33
+ }
34
+ /**
35
+ * Create a new source view.
36
+ *
37
+ * If `filter` is provided the view is created in query mode;
38
+ * otherwise it uses smart mode with LLM inference from `guidance`.
39
+ */
40
+ async create(workspaceId, params, options) {
41
+ const body = {
42
+ integration: params.integration,
43
+ name: params.name,
44
+ output_format: params.outputFormat ?? 'folder',
45
+ };
46
+ if (params.guidance !== undefined)
47
+ body['guidance'] = params.guidance;
48
+ if (params.filter !== undefined)
49
+ body['filter'] = params.filter;
50
+ if (params.fileExt !== undefined)
51
+ body['file_ext'] = params.fileExt;
52
+ return this.client.request('POST', `/workspaces/${workspaceId}/fs/views`, body, undefined, options);
53
+ }
54
+ /** List all source views in a workspace. */
55
+ async list(workspaceId, options) {
56
+ const result = await this.client.request('GET', `/workspaces/${workspaceId}/fs/views/list`, undefined, undefined, options);
57
+ return result.views ?? [];
58
+ }
59
+ /** Retrieve a source view by its virtual filesystem path. */
60
+ async retrieve(workspaceId, viewPath, options) {
61
+ return this.client.request('GET', `/workspaces/${workspaceId}/fs/views`, undefined, { path: viewPath }, options);
62
+ }
63
+ /** Update an existing source view. */
64
+ async update(workspaceId, viewId, params, options) {
65
+ const body = {};
66
+ if (params.name !== undefined)
67
+ body['name'] = params.name;
68
+ if (params.guidance !== undefined)
69
+ body['guidance'] = params.guidance;
70
+ if (params.filter !== undefined)
71
+ body['filter'] = params.filter;
72
+ return this.client.request('PUT', `/workspaces/${workspaceId}/fs/views/${viewId}`, body, undefined, options);
73
+ }
74
+ /** Delete a source view. */
75
+ async del(workspaceId, viewId, options) {
76
+ await this.client.request('DELETE', `/workspaces/${workspaceId}/fs/views/${viewId}`, undefined, undefined, options);
77
+ }
78
+ /**
79
+ * Sync a source view — re-execute its query and refresh cached metadata.
80
+ *
81
+ * Idempotent and safe to call repeatedly. Returns the count of total
82
+ * and newly discovered results.
83
+ */
84
+ async sync(workspaceId, viewId, options) {
85
+ return this.client.request('POST', `/workspaces/${workspaceId}/fs/views/${viewId}/sync`, undefined, undefined, options);
86
+ }
87
+ /**
88
+ * List available resources for an integration (repos, channels, etc.).
89
+ *
90
+ * Used to populate filter dropdowns with real data from connected sources.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const repos = await airstore.views.listResources("ws_abc", "github");
95
+ * // [{ id: "owner/repo", name: "owner/repo" }, ...]
96
+ * ```
97
+ */
98
+ async listResources(workspaceId, integration, resourceType, options) {
99
+ const params = {};
100
+ if (resourceType)
101
+ params['type'] = resourceType;
102
+ const result = await this.client.request('GET', `/workspaces/${workspaceId}/fs/sources/${integration}/resources`, undefined, params, options);
103
+ return result.resources ?? [];
104
+ }
105
+ }
106
+ exports.Views = Views;
107
+ //# sourceMappingURL=views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../src/resources/views.ts"],"names":[],"mappings":";;;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AA2B,EAAE,CAAC;QAC1C,IAAI,YAAY;YAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;QAEhD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACtC,KAAK,EACL,eAAe,WAAW,eAAe,WAAW,YAAY,EAChE,SAAS,EACT,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAQ,MAA+C,CAAC,SAAS,IAAI,EAAE,CAAC;IAC1E,CAAC;CACF;AAnJD,sBAmJC"}
@@ -4,7 +4,7 @@ exports.Workspaces = void 0;
4
4
  /**
5
5
  * Manage workspaces.
6
6
  *
7
- * Workspaces are the top-level container for connections, smart folders,
7
+ * Workspaces are the top-level container for connections, source views,
8
8
  * members, and the virtual filesystem. When using an organization token,
9
9
  * workspaces are automatically scoped to the token's tenant.
10
10
  *
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=smart-folders.js.map
3
+ //# sourceMappingURL=access-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-log.js","sourceRoot":"","sources":["../../../src/types/access-log.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":""}
@@ -17,9 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./shared.js"), exports);
18
18
  __exportStar(require("./workspaces.js"), exports);
19
19
  __exportStar(require("./connections.js"), exports);
20
- __exportStar(require("./smart-folders.js"), exports);
20
+ __exportStar(require("./views.js"), exports);
21
21
  __exportStar(require("./tokens.js"), exports);
22
22
  __exportStar(require("./members.js"), exports);
23
23
  __exportStar(require("./oauth.js"), exports);
24
24
  __exportStar(require("./filesystem.js"), exports);
25
+ __exportStar(require("./agents.js"), exports);
26
+ __exportStar(require("./tasks.js"), exports);
27
+ __exportStar(require("./runs.js"), exports);
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,kDAAgC;AAChC,mDAAiC;AACjC,qDAAmC;AACnC,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,kDAAgC;AAChC,mDAAiC;AACjC,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC;AAChC,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/types/runs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RETRY_DEFAULT_DELAY_MS = exports.RETRY_DEFAULT_MAX_ATTEMPTS = exports.WORKSPACE_ACCESS_RW = exports.WORKSPACE_ACCESS_RO = exports.WORKSPACE_ACCESS_NONE = exports.RUNTIME_TYPE_RUNC = exports.RUNTIME_TYPE_GVISOR = exports.EXEC_ASK_ALWAYS = exports.EXEC_ASK_ON_MISS = exports.EXEC_ASK_OFF = exports.EXEC_SECURITY_FULL = exports.EXEC_SECURITY_ALLOWLIST = exports.EXEC_SECURITY_DENY = exports.EXEC_HOST_SANDBOX = exports.QUEUE_MODE_QUEUE = exports.QUEUE_MODE_INTERRUPT = exports.QUEUE_MODE_FOLLOWUP = exports.QUEUE_MODE_STEER_BACKLOG = exports.QUEUE_MODE_STEER = void 0;
4
+ exports.QUEUE_MODE_STEER = 'steer';
5
+ exports.QUEUE_MODE_STEER_BACKLOG = 'steer-backlog';
6
+ exports.QUEUE_MODE_FOLLOWUP = 'followup';
7
+ exports.QUEUE_MODE_INTERRUPT = 'interrupt';
8
+ exports.QUEUE_MODE_QUEUE = 'queue';
9
+ exports.EXEC_HOST_SANDBOX = 'sandbox';
10
+ exports.EXEC_SECURITY_DENY = 'deny';
11
+ exports.EXEC_SECURITY_ALLOWLIST = 'allowlist';
12
+ exports.EXEC_SECURITY_FULL = 'full';
13
+ exports.EXEC_ASK_OFF = 'off';
14
+ exports.EXEC_ASK_ON_MISS = 'on-miss';
15
+ exports.EXEC_ASK_ALWAYS = 'always';
16
+ exports.RUNTIME_TYPE_GVISOR = 'gvisor';
17
+ exports.RUNTIME_TYPE_RUNC = 'runc';
18
+ exports.WORKSPACE_ACCESS_NONE = 'none';
19
+ exports.WORKSPACE_ACCESS_RO = 'ro';
20
+ exports.WORKSPACE_ACCESS_RW = 'rw';
21
+ exports.RETRY_DEFAULT_MAX_ATTEMPTS = 2;
22
+ exports.RETRY_DEFAULT_DELAY_MS = 0;
23
+ //# sourceMappingURL=tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/types/tasks.ts"],"names":[],"mappings":";;;AAMa,QAAA,gBAAgB,GAAc,OAAO,CAAC;AACtC,QAAA,wBAAwB,GAAc,eAAe,CAAC;AACtD,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,oBAAoB,GAAc,WAAW,CAAC;AAC9C,QAAA,gBAAgB,GAAc,OAAO,CAAC;AAOtC,QAAA,iBAAiB,GAAa,SAAS,CAAC;AACxC,QAAA,kBAAkB,GAAiB,MAAM,CAAC;AAC1C,QAAA,uBAAuB,GAAiB,WAAW,CAAC;AACpD,QAAA,kBAAkB,GAAiB,MAAM,CAAC;AAC1C,QAAA,YAAY,GAAY,KAAK,CAAC;AAC9B,QAAA,gBAAgB,GAAY,SAAS,CAAC;AACtC,QAAA,eAAe,GAAY,QAAQ,CAAC;AACpC,QAAA,mBAAmB,GAAgB,QAAQ,CAAC;AAC5C,QAAA,iBAAiB,GAAgB,MAAM,CAAC;AACxC,QAAA,qBAAqB,GAAoB,MAAM,CAAC;AAChD,QAAA,mBAAmB,GAAoB,IAAI,CAAC;AAC5C,QAAA,mBAAmB,GAAoB,IAAI,CAAC;AAC5C,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAC/B,QAAA,sBAAsB,GAAG,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Integrations = exports.WebModes = exports.PostHogResourceTypes = exports.LinearPriorities = exports.LinearStates = exports.LinearResourceTypes = exports.GDriveMimeTypes = exports.GitHubContentTypes = exports.GitHubStates = exports.GitHubResourceTypes = exports.GmailLabels = exports.ViewModes = void 0;
4
+ // ── Const enum objects (for runtime enumeration / dropdowns) ─────────────────
5
+ exports.ViewModes = { Smart: 'smart', Query: 'query' };
6
+ exports.GmailLabels = [
7
+ 'inbox', 'sent', 'starred', 'important', 'drafts', 'spam', 'trash',
8
+ ];
9
+ exports.GitHubResourceTypes = [
10
+ 'issues', 'prs', 'commits', 'files', 'releases', 'workflows', 'branches',
11
+ ];
12
+ exports.GitHubStates = ['open', 'closed', 'merged'];
13
+ exports.GitHubContentTypes = ['markdown', 'diff', 'json', 'raw'];
14
+ exports.GDriveMimeTypes = [
15
+ 'pdf', 'document', 'spreadsheet', 'presentation', 'image',
16
+ ];
17
+ exports.LinearResourceTypes = ['issues', 'projects'];
18
+ exports.LinearStates = [
19
+ 'backlog', 'todo', 'in_progress', 'done', 'canceled',
20
+ ];
21
+ exports.LinearPriorities = ['urgent', 'high', 'medium', 'low'];
22
+ exports.PostHogResourceTypes = [
23
+ 'events', 'feature-flags', 'insights', 'cohorts',
24
+ ];
25
+ exports.WebModes = ['map', 'search'];
26
+ exports.Integrations = [
27
+ 'gmail', 'github', 'gdrive', 'notion', 'slack', 'linear', 'posthog', 'web',
28
+ ];
29
+ //# sourceMappingURL=views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../src/types/views.ts"],"names":[],"mappings":";;;AAiDA,gFAAgF;AAEnE,QAAA,SAAS,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAW,CAAC;AAExD,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO;CAC1D,CAAC;AAEE,QAAA,mBAAmB,GAAG;IACjC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU;CAChE,CAAC;AACE,QAAA,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AACrD,QAAA,kBAAkB,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAElE,QAAA,eAAe,GAAG;IAC7B,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO;CACjD,CAAC;AAEE,QAAA,mBAAmB,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AACtD,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU;CAC5C,CAAC;AACE,QAAA,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAEhE,QAAA,oBAAoB,GAAG;IAClC,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS;CACxC,CAAC;AAEE,QAAA,QAAQ,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAC;AAEtC,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK;CAClE,CAAC"}
@@ -1,122 +1,95 @@
1
1
  import { CoreClient } from './client.js';
2
2
  import { Workspaces } from './resources/workspaces.js';
3
3
  import { Connections } from './resources/connections.js';
4
- import { SmartFolders } from './resources/smart-folders.js';
4
+ import { Views } from './resources/views.js';
5
5
  import { Tokens } from './resources/tokens.js';
6
6
  import { Members } from './resources/members.js';
7
7
  import { OAuth } from './resources/oauth.js';
8
8
  import { Filesystem } from './resources/filesystem.js';
9
+ import { AccessLog } from './resources/access-log.js';
10
+ import { Agents } from './resources/agents.js';
11
+ import { Tasks } from './resources/tasks.js';
12
+ import { Runs } from './resources/runs.js';
9
13
  /**
10
14
  * The Airstore SDK client.
11
15
  *
12
- * Create an instance with your API key to interact with workspaces,
13
- * connections, smart folders, tokens, members, the virtual filesystem,
14
- * and OAuth sessions.
15
- *
16
16
  * @example Basic provisioning flow
17
17
  * ```ts
18
18
  * import Airstore from '@airstore/sdk';
19
19
  *
20
20
  * const airstore = new Airstore({ apiKey: 'org_...' });
21
21
  *
22
- * // 1. Create a workspace for a new user
22
+ * // 1. Create a workspace
23
23
  * const ws = await airstore.workspaces.create({ name: 'user-123' });
24
24
  *
25
- * // 2. Connect their Gmail with existing OAuth tokens
25
+ * // 2. Connect Gmail
26
26
  * await airstore.connections.create(ws.external_id, {
27
27
  * integrationType: 'gmail',
28
28
  * accessToken: existingAccessToken,
29
29
  * refreshToken: existingRefreshToken,
30
30
  * });
31
31
  *
32
- * // 3. Set up a smart folder
33
- * await airstore.smartFolders.create(ws.external_id, {
32
+ * // 3. Create a source view (smart mode — LLM-inferred)
33
+ * const view = await airstore.views.create(ws.external_id, {
34
34
  * integration: 'gmail',
35
35
  * name: 'Recent Emails',
36
36
  * guidance: 'Last 7 days of emails from the inbox',
37
37
  * });
38
38
  *
39
- * // 4. Generate a mount token for the user's VM
39
+ * // 4. Or create a source view (query mode structured filter)
40
+ * await airstore.views.create(ws.external_id, {
41
+ * integration: 'gmail',
42
+ * name: 'Unread from boss',
43
+ * filter: { from: 'boss@company.com', is_unread: true },
44
+ * });
45
+ *
46
+ * // 5. Sync a view to refresh its metadata
47
+ * const result = await airstore.views.sync(ws.external_id, view.external_id);
48
+ * console.log(result.results_count, result.new_results);
49
+ *
50
+ * // 6. Generate a mount token
40
51
  * const token = await airstore.tokens.create(ws.external_id, {
41
52
  * email: 'agent@internal',
42
53
  * name: 'vm-mount',
43
54
  * });
44
- * // Pass token.token to: airstore start --token <token>
45
- * ```
46
- *
47
- * @example Per-request options
48
- * ```ts
49
- * const ws = await airstore.workspaces.list({
50
- * timeout: 10_000,
51
- * maxRetries: 5,
52
- * });
53
55
  * ```
54
56
  */
55
57
  export class Airstore extends CoreClient {
56
- /**
57
- * Manage workspaces.
58
- *
59
- * Workspaces are the top-level container for connections, smart folders,
60
- * members, and the virtual filesystem.
61
- */
58
+ /** Manage workspaces. */
62
59
  workspaces;
63
- /**
64
- * Manage connections (integrations) within a workspace.
65
- *
66
- * Pass existing OAuth tokens or API keys to connect external services
67
- * like Gmail, GitHub, Notion, etc.
68
- */
60
+ /** Manage connections (integrations) within a workspace. */
69
61
  connections;
70
- /**
71
- * Manage smart folders (filesystem queries).
72
- *
73
- * Smart folders use LLM inference to automatically organize and filter
74
- * data from connected integrations into virtual folders or files.
75
- */
76
- smartFolders;
77
- /**
78
- * Manage workspace-scoped authentication tokens.
79
- *
80
- * Tokens are used for CLI mounting and per-workspace programmatic access.
81
- */
62
+ /** Manage source views — materialized queries over connected data sources. */
63
+ views;
64
+ /** Manage workspace-scoped authentication tokens. */
82
65
  tokens;
83
- /**
84
- * Manage workspace members.
85
- *
86
- * Members are users with roles (admin, member, viewer) in a workspace.
87
- */
66
+ /** Manage workspace members. */
88
67
  members;
89
- /**
90
- * OAuth session management for interactive connection setup.
91
- *
92
- * Use this for browser-redirect flows where users authorize
93
- * integrations themselves.
94
- */
68
+ /** OAuth session management for interactive connection setup. */
95
69
  oauth;
96
- /**
97
- * Read-only access to the workspace virtual filesystem.
98
- *
99
- * Browse directories, read files, and inspect metadata across
100
- * all connected integrations.
101
- */
70
+ /** Read-only access to the workspace virtual filesystem. */
102
71
  fs;
103
- /**
104
- * Create a new Airstore SDK client.
105
- *
106
- * @param opts - Client configuration. At minimum, provide an `apiKey`
107
- * or set the `AIRSTORE_API_KEY` environment variable.
108
- *
109
- * @throws {AirstoreError} If no API key is provided.
110
- */
72
+ /** Query the workspace access log. */
73
+ accessLog;
74
+ /** Manage workspace agent profiles. */
75
+ agents;
76
+ /** Manage tasks (intent). */
77
+ tasks;
78
+ /** Read and control run lifecycle state. */
79
+ runs;
111
80
  constructor(opts) {
112
81
  super(opts);
113
82
  this.workspaces = new Workspaces(this);
114
83
  this.connections = new Connections(this);
115
- this.smartFolders = new SmartFolders(this);
84
+ this.views = new Views(this);
116
85
  this.tokens = new Tokens(this);
117
86
  this.members = new Members(this);
118
87
  this.oauth = new OAuth(this);
119
88
  this.fs = new Filesystem(this);
89
+ this.accessLog = new AccessLog(this);
90
+ this.agents = new Agents(this);
91
+ this.tasks = new Tasks(this);
92
+ this.runs = new Runs(this);
120
93
  }
121
94
  }
122
95
  export default Airstore;
@@ -1 +1 @@
1
- {"version":3,"file":"airstore.js","sourceRoot":"","sources":["../../src/airstore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC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AAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,EAAE,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,eAAe,QAAQ,CAAC"}
package/dist/esm/index.js CHANGED
@@ -6,11 +6,18 @@ export { AirstoreError, APIError, AuthenticationError, PermissionDeniedError, No
6
6
  // ── Resource classes ─────────────────────────────────────────────────────────
7
7
  export { Workspaces } from './resources/workspaces.js';
8
8
  export { Connections } from './resources/connections.js';
9
- export { SmartFolders } from './resources/smart-folders.js';
9
+ export { Views } from './resources/views.js';
10
10
  export { Tokens } from './resources/tokens.js';
11
11
  export { Members } from './resources/members.js';
12
12
  export { OAuth } from './resources/oauth.js';
13
13
  export { Filesystem } from './resources/filesystem.js';
14
+ export { AccessLog } from './resources/access-log.js';
15
+ export { Agents } from './resources/agents.js';
16
+ export { Tasks } from './resources/tasks.js';
17
+ export { Runs } from './resources/runs.js';
18
+ // ── Typed constants ───────────────────────────────────────────────────────────
19
+ export { QUEUE_MODE_STEER, QUEUE_MODE_STEER_BACKLOG, QUEUE_MODE_FOLLOWUP, QUEUE_MODE_INTERRUPT, QUEUE_MODE_QUEUE, EXEC_HOST_SANDBOX, EXEC_SECURITY_DENY, EXEC_SECURITY_ALLOWLIST, EXEC_SECURITY_FULL, EXEC_ASK_OFF, EXEC_ASK_ON_MISS, EXEC_ASK_ALWAYS, RUNTIME_TYPE_GVISOR, RUNTIME_TYPE_RUNC, WORKSPACE_ACCESS_NONE, WORKSPACE_ACCESS_RO, WORKSPACE_ACCESS_RW, RETRY_DEFAULT_MAX_ATTEMPTS, RETRY_DEFAULT_DELAY_MS, } from './types/tasks.js';
20
+ export { ViewModes, Integrations, GmailLabels, GitHubResourceTypes, GitHubStates, GitHubContentTypes, GDriveMimeTypes, LinearResourceTypes, LinearStates, LinearPriorities, PostHogResourceTypes, WebModes, } from './types/views.js';
14
21
  // ── Version ──────────────────────────────────────────────────────────────────
15
22
  export { VERSION } from './version.js';
16
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B,gFAAgF;AAChF,OAAO,EAAE,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAG9D,gFAAgF;AAChF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAYvD,gFAAgF;AAChF,OAAO,EAAE,OAAO,EAAE,M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