@archships/dim-agent-sdk 0.0.1

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 (78) hide show
  1. package/README.md +69 -0
  2. package/dist/agent-core/Agent.d.ts +29 -0
  3. package/dist/agent-core/LoopRunner.d.ts +30 -0
  4. package/dist/agent-core/MessageFactory.d.ts +20 -0
  5. package/dist/agent-core/ModelTurnCollector.d.ts +22 -0
  6. package/dist/agent-core/Session.d.ts +48 -0
  7. package/dist/agent-core/TerminationPolicy.d.ts +14 -0
  8. package/dist/agent-core/ToolExecutor.d.ts +27 -0
  9. package/dist/agent-core/agent-types.d.ts +26 -0
  10. package/dist/agent-core/createModel.d.ts +2 -0
  11. package/dist/agent-core/errors.d.ts +5 -0
  12. package/dist/agent-core/index.d.ts +13 -0
  13. package/dist/agent-core/session-state.d.ts +17 -0
  14. package/dist/agent-core/tool-call.d.ts +9 -0
  15. package/dist/context/AutoContextManager.d.ts +21 -0
  16. package/dist/context/index.d.ts +3 -0
  17. package/dist/context/types.d.ts +19 -0
  18. package/dist/contracts/common.d.ts +19 -0
  19. package/dist/contracts/content-normalize.d.ts +6 -0
  20. package/dist/contracts/content.d.ts +16 -0
  21. package/dist/contracts/event.d.ts +30 -0
  22. package/dist/contracts/index.d.ts +9 -0
  23. package/dist/contracts/message.d.ts +32 -0
  24. package/dist/contracts/model.d.ts +73 -0
  25. package/dist/contracts/state.d.ts +14 -0
  26. package/dist/contracts/tool-normalize.d.ts +3 -0
  27. package/dist/contracts/tool.d.ts +40 -0
  28. package/dist/index.d.ts +16 -0
  29. package/dist/index.js +2997 -0
  30. package/dist/persistence/FileStateStore.d.ts +14 -0
  31. package/dist/persistence/InMemoryStateStore.d.ts +9 -0
  32. package/dist/persistence/SnapshotCodec.d.ts +20 -0
  33. package/dist/persistence/index.d.ts +6 -0
  34. package/dist/persistence/store.d.ts +7 -0
  35. package/dist/plugin-host/HookPipeline.d.ts +7 -0
  36. package/dist/plugin-host/PluginHost.d.ts +36 -0
  37. package/dist/plugin-host/helpers.d.ts +3 -0
  38. package/dist/plugin-host/index.d.ts +4 -0
  39. package/dist/plugin-host/types.d.ts +1 -0
  40. package/dist/providers/anthropic/adapter.d.ts +13 -0
  41. package/dist/providers/anthropic/mapper.d.ts +28 -0
  42. package/dist/providers/gemini/adapter.d.ts +12 -0
  43. package/dist/providers/gemini/mapper.d.ts +30 -0
  44. package/dist/providers/index.d.ts +8 -0
  45. package/dist/providers/openai/adapter.d.ts +12 -0
  46. package/dist/providers/openai/mapper.d.ts +15 -0
  47. package/dist/providers/openai-responses/adapter.d.ts +12 -0
  48. package/dist/providers/openai-responses/mapper.d.ts +40 -0
  49. package/dist/providers/shared/http-error.d.ts +7 -0
  50. package/dist/providers/shared/provider-state.d.ts +4 -0
  51. package/dist/providers/shared/reasoning.d.ts +14 -0
  52. package/dist/providers/shared/tool-call.d.ts +5 -0
  53. package/dist/providers/shared/usage.d.ts +2 -0
  54. package/dist/services/ExecGateway.d.ts +14 -0
  55. package/dist/services/FileSystemGateway.d.ts +35 -0
  56. package/dist/services/GitGateway.d.ts +17 -0
  57. package/dist/services/ModelGateway.d.ts +7 -0
  58. package/dist/services/NetworkGateway.d.ts +6 -0
  59. package/dist/services/PermissionGateway.d.ts +11 -0
  60. package/dist/services/activity.d.ts +10 -0
  61. package/dist/services/index.d.ts +10 -0
  62. package/dist/services/permissions.d.ts +17 -0
  63. package/dist/services/types.d.ts +77 -0
  64. package/dist/tools/BaseTool.d.ts +6 -0
  65. package/dist/tools/ToolRegistry.d.ts +9 -0
  66. package/dist/tools/builtins/EditTool.d.ts +6 -0
  67. package/dist/tools/builtins/ExecTool.d.ts +6 -0
  68. package/dist/tools/builtins/ReadTool.d.ts +6 -0
  69. package/dist/tools/builtins/WriteTool.d.ts +6 -0
  70. package/dist/tools/builtins/index.d.ts +4 -0
  71. package/dist/tools/builtins/utils.d.ts +6 -0
  72. package/dist/tools/index.d.ts +4 -0
  73. package/dist/tools/result.d.ts +3 -0
  74. package/dist/utils/guards.d.ts +2 -0
  75. package/dist/utils/id.d.ts +1 -0
  76. package/dist/utils/json.d.ts +3 -0
  77. package/dist/utils/usage.d.ts +3 -0
  78. package/package.json +54 -0
@@ -0,0 +1,3 @@
1
+ import type { CallToolResult } from '../contracts/tool';
2
+ export declare function textToolResult(text: string): CallToolResult;
3
+ export declare function errorToolResult(text: string): CallToolResult;
@@ -0,0 +1,2 @@
1
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
2
+ export declare function isStringArray(value: unknown): value is string[];
@@ -0,0 +1 @@
1
+ export declare function createId(prefix: string): string;
@@ -0,0 +1,3 @@
1
+ import type { JsonObject } from '../contracts/common';
2
+ export declare function assertJsonSafeObject(value: unknown, label: string): asserts value is JsonObject;
3
+ export declare function parseJsonObject(value: string, label: string): Record<string, unknown>;
@@ -0,0 +1,3 @@
1
+ import type { Usage } from '../contracts/common';
2
+ export declare function createEmptyUsage(): Usage;
3
+ export declare function addUsage(left: Usage, right?: Usage): Usage;
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@archships/dim-agent-sdk",
3
+ "version": "0.0.1",
4
+ "description": "An agent-first TypeScript SDK with provider adapters, sessions, hooks, plugins, and runtime gateways.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "bun": "./src/index.ts",
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist/**/*"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
21
+ "scripts": {
22
+ "build": "rm -rf dist && bun build ./src/index.ts --outdir dist --target node --format esm && tsc --project tsconfig.build.json",
23
+ "typecheck": "tsc --noEmit",
24
+ "test": "bun test",
25
+ "prepack": "bun run build",
26
+ "demo:openai": "bun run demo/openai-tools.ts",
27
+ "bump": "bumpp --commit --no-verify --no-tag --no-push",
28
+ "release": "bun run bump && bun run build && bun publish",
29
+ "release:check": "bun run build && npm pack --dry-run"
30
+ },
31
+ "license": "UNLICENSED",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+ssh://git@gitlab.bfbops.com/nextim/dim-sdk.git"
35
+ },
36
+ "homepage": "https://gitlab.bfbops.com/nextim/dim-sdk",
37
+ "bugs": {
38
+ "url": "https://gitlab.bfbops.com/nextim/dim-sdk/-/issues"
39
+ },
40
+ "keywords": [
41
+ "agent",
42
+ "sdk",
43
+ "llm",
44
+ "ai",
45
+ "tools",
46
+ "plugins"
47
+ ],
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "dependencies": {
52
+ "@archships/dim-plugin-api": "^0.0.1"
53
+ }
54
+ }