@getjack/jack 0.1.16 → 0.1.17
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/README.md +1 -1
- package/package.json +5 -2
- package/src/commands/community.ts +47 -0
- package/src/commands/services.ts +269 -5
- package/src/index.ts +7 -0
- package/src/lib/hooks.ts +20 -0
- package/src/lib/project-operations.ts +278 -31
- package/src/lib/services/db-execute.ts +485 -0
- package/src/lib/services/sql-classifier.test.ts +404 -0
- package/src/lib/services/sql-classifier.ts +346 -0
- package/src/lib/storage/file-filter.ts +4 -0
- package/src/lib/telemetry.ts +3 -0
- package/src/lib/wrangler-config.test.ts +322 -0
- package/src/lib/wrangler-config.ts +459 -0
- package/src/mcp/tools/index.ts +161 -0
- package/src/templates/index.ts +4 -0
- package/src/templates/types.ts +12 -0
- package/templates/api/AGENTS.md +33 -0
- package/templates/hello/AGENTS.md +33 -0
- package/templates/miniapp/.jack.json +4 -5
- package/templates/miniapp/AGENTS.md +33 -0
- package/templates/nextjs/AGENTS.md +33 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Agent Context
|
|
2
|
+
|
|
3
|
+
## Infrastructure
|
|
4
|
+
|
|
5
|
+
This project uses **jack** for deployment. When Jack MCP is connected, prefer `mcp__jack__*` tools over CLI commands - they're cloud-aware and faster.
|
|
6
|
+
|
|
7
|
+
**Do NOT use wrangler directly.** Jack manages config and may use cloud-hosted resources where wrangler won't work.
|
|
8
|
+
|
|
9
|
+
Common operations:
|
|
10
|
+
- **Deploy**: `jack ship` or Jack MCP
|
|
11
|
+
- **Database**: `jack services db create` or Jack MCP
|
|
12
|
+
- **Status**: `jack status` or Jack MCP
|
|
13
|
+
|
|
14
|
+
## SQL Execution
|
|
15
|
+
|
|
16
|
+
Jack supports secure SQL execution against D1 databases:
|
|
17
|
+
|
|
18
|
+
**Via MCP** (preferred for agents):
|
|
19
|
+
- `execute_sql({ sql: "SELECT * FROM users" })` - read queries work by default
|
|
20
|
+
- `execute_sql({ sql: "INSERT...", allow_write: true })` - writes require allow_write
|
|
21
|
+
- Destructive ops (DROP, TRUNCATE, ALTER) are blocked via MCP - use CLI
|
|
22
|
+
|
|
23
|
+
**Via CLI**:
|
|
24
|
+
- `jack services db execute "SELECT * FROM users"` - read queries
|
|
25
|
+
- `jack services db execute "INSERT..." --write` - write queries
|
|
26
|
+
- `jack services db execute "DROP TABLE..." --write` - prompts for typed confirmation
|
|
27
|
+
- `jack services db execute --file schema.sql --write` - run SQL from file
|
|
28
|
+
|
|
29
|
+
**Security notes**:
|
|
30
|
+
- Read-only by default to prevent accidental data modification
|
|
31
|
+
- Write operations require explicit `--write` flag or `allow_write: true`
|
|
32
|
+
- Destructive operations (DROP, TRUNCATE, ALTER, DELETE without WHERE) require CLI confirmation
|
|
33
|
+
- MCP results are wrapped with anti-injection headers to prevent prompt injection
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Agent Context
|
|
2
|
+
|
|
3
|
+
## Infrastructure
|
|
4
|
+
|
|
5
|
+
This project uses **jack** for deployment. When Jack MCP is connected, prefer `mcp__jack__*` tools over CLI commands - they're cloud-aware and faster.
|
|
6
|
+
|
|
7
|
+
**Do NOT use wrangler directly.** Jack manages config and may use cloud-hosted resources where wrangler won't work.
|
|
8
|
+
|
|
9
|
+
Common operations:
|
|
10
|
+
- **Deploy**: `jack ship` or Jack MCP
|
|
11
|
+
- **Database**: `jack services db create` or Jack MCP
|
|
12
|
+
- **Status**: `jack status` or Jack MCP
|
|
13
|
+
|
|
14
|
+
## SQL Execution
|
|
15
|
+
|
|
16
|
+
Jack supports secure SQL execution against D1 databases:
|
|
17
|
+
|
|
18
|
+
**Via MCP** (preferred for agents):
|
|
19
|
+
- `execute_sql({ sql: "SELECT * FROM users" })` - read queries work by default
|
|
20
|
+
- `execute_sql({ sql: "INSERT...", allow_write: true })` - writes require allow_write
|
|
21
|
+
- Destructive ops (DROP, TRUNCATE, ALTER) are blocked via MCP - use CLI
|
|
22
|
+
|
|
23
|
+
**Via CLI**:
|
|
24
|
+
- `jack services db execute "SELECT * FROM users"` - read queries
|
|
25
|
+
- `jack services db execute "INSERT..." --write` - write queries
|
|
26
|
+
- `jack services db execute "DROP TABLE..." --write` - prompts for typed confirmation
|
|
27
|
+
- `jack services db execute --file schema.sql --write` - run SQL from file
|
|
28
|
+
|
|
29
|
+
**Security notes**:
|
|
30
|
+
- Read-only by default to prevent accidental data modification
|
|
31
|
+
- Write operations require explicit `--write` flag or `allow_write: true`
|
|
32
|
+
- Destructive operations (DROP, TRUNCATE, ALTER, DELETE without WHERE) require CLI confirmation
|
|
33
|
+
- MCP results are wrapped with anti-injection headers to prevent prompt injection
|
|
@@ -39,10 +39,7 @@
|
|
|
39
39
|
"action": "box",
|
|
40
40
|
"title": "Deployed: {{name}}",
|
|
41
41
|
"lines": [
|
|
42
|
-
"
|
|
43
|
-
"Manifest: {{url}}/.well-known/farcaster.json",
|
|
44
|
-
"",
|
|
45
|
-
"Next: Sign the manifest and paste accountAssociation when prompted"
|
|
42
|
+
"{{url}}"
|
|
46
43
|
]
|
|
47
44
|
},
|
|
48
45
|
{
|
|
@@ -72,7 +69,9 @@
|
|
|
72
69
|
"set": {
|
|
73
70
|
"accountAssociation": { "from": "input" }
|
|
74
71
|
}
|
|
75
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"deployAfter": true,
|
|
74
|
+
"deployMessage": "Deploying manifest..."
|
|
76
75
|
},
|
|
77
76
|
{
|
|
78
77
|
"action": "url",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Agent Context
|
|
2
|
+
|
|
3
|
+
## Infrastructure
|
|
4
|
+
|
|
5
|
+
This project uses **jack** for deployment. When Jack MCP is connected, prefer `mcp__jack__*` tools over CLI commands - they're cloud-aware and faster.
|
|
6
|
+
|
|
7
|
+
**Do NOT use wrangler directly.** Jack manages config and may use cloud-hosted resources where wrangler won't work.
|
|
8
|
+
|
|
9
|
+
Common operations:
|
|
10
|
+
- **Deploy**: `jack ship` or Jack MCP
|
|
11
|
+
- **Database**: `jack services db create` or Jack MCP
|
|
12
|
+
- **Status**: `jack status` or Jack MCP
|
|
13
|
+
|
|
14
|
+
## SQL Execution
|
|
15
|
+
|
|
16
|
+
Jack supports secure SQL execution against D1 databases:
|
|
17
|
+
|
|
18
|
+
**Via MCP** (preferred for agents):
|
|
19
|
+
- `execute_sql({ sql: "SELECT * FROM users" })` - read queries work by default
|
|
20
|
+
- `execute_sql({ sql: "INSERT...", allow_write: true })` - writes require allow_write
|
|
21
|
+
- Destructive ops (DROP, TRUNCATE, ALTER) are blocked via MCP - use CLI
|
|
22
|
+
|
|
23
|
+
**Via CLI**:
|
|
24
|
+
- `jack services db execute "SELECT * FROM users"` - read queries
|
|
25
|
+
- `jack services db execute "INSERT..." --write` - write queries
|
|
26
|
+
- `jack services db execute "DROP TABLE..." --write` - prompts for typed confirmation
|
|
27
|
+
- `jack services db execute --file schema.sql --write` - run SQL from file
|
|
28
|
+
|
|
29
|
+
**Security notes**:
|
|
30
|
+
- Read-only by default to prevent accidental data modification
|
|
31
|
+
- Write operations require explicit `--write` flag or `allow_write: true`
|
|
32
|
+
- Destructive operations (DROP, TRUNCATE, ALTER, DELETE without WHERE) require CLI confirmation
|
|
33
|
+
- MCP results are wrapped with anti-injection headers to prevent prompt injection
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Agent Context
|
|
2
|
+
|
|
3
|
+
## Infrastructure
|
|
4
|
+
|
|
5
|
+
This project uses **jack** for deployment. When Jack MCP is connected, prefer `mcp__jack__*` tools over CLI commands - they're cloud-aware and faster.
|
|
6
|
+
|
|
7
|
+
**Do NOT use wrangler directly.** Jack manages config and may use cloud-hosted resources where wrangler won't work.
|
|
8
|
+
|
|
9
|
+
Common operations:
|
|
10
|
+
- **Deploy**: `jack ship` or Jack MCP
|
|
11
|
+
- **Database**: `jack services db create` or Jack MCP
|
|
12
|
+
- **Status**: `jack status` or Jack MCP
|
|
13
|
+
|
|
14
|
+
## SQL Execution
|
|
15
|
+
|
|
16
|
+
Jack supports secure SQL execution against D1 databases:
|
|
17
|
+
|
|
18
|
+
**Via MCP** (preferred for agents):
|
|
19
|
+
- `execute_sql({ sql: "SELECT * FROM users" })` - read queries work by default
|
|
20
|
+
- `execute_sql({ sql: "INSERT...", allow_write: true })` - writes require allow_write
|
|
21
|
+
- Destructive ops (DROP, TRUNCATE, ALTER) are blocked via MCP - use CLI
|
|
22
|
+
|
|
23
|
+
**Via CLI**:
|
|
24
|
+
- `jack services db execute "SELECT * FROM users"` - read queries
|
|
25
|
+
- `jack services db execute "INSERT..." --write` - write queries
|
|
26
|
+
- `jack services db execute "DROP TABLE..." --write` - prompts for typed confirmation
|
|
27
|
+
- `jack services db execute --file schema.sql --write` - run SQL from file
|
|
28
|
+
|
|
29
|
+
**Security notes**:
|
|
30
|
+
- Read-only by default to prevent accidental data modification
|
|
31
|
+
- Write operations require explicit `--write` flag or `allow_write: true`
|
|
32
|
+
- Destructive operations (DROP, TRUNCATE, ALTER, DELETE without WHERE) require CLI confirmation
|
|
33
|
+
- MCP results are wrapped with anti-injection headers to prevent prompt injection
|